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

Test hover, focus, clicked in stories #3898

Open
2 tasks
Tracked by #3705
asvae opened this issue Sep 23, 2023 · 0 comments
Open
2 tasks
Tracked by #3705

Test hover, focus, clicked in stories #3898

asvae opened this issue Sep 23, 2023 · 0 comments
Labels
BUG Something isn't working

Comments

@asvae
Copy link
Member

asvae commented Sep 23, 2023

Vuestic-ui version: 1.8.0

I'm not sure if we need 3 states or only 2. For buttons we only use 2 in preset (hover, pressed):

default: {
          backgroundOpacity: 1,
          hoverBehavior: 'mask',
          hoverOpacity: 0.15,
          pressedBehavior: 'mask',
          pressedOpacity: 0.13,
        },

The problem is that you can only focus on one element and that limits stories significantly. (i.e. we might want to have a list of all possible variants and test focused state for them).

  • My idea is to add props hovered, focused. Which we can pass to component to have needed visuals.
  • Then if component has presets (there are only a couple of components with presets - see packages/ui/src/services/component-config/config/default.ts) - we need to create a story, handling all presets and displaying all possible preset states.

That would have to be added to all focusable components, so pretty big change.

@asvae asvae added the BUG Something isn't working label Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant