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

[FEATURE] Animation between option items #106

Open
heymartinadams opened this issue Jan 23, 2024 · 8 comments
Open

[FEATURE] Animation between option items #106

heymartinadams opened this issue Jan 23, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@heymartinadams
Copy link

The animation is lovely. It just needs to be a bit faster, a bit snappier, especially for command menus that have a longer list of items. Is there any way we can set it ourselves?

Current animation:

CleanShot.2024-01-23.at.10.21.03.mp4

Example of snappier animation: (Linear)

CleanShot.2024-01-23.at.10.23.10.mp4
@heymartinadams heymartinadams added the enhancement New feature or request label Jan 23, 2024
@haaarshsingh
Copy link
Owner

Interesting why it overlaps the menu items when it's going down? I'll take a look.

@haaarshsingh haaarshsingh self-assigned this Jan 25, 2024
@haaarshsingh
Copy link
Owner

@heymartinadams do you prefer the select animation by yourself?

@heymartinadams
Copy link
Author

I wonder if the animation could either be made faster, or perhaps turned off?

On an aside — not related to this issue: another reason my example looks a bit glitchy is because I have added custom colors, and they seem to take a bit to load, right as the animation shifts. See here for a still frame:
CleanShot 2024-01-24 at 21 13 40@2x

@haaarshsingh
Copy link
Owner

@heymartinadams I'm working on an API rewrite for the colors right now. I think it's much easier for people to just customize the colors themselves in a CSS file as opposed to passing them into the menu.

@heymartinadams
Copy link
Author

💯 agreed. That’s what we’re doing.

@haaarshsingh
Copy link
Owner

Awesome! Has using the colors in CSS as opposed to passing them onto the menu fixed this issue?
I'll still work on something which gives an optino to turn off the animation, so someone can even pass it in if they have like prefers-reduced-motion or something.

@heymartinadams
Copy link
Author

heymartinadams commented Jan 29, 2024

Modified style like this, for example.

<style>{`
.category_header { height: 1rem; margin: 0.8rem 0.5rem 0.4rem; font-weight: 500; font-size: 0.75rem; }
.command {
  color: ${!appDarkMode ? 'rgb(var(--colors-primary))' : 'rgb(var(--colors-primary-dark))'} !important;
}
.command, .selected { height: 2.4rem; margin: 0; border-radius: 0.25rem; }
`}</style>

@haaarshsingh
Copy link
Owner

Yeah, you won't have to worry about doing weird stuff like this once the new update comes out. Some big things comin' your way.

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

No branches or pull requests

2 participants