Closed Nick-1979 closed 1 week ago
[!CAUTION]
Review failed
The pull request is closed.
The pull request introduces significant updates to the Convictions
component and related files, enhancing functionality and styling. Key changes include the addition of a Slider
component and new imports from @mui/material
, a revised useConvictionOptions
hook, and updates to the Cast
component to improve voting logic. Theme files for both light and dark modes have been modified to include new color properties. Additionally, new components like DraggableModalWithTitle
and ModalTitleWithDrag
have been introduced, collectively aiming to streamline user interactions and improve the maintainability of the codebase.
File Path | Change Summary |
---|---|
packages/extension-polkagate/src/components/Convictions.tsx |
Added imports for Slider , Typography , and useTheme . Updated function signature to include DEFAULT_CONVICTION . Modified onChangeConviction logic and introduced new state variables for max and min values. Replaced Select with Slider and updated return structure. |
packages/extension-polkagate/src/fullscreen/governance/post/castVote/Cast.tsx |
Removed import for Vote type. Imported DEFAULT_CONVICTION from Convictions . Updated props and internal logic for previousVote . Introduced useInfo hook for state management and refined rendering logic for voting buttons. |
packages/extension-polkagate/src/hooks/useConvictionOptions.ts |
Changed return type to DropdownOption[] . Removed t: TFunction parameter. Simplified state management and adjusted property access for conviction data. |
packages/extension-polkagate/src/themes/dark.ts |
Expanded Palette and PaletteOptions interfaces with new properties. Updated success property in darkTheme to include a light variant. |
packages/extension-polkagate/src/themes/light.ts |
Similar updates as in dark.ts , adding new properties to Palette and PaletteOptions , and updating success property in lightTheme to include a light variant. |
packages/extension-polkagate/src/fullscreen/governance/components/DraggableModalWithTitle.tsx |
Introduced a new component for a draggable modal with a title, supporting various props for customization and drag handling. |
packages/extension-polkagate/src/fullscreen/governance/post/castVote/index.tsx |
Replaced DraggableModal with DraggableModalWithTitle , integrating title management and adjusting the modal's close logic. |
packages/extension-polkagate/src/fullscreen/partials/ModalTitleWithDrag.tsx |
Added a new component for a draggable title bar in modals, supporting drag events and conditional rendering of icons. |
packages/extension-polkagate/src/fullscreen/governance/delegate/index.tsx |
Replaced DraggableModal with DraggableModalWithTitle , enhancing modal functionality with title and icon props. |
packages/extension/polkagate/src/fullscreen/governance/delegate/delegate/Delegate.tsx |
Adjusted layout and font sizes for Convictions component, refined state management in useEffect , and simplified event handling functions. |
packages/extension/public/locales/en/translation.json |
Added new localization keys for token locking and window dragging instructions. |
Comment
component may relate to the Convictions
component as both involve handling voting information.Toolbar
may share UI elements or styling considerations with the changes made in this PR.Divider
colors could impact the visual presentation of the Convictions
component, aligning with the UI enhancements in the main PR.Convictions
component, ensuring consistent styling across the application.SupportUs
modal could be relevant as it may interact with the conviction options and user engagement in the governance process.Convictions
component.🐰 In the land of code, where changes abound,
A slider now dances, with options profound.
Convictions are clear, with themes that delight,
In light and in dark, they shine ever bright.
So hop along, friends, let’s test and explore,
For in this new world, there’s always much more! 🌟
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?
Summary by CodeRabbit
Release Notes
New Features
Convictions
component with a new slider for selecting conviction levels, improving user interaction.DraggableModalWithTitle
component for a more user-friendly modal experience.Bug Fixes
Documentation
Style
Delegate
component for improved readability.