-
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.
Fixed the display of actionable proposals page when a single Sns fails (
#5074) # Motivation Currently, when loading actionable proposals for a single Sns fails, the actionable proposals page displays a loading state. This happens because the loading store only compares successfully loaded Snses and ignores failures. This PR addresses the issue by modifying the `actionableProposalsLoadedStore` to account for failed responses. Note: the proposals page for a failed SNS remains unchanged and displays the loading state indefinitely. # Changes - New `failedActionableSnsesStore`. - Use it in `actionableSnsProposalsByUniverseStore` to calculate the loading state. # Tests - `failedActionableSnsesStore` - `actionableProposalsLoadedStore` uses `failedActionableSnsesStore`. - `loadActionableSnsProposals` updates `failedActionableSnsesStore`. Tested locally by simulating the failing call with adding `throw new Error()` inside the [queryProposals](https://github.com/dfinity/nns-dapp/blob/02ceec03e01235b6926004a619eed1a342882bb9/frontend/src/lib/api/sns-governance.api.ts#L550). # Todos - [x] Add entry to changelog (if necessary). # Screenshots ## Before <img width="1095" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/bb2bd128-0e1e-4fa9-acca-bb7b36d8188d"> ## After <img width="1099" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/904fdd0c-cc0f-4330-b28a-3db4a82b35cf"> ## Failed Sns proposals page (w/o changes) <img width="905" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/eecb458b-2993-4e30-8b72-616ed3157665">
- Loading branch information
1 parent
8330987
commit d65b905
Showing
7 changed files
with
202 additions
and
14 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
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