-
Notifications
You must be signed in to change notification settings - Fork 47
feat(portfolio): implement pre-swap SNS proposal card #6811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the AdoptedProposalCard component to display pre-swap SNS proposals on the Portfolio page, along with its tests and necessary i18n updates.
- Adds a new page object and component for the pre-swap SNS proposal card.
- Implements unit tests to verify the component’s behavior.
- Updates the i18n strings to support the new card.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
frontend/src/tests/page-objects/AdoptedProposalCard.page-object.ts | Adds page object for interacting with the new card in tests. |
frontend/src/tests/lib/components/portfolio/AdoptedProposalCard.spec.ts | Implements unit tests for the card functionality. |
frontend/src/lib/i18n/en.json | Updates translation keys for the new card. |
frontend/src/lib/components/portfolio/AdoptedProposalCard.svelte | Implements the new AdoptedProposalCard component. |
frontend/src/lib/components/portfolio/AdoptedProposalCard.svelte
Outdated
Show resolved
Hide resolved
frontend/src/lib/components/portfolio/AdoptedProposalCard.svelte
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new AdoptedProposalCard component to display pre-swap adopted SNS proposals on the Portfolio page. The changes include the implementation of the new component, the addition of corresponding page object and unit tests, and updates to translation strings and related components (e.g., LaunchProjectCard) for a consistent UI.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
frontend/src/tests/page-objects/AdoptedProposalCard.page-object.ts | Added a page object to interact with the AdoptedProposalCard component during tests. |
frontend/src/tests/lib/components/portfolio/AdoptedProposalCard.spec.ts | Implemented unit tests to verify the new card’s functionality, including rendering text and link behavior. |
frontend/src/lib/i18n/en.json | Added new translation keys for the adopted proposal card states and time remaining title. |
frontend/src/lib/components/portfolio/LaunchProjectCard.svelte | Adjusted aria-label and formatting for the project link to improve accessibility and consistency. |
frontend/src/lib/components/portfolio/AdoptedProposalCard.svelte | Created the new card component to render pre-swap adopted proposal details using the project data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
commit e9a607b Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Mon May 12 10:41:03 2025 +0200 feat(delegation-state-column): compareByVoteDelegation util (#6806) # Motivation To improve the overview of a user’s vote delegation state, it’s planned to display the delegation status icon directly in the neuron table by adding a new column: “Vote Delegation” (see screenshot). This PR adds a new util for sorting by vote delegation status. [Draft MVP PR](https://github.com/dfinity/nns-dapp/pull/6802/files) [Demo](https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/) # Changes - Add compareByVoteDelegation util. # Tests - Added. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit c428ef6 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 10:32:04 2025 +0200 refactor(wallet): migrate SNS wallet to runes (#6807) # Motivation We aim to introduce changes to the `SnsWallet` component. This PR refactors the component using runes to simplify the addition of new features. [NNS1-3793](https://dfinity.atlassian.net/browse/NNS1-3793) # Changes - Refactor `SnsWallet` to use runes. # Tests - All tests should pass as before since no logical changes were made. # Todos - [ ] Add an entry to the changelog (if necessary). Not necessary. [NNS1-3793]: https://dfinity.atlassian.net/browse/NNS1-3793?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit 800b135 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 08:12:15 2025 +0200 feat(portfolio): add alternative navigation controls to stacked cards (#6816) # Motivation The `StackedCards` component displays controls below the cards, allowing users to: 1. Identify their current card in the total. 2. Navigate between the cards. However, in scenarios with too many cards (projects), the dots may overflow. This PR introduces an alternative set of controls using buttons (previous and next) for card navigation. https://github.com/user-attachments/assets/cb4c518c-2f31-4d86-a4bf-73f74e1d6852 [NNS1-3641](https://dfinity.atlassian.net/browse/NNS1-3641) # Changes - Add alternative controls when there are too many cards. # Tests - Add a unit test for the new behavior. - Update existing tests to ensure that only one type of control is being rendered. - Tested in [devenv](https://qsgjb-riaaa-aaaaa-aaaga-cai.yhabib-ingress.devenv.dfinity.network/) # Todos - [ ] Add entry to changelog (if necessary). Not necessary [NNS1-3641]: https://dfinity.atlassian.net/browse/NNS1-3641?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit 83cdf18 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 07:51:14 2025 +0200 feat(api): add new method listSubaccounts (#6815) # Motivation We want to utilize the new function exposed by ic-js to [list subaccounts](dfinity/ic-js#906), enabling users to easily retrieve the list of all subaccounts for an ICRC canister. Note: This PR introduces a new canister object based on the NextGeneration Index canister. The existing one will be deprecated eventually, so a follow-up PR will migrate the existing methods to the new canister. [NNS1-3793](https://dfinity.atlassian.net/browse/NNS1-3793) # Changes - Add a new canister object for the Next Generation IndexCanister. - Add an API function to call `list_subaccounts`. # Tests - Add unit tests for the API function. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. [NNS1-3793]: https://dfinity.atlassian.net/browse/NNS1-3793?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit 03c1866 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 07:51:07 2025 +0200 refactor(portfolio): migrate page component to runes (#6812) # Motivation We aim to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR prepares the Portfolio page to introduce the pre-swap cards by migrating to runes. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Refactored the page to use runes. # Tests - Tests should pass as before since there were no logical changes. # Todos - [ ] Add an entry to the changelog (if necessary) Not necessary. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit cf918b6 Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Sun May 11 11:22:58 2025 +0200 bot: Update IC Cargo Dependencies to release-2025-05-08_03-21-base (#6817) # Motivation A newer release of the internet computer is available. We want to keep our Cargo dependencies up to date. # Changes * Ran `scripts/update-ic-cargo-deps` to update the Cargo.toml dependencies to the latest IC release. # Tests * See CI Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 81d3e7a Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Fri May 9 15:36:36 2025 +0200 feat(portfolio): implement pre-swap SNS proposal card (#6811) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This first PR introduces a new type of card for these cases. Note: There are some deviations from the design: there is no project link, as it is not always available, and we will reuse the same remaining time format as the other cards. Design:  Implementation:  [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - New `AdoptedProposalCard` component. # Tests - Unit tests for the new component. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
# Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR utilizes the new card introduced in #6811 to showcase adopted proposals for new projects. The order for displaying cards within the stacked card component is as follows: 1. Ongoing swaps 2. Proposals for new projects 3. Adopted proposals for new projects. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Update Portfolio page to expected a new prop for adopted proposals. - Sort adopted proposals based on the swap start. # Tests - Unit tests for the new prop in the page. - Unit tests for checking the sorting is applied to each group of cards. # Todos - [ ] Add entry to changelog (if necessary). Not yet. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
commit c0c245e Merge: 579c466 da7cf22 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Tue May 13 16:22:04 2025 +0200 Merge branch 'sns-topics/sns-topics-utils' of github.com:dfinity/nns-dapp into sns-topics/sns-topics-utils commit 579c466 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Tue May 13 16:21:06 2025 +0200 Remove comment commit da7cf22 Merge: 75d33f7 786f586 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 12:35:59 2025 +0200 Merge branch 'main' into sns-topics/sns-topics-utils commit 75d33f7 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Tue May 13 12:28:28 2025 +0200 refactor: use getSnsTopicsByProject for the store commit cd11fe0 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Tue May 13 12:28:05 2025 +0200 New getSnsTopicsByProject util commit 786f586 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Tue May 13 12:21:01 2025 +0200 feat(portfolio): load adopted SNS proposals for display (#6825) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR follows #6822 and loads adopted proposals, passing them to the Portfolio page for display in the stacked card set. https://github.com/user-attachments/assets/0969d4ab-764f-401e-8a74-c121fa35b9af [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Retrieve the list of adopted proposals and provide them to the Portfolio page. # Tests - Add a test to verify that the expected number of cards is displayed when passing one ongoing swap, one adopted SNS project proposal, and one open SNS project proposal. # Todos - [x] Add entry to changelog (if necessary). [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit b4deb7a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Tue May 13 07:01:42 2025 +0200 bot: Update sns_aggregator candid bindings (#6828) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 303c93a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Mon May 12 16:48:46 2025 +0000 bot: Update sns_aggregator candid bindings (#6790) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 8e085b0 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 16:57:28 2025 +0200 feat(portfolio): integrate adopted SNS proposal cards (#6822) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR utilizes the new card introduced in #6811 to showcase adopted proposals for new projects. The order for displaying cards within the stacked card component is as follows: 1. Ongoing swaps 2. Proposals for new projects 3. Adopted proposals for new projects. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Update Portfolio page to expected a new prop for adopted proposals. - Sort adopted proposals based on the swap start. # Tests - Unit tests for the new prop in the page. - Unit tests for checking the sorting is applied to each group of cards. # Todos - [ ] Add entry to changelog (if necessary). Not yet. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
commit aa4e6d9 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:03:03 2025 +0200 refactor(Sns topics): Extract logic from createSnsTopicsProjectStore (#6829) # Motivation Sometimes it's redundant to create a new store just to read a project's SNS topics. With this PR, we extract the store-reading and sorting logic from the derived store into a separate utility function. # Changes - Introduced new utility function: `getSnsTopicsByProject`. - Applied it in `createSnsTopicsProjectStore`. - Drive-by: renamed `SnsParametersStore` to `SnsTopicsStore` in the topic store. # Tests - Added. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 786f586 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Tue May 13 12:21:01 2025 +0200 feat(portfolio): load adopted SNS proposals for display (#6825) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR follows #6822 and loads adopted proposals, passing them to the Portfolio page for display in the stacked card set. https://github.com/user-attachments/assets/0969d4ab-764f-401e-8a74-c121fa35b9af [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Retrieve the list of adopted proposals and provide them to the Portfolio page. # Tests - Add a test to verify that the expected number of cards is displayed when passing one ongoing swap, one adopted SNS project proposal, and one open SNS project proposal. # Todos - [x] Add entry to changelog (if necessary). [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit b4deb7a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Tue May 13 07:01:42 2025 +0200 bot: Update sns_aggregator candid bindings (#6828) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 303c93a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Mon May 12 16:48:46 2025 +0000 bot: Update sns_aggregator candid bindings (#6790) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 8e085b0 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 16:57:28 2025 +0200 feat(portfolio): integrate adopted SNS proposal cards (#6822) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR utilizes the new card introduced in #6811 to showcase adopted proposals for new projects. The order for displaying cards within the stacked card component is as follows: 1. Ongoing swaps 2. Proposals for new projects 3. Adopted proposals for new projects. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Update Portfolio page to expected a new prop for adopted proposals. - Sort adopted proposals based on the swap start. # Tests - Unit tests for the new prop in the page. - Unit tests for checking the sorting is applied to each group of cards. # Todos - [ ] Add entry to changelog (if necessary). Not yet. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
commit 7ef47be Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:39:37 2025 +0200 Display vote delegation state for SNS neurons (#6824) # Motivation To improve the visibility of a user’s vote delegation state, it should be displayed directly in the neuron table by adding a new column: **“Vote Delegation”** (see screenshot). This PR introduces that column. [Draft MVP PR](https://github.com/dfinity/nns-dapp/pull/6802/files) [Demo](https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/)  # Changes - Added a calculated value to the optional `voteDelegationState` field in `TableNeuron`. - Rendered `NeuronVoteDelegationCell` in the neuron table when the data is available. # Tests - Updated unit tests. - Manually verified that users can view and sort neurons by vote delegation state. # Todos - [x] Add entry to changelog (if necessary). commit aa4e6d9 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:03:03 2025 +0200 refactor(Sns topics): Extract logic from createSnsTopicsProjectStore (#6829) # Motivation Sometimes it's redundant to create a new store just to read a project's SNS topics. With this PR, we extract the store-reading and sorting logic from the derived store into a separate utility function. # Changes - Introduced new utility function: `getSnsTopicsByProject`. - Applied it in `createSnsTopicsProjectStore`. - Drive-by: renamed `SnsParametersStore` to `SnsTopicsStore` in the topic store. # Tests - Added. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 786f586 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Tue May 13 12:21:01 2025 +0200 feat(portfolio): load adopted SNS proposals for display (#6825) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR follows #6822 and loads adopted proposals, passing them to the Portfolio page for display in the stacked card set. https://github.com/user-attachments/assets/0969d4ab-764f-401e-8a74-c121fa35b9af [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Retrieve the list of adopted proposals and provide them to the Portfolio page. # Tests - Add a test to verify that the expected number of cards is displayed when passing one ongoing swap, one adopted SNS project proposal, and one open SNS project proposal. # Todos - [x] Add entry to changelog (if necessary). [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit b4deb7a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Tue May 13 07:01:42 2025 +0200 bot: Update sns_aggregator candid bindings (#6828) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 303c93a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Mon May 12 16:48:46 2025 +0000 bot: Update sns_aggregator candid bindings (#6790) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 8e085b0 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 16:57:28 2025 +0200 feat(portfolio): integrate adopted SNS proposal cards (#6822) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR utilizes the new card introduced in #6811 to showcase adopted proposals for new projects. The order for displaying cards within the stacked card component is as follows: 1. Ongoing swaps 2. Proposals for new projects 3. Adopted proposals for new projects. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Update Portfolio page to expected a new prop for adopted proposals. - Sort adopted proposals based on the swap start. # Tests - Unit tests for the new prop in the page. - Unit tests for checking the sorting is applied to each group of cards. # Todos - [ ] Add entry to changelog (if necessary). Not yet. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
commit 78d91fb Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Wed May 14 18:50:19 2025 +0200 Make voteDelegationState not optional commit b9cfd51 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Wed May 14 17:35:16 2025 +0200 changelog commit fb251cd Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Wed May 14 16:53:56 2025 +0200 screenshots commit db64ec2 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Wed May 14 14:18:11 2025 +0200 cleanup commit 2a223aa Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Wed May 14 13:34:10 2025 +0200 Test delegation state in tableNeuronsFromNeuronInfos commit ef27b21 Merge: d81b5e4 7ef47be Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Wed May 14 13:11:29 2025 +0200 Merge branch 'main' into sns-topics/getNnsNeuronVoteDelegationState-util commit 7ef47be Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:39:37 2025 +0200 Display vote delegation state for SNS neurons (#6824) # Motivation To improve the visibility of a user’s vote delegation state, it should be displayed directly in the neuron table by adding a new column: **“Vote Delegation”** (see screenshot). This PR introduces that column. [Draft MVP PR](https://github.com/dfinity/nns-dapp/pull/6802/files) [Demo](https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/)  # Changes - Added a calculated value to the optional `voteDelegationState` field in `TableNeuron`. - Rendered `NeuronVoteDelegationCell` in the neuron table when the data is available. # Tests - Updated unit tests. - Manually verified that users can view and sort neurons by vote delegation state. # Todos - [x] Add entry to changelog (if necessary). commit aa4e6d9 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:03:03 2025 +0200 refactor(Sns topics): Extract logic from createSnsTopicsProjectStore (#6829) # Motivation Sometimes it's redundant to create a new store just to read a project's SNS topics. With this PR, we extract the store-reading and sorting logic from the derived store into a separate utility function. # Changes - Introduced new utility function: `getSnsTopicsByProject`. - Applied it in `createSnsTopicsProjectStore`. - Drive-by: renamed `SnsParametersStore` to `SnsTopicsStore` in the topic store. # Tests - Added. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 786f586 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Tue May 13 12:21:01 2025 +0200 feat(portfolio): load adopted SNS proposals for display (#6825) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR follows #6822 and loads adopted proposals, passing them to the Portfolio page for display in the stacked card set. https://github.com/user-attachments/assets/0969d4ab-764f-401e-8a74-c121fa35b9af [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Retrieve the list of adopted proposals and provide them to the Portfolio page. # Tests - Add a test to verify that the expected number of cards is displayed when passing one ongoing swap, one adopted SNS project proposal, and one open SNS project proposal. # Todos - [x] Add entry to changelog (if necessary). [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit b4deb7a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Tue May 13 07:01:42 2025 +0200 bot: Update sns_aggregator candid bindings (#6828) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 303c93a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Mon May 12 16:48:46 2025 +0000 bot: Update sns_aggregator candid bindings (#6790) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 8e085b0 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 16:57:28 2025 +0200 feat(portfolio): integrate adopted SNS proposal cards (#6822) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR utilizes the new card introduced in #6811 to showcase adopted proposals for new projects. The order for displaying cards within the stacked card component is as follows: 1. Ongoing swaps 2. Proposals for new projects 3. Adopted proposals for new projects. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Update Portfolio page to expected a new prop for adopted proposals. - Sort adopted proposals based on the swap start. # Tests - Unit tests for the new prop in the page. - Unit tests for checking the sorting is applied to each group of cards. # Todos - [ ] Add entry to changelog (if necessary). Not yet. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit d81b5e4 Author: Max Strasinsky <maksims.strasinskis@dfinity.org> Date: Mon May 12 14:54:47 2025 +0200 New getNnsNeuronVoteDelegationState util
commit 8f512da Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Thu May 15 13:30:12 2025 +0200 feat(analytics): track ICRC subaccount recovery usage (#6835) # Motivation #6827 introduces a method for recovering tokens from an ICRC subaccount. This feature is experimental, as the nns-dapp does not support ICRC subaccounts. We want to gauge how many people are using this to learn more about ICRC subaccounts. # Changes - Expose a method for tracking events in the analytics service. - Emit an event when `recover` is called with the correct setup. # Tests - Added unit test to the new events logic. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 7f92e73 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Thu May 15 12:20:50 2025 +0200 feat(wallet): add experimental ICRC subaccount recovery tools (#6827) # Motivation The nns-dapp currently does not support subaccounts for ICRC canisters. However, a user utilizing the CLI or other tools may accidentally send tokens to these subaccounts and then be unable to interact with them through the nns-dapp. This PR introduces a set of `experimental` functions to the window object, enabling users to easily recover these tokens by emptying the subaccounts and transferring the tokens to their main account, which they manage through the nns 9E81 -dapp. https://github.com/user-attachments/assets/6b2d5838-8a76-4f19-9969-a88d66b45f4e # Changes - The `SnsWallet` page loads a set of functions to the window object for managing ICRC subaccounts. - `__experimental_icrc.help()`: Displays help information for available commands. - `__experimental_icrc.listSubaccounts()`: Lists subaccounts for the current project. - `__experimental_icrc.getBalance()`: Retrieves the balance for a specified subaccount. - `__experimental_icrc.recover()`: Transfers all tokens from a specified subaccount to the main account. # Tests - Manually tested by sending tokens from the main account to a subaccount using the commented method `__testSendTokensToSubaccount`, and then recovering them back to my main account. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 2582362 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Thu May 15 11:27:12 2025 +0200 Display no delegation state (#6833) # Motivation When no voting delegation is set for a neuron, the corresponding cell in the table appears empty — which can look like a broken or missing UI element. This is actually the default state for users who haven’t followed any topics. To improve clarity, this PR displays a "-" symbol in such cases, along with a descriptive tooltip. Additionally, to ensure consistency across all states, the tooltip labels for the other delegation states have been updated as well. **Before:** <img width="66%" alt="image" src="https://github.com/user-attachments/assets/def33a01-2bf7-4e60-a8cf-5686904f0168" /> **After:** <img width="66%" alt="image" src="https://github.com/user-attachments/assets/e45bedfc-e46c-4767-a298-34254f9fb135" /> # Changes - Display a dash (`-`) in the cell when no voting delegation is set. - Updated tooltip labels for all delegation states to ensure consistent wording. # Tests - Updated. # Todos - [ ] Add entry to changelog (if necessary). Not necessary, since the new column is not yet published. commit c502ed8 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Thu May 15 09:52:31 2025 +0200 Display vote delegation state in NNS neurons table (#6826) # Motivation To improve the visibility of a user’s vote delegation state, it should be displayed directly in the neuron table by adding a new column: “Vote Delegation”. This PR introduces a new function to calculate NNS neuron vote delegation state. # Changes - New `getNnsNeuronVoteDelegationState` util. - Add `voteDelegationState` field for NNS version of TableNeuron which automatically makes the column to appear in the NNS neurons table. - Make `voteDelegationState` not optional, since both SNS and NNS tables now supports it. - Update screenshots because of new field. # Tests - Tested `getNnsNeuronVoteDelegationState` util. - Tested that the NNS version of `TableNeuron` contains `voteDelegationState`. # Todos - [x] Add entry to changelog (if necessary). commit 7ef47be Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:39:37 2025 +0200 Display vote delegation state for SNS neurons (#6824) # Motivation To improve the visibility of a user’s vote delegation state, it should be displayed directly in the neuron table by adding a new column: **“Vote Delegation”** (see screenshot). This PR introduces that column. [Draft MVP PR](https://github.com/dfinity/nns-dapp/pull/6802/files) [Demo](https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/)  # Changes - Added a calculated value to the optional `voteDelegationState` field in `TableNeuron`. - Rendered `NeuronVoteDelegationCell` in the neuron table when the data is available. # Tests - Updated unit tests. - Manually verified that users can view and sort neurons by vote delegation state. # Todos - [x] Add entry to changelog (if necessary). commit aa4e6d9 Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Tue May 13 17:03:03 2025 +0200 refactor(Sns topics): Extract logic from createSnsTopicsProjectStore (#6829) # Motivation Sometimes it's redundant to create a new store just to read a project's SNS topics. With this PR, we extract the store-reading and sorting logic from the derived store into a separate utility function. # Changes - Introduced new utility function: `getSnsTopicsByProject`. - Applied it in `createSnsTopicsProjectStore`. - Drive-by: renamed `SnsParametersStore` to `SnsTopicsStore` in the topic store. # Tests - Added. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 786f586 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Tue May 13 12:21:01 2025 +0200 feat(portfolio): load adopted SNS proposals for display (#6825) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR follows #6822 and loads adopted proposals, passing them to the Portfolio page for display in the stacked card set. https://github.com/user-attachments/assets/0969d4ab-764f-401e-8a74-c121fa35b9af [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Retrieve the list of adopted proposals and provide them to the Portfolio page. # Tests - Add a test to verify that the expected number of cards is displayed when passing one ongoing swap, one adopted SNS project proposal, and one open SNS project proposal. # Todos - [x] Add entry to changelog (if necessary). [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ commit b4deb7a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Tue May 13 07:01:42 2025 +0200 bot: Update sns_aggregator candid bindings (#6828) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 303c93a Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com> Date: Mon May 12 16:48:46 2025 +0000 bot: Update sns_aggregator candid bindings (#6790) # Motivation A newer release of the internet computer is available. We would like to parse all the latest SNS data. To do so, we update the candid interfaces for the SNS aggregator. Even with no changes, just updating the reference is good practice. # Changes * Update the version of `IC_COMMIT_FOR_SNS_AGGREGATOR` specified in `config.json`. * Updated the `sns_aggregator` candid files to the versions in that commit. * Updated the Rust code derived from `.did` files in the aggregator. # Tests - [ ] Please check the API updates for any breaking changes that affect our code. Breaking changes are: * New mandatory fields * Removing mandatory fields * Renaming fields * Changing the type of a field * Adding new variants Co-authored-by: gix-bot <gix-bot@users.noreply.github.com> commit 8e085b0 Author: Yusef Habib <yusef.fernandez@dfinity.org> Date: Mon May 12 16:57:28 2025 +0200 feat(portfolio): integrate adopted SNS proposal cards (#6822) # Motivation We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This PR utilizes the new card introduced in #6811 to showcase adopted proposals for new projects. The order for displaying cards within the stacked card component is as follows: 1. Ongoing swaps 2. Proposals for new projects 3. Adopted proposals for new projects. [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639) # Changes - Update Portfolio page to expected a new prop for adopted proposals. - Sort adopted proposals based on the swap start. # Tests - Unit tests for the new prop in the page. - Unit tests for checking the sorting is applied to each group of cards. # Todos - [ ] Add entry to changelog (if necessary). Not yet. [NNS1-3639]: https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Motivation
We want to display proposals for new SNS projects on the Portfolio page that were approved before the swap begins. This first PR introduces a new type of card for these cases.
Note: There are some deviations from the design: there is no project link, as it is not always available, and we will reuse the same remaining time format as the other cards.
Design:
Implementation:
NNS1-3639
Changes
AdoptedProposalCard
component.Tests
Todos
Not necessary.