Closed AMIRKHANEF closed 1 month ago
The recent changes enhance the code clarity, type safety, and user interface of the delegation components within the Polkagate extension. Key improvements include restructuring imports, refining function signatures, and introducing a new advanced options component. Additionally, the user experience is improved with better handling of optional properties and clearer UI messages, addressing several user feedback points.
Files | Change Summary |
---|---|
packages/extension-polkagate/src/fullscreen/governance/delegate/DelegationDetails.tsx packages/extension-polkagate/src/fullscreen/governance/delegate/Review.tsx |
Adjusted import statements, improved function signatures for readability, and enhanced type safety by avoiding non-null assertions. |
packages/extension-polkagate/src/fullscreen/governance/delegate/delegate/Delegate.tsx |
Added EditAdvance subcomponent for advanced delegation options, improved state management, and simplified access to the API object. |
packages/extension-polkagate/src/fullscreen/governance/delegate/index.tsx |
Enhanced optional chaining for better error resilience and added conditional rendering for delegation status information. |
packages/extension-polkagate/src/fullscreen/governance/delegate/partial/Confirmation.tsx |
Rearranged function parameters for clarity and modified button properties for improved UI layout. |
packages/extension/polkagate/src/hooks/useTracks.ts |
Changed return type to a defined interface for better type clarity, removed unnecessary state, and modified property access within the API object. |
packages/extension/public/locales/en/translation.json |
Added new translation entries to enhance localization support for the user interface. |
sequenceDiagram
participant User
participant DelegateVote
participant EditAdvance
User->>DelegateVote: Click on advanced options
DelegateVote->>EditAdvance: Show/hide advanced options
EditAdvance-->>DelegateVote: Update display based on state
Objective | Addressed | Explanation |
---|---|---|
Click on locked amount should enable next button (Issue #1494) | ❌ | The changes do not address button enabling functionality. |
Selecting tracks should not scroll to top (Issue #1494) | ❓ | It's unclear if this behavior is modified in the changes. |
Confirmation page behavior when using proxy (Issue #1494) | ✅ | Adjustments improve clarity and user flow for confirmation. |
🐇 In the code, we've hopped and played,
Refined our paths, and clarity laid.
With types more safe, the UI gleams bright,
In delegation’s dance, everything feels right!
So here’s to the changes, let's celebrate,
For a joyful code journey, we can't wait! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Works Done
Close: #1494
Summary by CodeRabbit
New Features
Bug Fixes
Style
Refactor