-
Notifications
You must be signed in to change notification settings - Fork 103
Governance Revamp UI fixes #4448
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
base: develop
Are you sure you want to change the base?
Conversation
packages/yoroi-extension/app/UI/features/governace/useCases/GovernanceOptions/DRepOptions.tsx
Show resolved
Hide resolved
SorinC6
left a comment
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.
/check
packages/yoroi-extension/app/UI/features/governace/useCases/GovernanceOptions/DRepOptions.tsx
Show resolved
Hide resolved
...yoroi-extension/app/UI/features/governace/useCases/GovernanceStatus/GovernanceStatusCard.tsx
Show resolved
Hide resolved
...-extension/app/UI/features/governace/useCases/GovernanceStatusRevamp/SkeletonCardLoaders.tsx
Outdated
Show resolved
Hide resolved
...yoroi-extension/app/UI/features/governace/useCases/GovernanceStatus/GovernanceStatusCard.tsx
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.
Bug: Unreachable code for primary variant delegated styling
The styled component ActionCardContainer contains unreachable code. The condition if (isCardDelegated && variant === 'primary') at line 204 will never execute because the previous condition if (isCardDelegated) at line 197 already returns when isCardDelegated is true. If the intent was to apply different styling for the primary variant when delegated, this logic is broken and the special primary+delegated styling is never applied.
packages/yoroi-extension/app/UI/features/governace/useCases/GovernanceStatusRevamp/DrepOptionsCard.tsx#L203-L209
Lines 203 to 209 in 76bb2ef
| if (isCardDelegated && variant === 'primary') { | |
| return { | |
| ...base, | |
| background: theme.palette.ds.bg_gradient_2, | |
| }; | |
| } |
packages/yoroi-extension/app/UI/features/governace/useCases/GovernanceStatusRevamp/DrepOptionsCard.tsx#L196-L202
Lines 196 to 202 in 76bb2ef
| } | |
| if (isCardDelegated) { | |
| return { | |
| ...base, | |
| background: theme.palette.ds.bg_gradient_2, | |
| }; | |
| } |
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.
Bug: Sidebar navigation uses non-existent governance route
The sidebar governance entry uses a hardcoded route /governance-status, but the route configuration was changed to define ROUTES.GOVERNANCE.ROOT as /governance. Clicking the governance sidebar link will navigate to a non-existent route since the Routes.js now defines the governance pages under /governance, not /governance-status.
packages/yoroi-extension/app/stores/stateless/sidebarCategories.js#L126-L127
yoroi-frontend/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js
Lines 126 to 127 in b227d94
| className: 'governance', | |
| route: '/governance-status', |
...tension/app/UI/features/governace/useCases/GovernanceStatusRevamp/GovernanceStatusRevamp.tsx
Outdated
Show resolved
Hide resolved
packages/yoroi-extension/app/UI/features/governace/useCases/GovernanceOptions/DRepOptions.tsx
Show resolved
Hide resolved
SorinC6
left a comment
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.
/check
packages/yoroi-extension/app/stores/stateless/sidebarCategories.js
Outdated
Show resolved
Hide resolved
SorinC6
left a comment
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.
/check
packages/yoroi-extension/app/UI/features/governace/useCases/GovernanceOptions/DRepOptions.tsx
Show resolved
Hide resolved
...ges/yoroi-extension/app/UI/features/governace/useCases/GovernanceStatus/GovernanceStatus.tsx
Show resolved
Hide resolved
...ges/yoroi-extension/app/UI/features/governace/useCases/GovernanceStatus/GovernanceStatus.tsx
Show resolved
Hide resolved
SorinC6
left a comment
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.
/check
Note
Unifies governance routing under
ROUTES.GOVERNANCE, adds skeleton loaders, and introduces Yoroi Testnet DRep with UI and i18n updates.ROUTES.GOVERNANCE.{ROOT,OPTIONS}; remove oldROUTES.GovernanceandGOVERNANCE_REVAMPpaths and pages (delegation form, submitted/failed, old selection/revamp).ROUTES.GOVERNANCE.StatusSkeletonScreen,OptionsSkeletonScreenand integrate into status/options screens.GovernanceStatusandGovernanceStatusCard; refactor options toDRepOptions/DrepOptionsCardwith voting record link.YOROI_DREP_ID_TESTNET; conditionally use testnet/mainnet DRep ID across governance flows (status card, options, choose DRep modal, banner).yoroiTestnetDRep,delegatingInGovernance).onViewDetails; adjust event capture for new route key.Written by Cursor Bugbot for commit c41eb32. This will update automatically on new commits. Configure here.