feat(ViewSwitch): add reusable ViewSwitch component#1666
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new ViewSwitch component to toggle between grid and table view modes. The review feedback highlights a UX bug where the tooltips are inverted relative to the active view mode, an accessibility anti-pattern where the tooltip wraps the inner icon instead of the interactive IconButton, and hardcoded UI strings that should be exposed as props to support internationalization.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Ayush Kannaujiya <ayushkannaujiya@gmail.com>
72853e2 to
64fea16
Compare
KhushamBansal
left a comment
There was a problem hiding this comment.
@iyush05 Have you tested it locally? If so, can you please attach a demo video?
|
hi @KhushamBansal i have added the demo video in the pr description please review it. |
|
hi @KhushamBansal i have updated the demo video please review it |
Notes for Reviewers
This PR fixes #1663
Description
Add a reusable
ViewSwitchcomponent to SistentChanges:
src/custom/ViewSwitch/ViewSwitch.tsx- the component withViewModetype andViewSwitchPropsinterfacesrc/custom/ViewSwitch/index.ts- barrel exportsrc/custom/index.tsx- registeredViewSwitch,ViewSwitchProps, andViewModeexportsScreenshot & Demo
2026-06-30.19-12-35.mov
PASS src/__testing__/useWindowDimensions.test.tsx PASS src/__testing__/hideRootObjectTitle.test.tsx PASS src/__testing__/RJSFFormWrapper.test.tsx PASS src/__testing__/Icons.test.tsx Test Suites: 14 passed, 14 total Tests: 303 passed, 303 total Snapshots: 0 total Time: 2.664 s, estimated 3 s Ran all test suites.Signed commits