ENG-180: Migrate Chakra UI Menu components to Ant Design Dropdown/Popover#7681
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile SummaryThis PR completes the migration of all Chakra UI Note: This PR changes 32 files, which exceeds the project policy of a maximum of 15 files per PR (rule 32b2f192). The large footprint is understandable given the breadth of the Chakra-to-Ant migration, but it may warrant splitting in future migration PRs. Key changes and issues found:
Confidence Score: 3/5
Important Files Changed
|
.../admin-ui/src/features/datastore-connections/system_portal_config/ConnectionListDropdown.tsx
Outdated
Show resolved
Hide resolved
.../admin-ui/src/features/datastore-connections/system_portal_config/ConnectionListDropdown.tsx
Outdated
Show resolved
Hide resolved
.../admin-ui/src/features/datastore-connections/system_portal_config/ConnectionListDropdown.tsx
Outdated
Show resolved
Hide resolved
| import type { DropdownProps } from "antd/lib"; | ||
| import { Dropdown as AntDropdown } from "antd/lib"; | ||
|
|
||
| const CustomDropdownBase = ({ |
There was a problem hiding this comment.
May want to add a generic story for a new HOC.
There was a problem hiding this comment.
There's already a Dropdown.stories.tsx in components/navigation/ that imports Dropdown from the fidesui barrel export, which now points to CustomDropdown. So the existing story already covers this HOC.
Replace Chakra Menu usage with Ant Design Dropdown in catalog overflow menus (datasets, staged resources, systems) and VendorSelector compass button. Introduce CustomDropdown wrapper in fidesui that re-exports Ant Dropdown with custom content support. Remove unused VendorSelect.tsx and ToggleDictSuggestions.tsx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate group-by and more-options Chakra Menu components to Ant Dropdown in DatamapReportTable. Also update Phase 1 dropdown items and Cypress tests to use selectAntDropdownOption instead of data-testid spans. - Replace Chakra Menu imports with Dropdown, CheckOutlined, Icons - Group-by menu: items array with CheckOutlined visibility toggle - More menu: items array with bottomRight placement - Add getAntDropdownOverlay Cypress command for portal overlays - Update all Cypress tests to use selectAntDropdownOption - Remove unnecessary data-testid spans from dropdown item labels - Swap ChakraChevronDownIcon to Icons.ChevronDown in CustomReportTemplates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DeleteConnectionModal and DisableConnectionModal had unused MenuItem branches that no consumer exercised. Remove them along with the showMenu and isSwitch props. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Chakra Menu with Ant Popover for DataCategoryDropdown, ColumnDropdown, and ConnectionListDropdown. Update Cypress tests to remove [role="menuitem"] selectors that no longer apply. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These Chakra-based components in fidesui were superseded by the admin-ui versions migrated to Ant Design in the previous commit. Inline the ColumnMetadata type into SystemsCheckboxTable to fix the broken import from the deleted column-dropdown directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace autoFocus with afterOpenChange on the Popover to programmatically focus the search input on every open, not just the first (Ant Design keeps popover content mounted after first open, so autoFocus only fires once). Also remove unused className overrides on the trigger Button. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tal_config/ConnectionListDropdown.tsx Co-authored-by: Karolis Krulis <karolis@ethyca.com>
546bda1 to
90aa6a1
Compare
Ticket ENG-180
Description Of Changes
Migrate all Chakra UI
Menu/MenuButton/MenuList/MenuItemusage in admin-ui to Ant DesignDropdown(for action menus) andPopover(for custom content dropdowns like search/filter panels). This is part of the ongoing Chakra-to-Ant migration effort.Key changes:
CustomDropdownwrapper in fidesui that defaultstriggerto["click"](Ant defaults to hover)Dropdownwithmenu={{ items }}patternPopoverwith controlledopen/onOpenChangestateVendorSelect.tsx(278 lines, superseded byVendorSelector.tsx),ToggleDictSuggestions.tsx(84 lines, unused)ColumnDropdown,DataCategoryDropdown(admin-ui has its own copies)selectAntDropdownOptionand simplified selectors (no more[role="menuitem"])30 files changed, +450 / -1135 lines (net -685 lines)
Code Changes
clients/fidesui/src/hoc/CustomDropdown.tsx- New wrapper defaulting Ant Dropdown trigger to clickclients/fidesui/src/index.ts- ExportCustomDropdownasDropdown, remove unused component exportsclients/fidesui/src/components/chakra-base/column-dropdown/- Deleted (unused)clients/fidesui/src/components/chakra-base/data-category-dropdown/- Deleted (unused)clients/fidesui/src/components/chakra-base/systems-checkbox-table/SystemsCheckboxTable.tsx- InlineColumnMetadatatypeclients/admin-ui/src/features/data-catalog/staged-resources/CatalogResourceOverflowMenu.tsx- Menu to Dropdownclients/admin-ui/src/features/data-catalog/systems/SystemActionCell.tsx- Menu to Dropdownclients/admin-ui/src/features/data-catalog/datasets/useCatalogDatasetColumns.tsx- Menu to Dropdownclients/admin-ui/src/features/system/VendorSelector.tsx- CompassButton Menu to Dropdownclients/admin-ui/src/features/system/VendorSelect.tsx- Deleted (dead code)clients/admin-ui/src/features/system/dictionary-form/ToggleDictSuggestions.tsx- Deleted (unused)clients/admin-ui/src/features/common/custom-reports/CustomReportTemplates.tsx- Chakra icon to Carbon iconclients/admin-ui/src/features/datamap/reporting/DatamapReportTable.tsx- Group-by menu and More menu to Dropdownclients/admin-ui/src/features/datastore-connections/DeleteConnectionModal.tsx- Remove dead MenuItem code pathclients/admin-ui/src/features/datastore-connections/DisableConnectionModal.tsx- Remove dead MenuItem code pathclients/admin-ui/src/features/dataset/DataCategoryDropdown.tsx- Menu to Popoverclients/admin-ui/src/features/common/ColumnDropdown.tsx- Menu to Popoverclients/admin-ui/src/features/datastore-connections/system_portal_config/ConnectionListDropdown.tsx- Menu to Popoverclients/admin-ui/cypress/e2e/data-catalog.cy.ts- Update selectors for Dropdownclients/admin-ui/cypress/e2e/datamap-report.cy.ts- Update selectors for Dropdownclients/admin-ui/cypress/e2e/system-integrations.cy.ts- Update selectors for Popoverclients/admin-ui/cypress/e2e/system-integrations-plus.cy.ts- Update selectors for Popoverclients/admin-ui/cypress/support/ant-support.ts- AddgetAntDropdownOverlayhelperSteps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdated