-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor experimental dropdown menu usages to latest version (#55625)
* First attempt at refactoring the view actions dropdown * note * Force all menus to have "left-start" placement. This helps having a more coherent keyboard navigation behaviour * Port changes missed in rebase due to file renames * ViewActions: remove unnecessary icon management * ViewTable: remove SubMenu, SubMenuTrigger, and use RadioItem * Use Ariakit versions in FilterSummary as well * AddFilter: migrate to Ariakit * Update sort behavior to match RadioItem (cannot be unset once set) * Remove old add-filter file * Use ariakit components * remove submenu trigger * DropdownMenuItem: substitute onSelect by onClick * Remove old filter-summary file * FilterSummary: use the ariakit versions * Substitute trigger by menuitem * DropdownMenuItem: substitute onSelect by onClick * Remove old view-table file * ViewTable: update to ariakit * Remove trigger * DropdownMenuItem: substitute onSelect by onClick * Remove DropdownSubMenu in favor of DropdownMenu across dataviews package * Remove suffix chevronrightsmall across dataviews * Fix rebase for view-actions * Remove unnecessary label * Use DropdownMenuItemLabel component * Hide suffix contents to assistive tech * Refactor conditions to use radio menu items * Hide suffix contents to assistive technology * Fix checked check * Remove unnecessary preventDefault() calls * Improve isActive check, remove extra icons, remove extra preventDefault(), add import * Fix label not appearing * Use filter name instead of field, as done for other menus in the file * Rename isActive to isChecked * Remove unneeded radio semantics from hide button * Refactor to DropdownMenuRadioItem * Refactor to DrodownMenuRadioItem * Refactor OPERATORS * Refactor filter summery operators to radio items * Fix OPERATORS object && checks * Remove comment * Refactor operators code in view table * Add custom spacing for custom menu radio items * Remove comment * Replace preventDefault with hideOnClick={false} * Move OPERATORS object to common constants file * Use the `onChange` event instead of `onClick` on radio items + the event value * Extract custom dropdown radio item implementation * Swap actual menu radio items with custom implementation * Fix warning when onChange prop is not defined * Add a few min widths to dropdowns to avoid jumping and for better while space balance * Extract sorting directions to constants * Refactor more code to use the OPERATORS constant instead of individual operators * Remove un-needed workaround, now that Truncate has been updated * Remove hardcoded left placements * Use dot icon instead of check for custom radios * Use real DropdownMenuRadioItem where possible * Fix e2e test * Sort dependencies * Update package.lock --------- Co-authored-by: André Maneiro <[email protected]>
- Loading branch information
Showing
10 changed files
with
436 additions
and
471 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.