-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actionable universe navigation (#4905)
# Motivation The `Actionable Proposals` page should be shown when the user clicks `Voting` in the main navigation or when the `Actionable Proposals` card in the universe navigation is clicked. With this PR, we add the card to the universe navigation and update the main navigation link to navigate to “Actionable Proposals” when the user is logged-in. There should be no actionable proposals visible for logged-out users. # Changes - Update main menu proposals link to navigate to "Actionable proposals". - Add empty component for "Actionable proposals" page. - Add "Actionable proposals" card to `SelectUniverseList` (Desktop. The card is always visible with the separator). - Add "Actionable proposals" card to `SelectUniverseDropdown` (Mobile. The card is shown only when selected, w/o the separator). # Tests - Add `testId` param to Separator component. - Add `ENABLE_ACTIONABLE_TAB` to `vites.setup` to rewrite it in the unit tests w/o a error. - Update mock page store to support boolean parameters values (for `actionable`). - Add test id to the `Separator` component. - Add PO for `ActionableProposals` empty page. - Tested manually that the actionable page is reachable. - Should display "Actionable proposals" card in # Todos - [ ] Add entry to changelog (if necessary). Not yet # Screenshot | Mobile | Desktop | |--------|--------| | <img width="269" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/fd98fbcb-3d53-4da5-98c5-bebfb32c492d"> | <img width="616" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/3f3b9444-66db-42b7-bebd-c3e163ac3e89"> |
- Loading branch information
1 parent
ec81b0a
commit a415872
Showing
20 changed files
with
308 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
frontend/src/lib/components/universe/SelectUniverseNavList.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<script lang="ts"> | ||
import SelectUniverseList from "$lib/components/universe/SelectUniverseList.svelte"; | ||
import { goto } from "$app/navigation"; | ||
import { buildSwitchUniverseUrl } from "$lib/utils/navigation.utils"; | ||
import { | ||
ACTIONABLE_PROPOSALS_URL, | ||
buildSwitchUniverseUrl, | ||
} from "$lib/utils/navigation.utils"; | ||
</script> | ||
|
||
<SelectUniverseList | ||
on:nnsSelectUniverse={async ({ detail }) => | ||
await goto(buildSwitchUniverseUrl(detail))} | ||
on:nnsSelectActionable={async () => await goto(ACTIONABLE_PROPOSALS_URL)} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script lang="ts"> | ||
import TestIdWrapper from "$lib/components/common/TestIdWrapper.svelte"; | ||
</script> | ||
|
||
<TestIdWrapper testId="actionable-proposals-component"> | ||
<h1>Under construction</h1> | ||
</TestIdWrapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.