Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transitionDuration 0 as defaultProp in theme for both popovers and menus #3494

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Feb 1, 2023

Currently, there is a single transitionDuration 0 on the @jbrowse/core/ui/Menu component which makes it popup fast without animation. This PR goes a bit further and applies it to all popovers and menus via defaultProps in the theme. I noticed this because the CascadingMenu (a special type of menu only used on trackMenus right now) had the slowish animation, so I made it faster here.

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Feb 1, 2023
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Feb 1, 2023
@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Merging #3494 (e07c518) into main (3bddafb) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3494   +/-   ##
=======================================
  Coverage   61.09%   61.09%           
=======================================
  Files         833      833           
  Lines       29698    29698           
  Branches     7088     7088           
=======================================
  Hits        18144    18144           
  Misses      11392    11392           
  Partials      162      162           
Impacted Files Coverage Δ
packages/core/ui/DropDownMenu.tsx 100.00% <ø> (ø)
packages/core/ui/Menu.tsx 62.14% <ø> (ø)
packages/core/ui/theme.ts 84.61% <ø> (ø)
products/jbrowse-web/src/util.ts 48.33% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Feb 1, 2023

I also tried out adjusting global "transition duration" theme hooks from https://codesandbox.io/s/hungry-tree-4eixn2?file=/index.tsx from https://mui.com/material-ui/customization/transitions/ but it didn't seem to affect timing afaict

@cmdcolin cmdcolin merged commit 000582b into main Feb 1, 2023
@cmdcolin cmdcolin deleted the transition_duration_defaultprops branch February 1, 2023 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant