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

Popover improvements #730

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Popover improvements #730

merged 3 commits into from
Jun 11, 2024

Conversation

AshleyBekemeier
Copy link
Collaborator

Summary

Review Checklist

General

  • Changeset added
  • The submitted code is organized and formatted according to our 💅 Style Guide.
    • The code is formatted with Prettier.
    • There are no linting errors.

For new or updated components

https://swirl-storybook.flip-app.dev/?path=/docs/contributions-merge-publish--page

  • The changes do not contain any breaking changes.
  • The changes do not introduce new components that don't belong in the library (e.g. non-reusable components, highly specialized components, components including business logic)
  • The component documentation is updated.
  • The changes meet the 🤖 testing requirements.
    • New features are tested.
    • In case of bug fixes, regression tests have been added.
    • All tests are 🟢.
  • The changes meet the 🧏‍♀️ accessibility requirements.
    • WCAG 2.1 Level A and Level AA requirements are met.
    • The Storybook a11y addon shows no errors.
    • The changes have been tested with a screen reader.
    • Keyboard controls have been tested, if applicable.
    • Components implementing form controls (inputs, buttons, selects, etc.) do not use Shadow DOM, and instead use Stencil's scoping mechanism
  • The changes use our 🌈 theming concept.
    • Design tokens have been used where appropriate.
    • The component has been visually checked in combination with the "Light" and "Dark" theme.
  • The changes meet our 🌍 internationalization requirements.
    • No static text is used.
    • The component doesn't break with longer texts or different text wrappings.
    • Number, currency and date values can be formatted appropriately.
  • The changes work in all supported browsers and viewports. See 📱 Responsive Design

Copy link

vercel bot commented Jun 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
getflipdev ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2024 11:32am
staginggetflipdev ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2024 11:32am

Copy link
Contributor

github-actions bot commented Jun 7, 2024

Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-water-049ec4003-730.westeurope.3.azurestaticapps.net

Copy link
Collaborator

@Sqrrl Sqrrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: Has probably been a problem before your changes, but the trigger always needs to be able to activate the popover via keyboard controls. I would suggest to additionally trigger the popover via the focus event when triggerOnHover is true.

@AshleyBekemeier
Copy link
Collaborator Author

Issue: Has probably been a problem before your changes, but the trigger always needs to be able to activate the popover via keyboard controls. I would suggest to additionally trigger the popover via the focus event when triggerOnHover is true.

What if we want to implement keyboard support in a different way? should I add a prop that disables keyboard support?

@Sqrrl
Copy link
Collaborator

Sqrrl commented Jun 10, 2024

Issue: Has probably been a problem before your changes, but the trigger always needs to be able to activate the popover via keyboard controls. I would suggest to additionally trigger the popover via the focus event when triggerOnHover is true.

What if we want to implement keyboard support in a different way? should I add a prop that disables keyboard support?

What do you mean with "different way"? From an accessibility perspective focus would be the expected behavior, I think. You could, of course, always implement additional keyboard controls. Opening on click instead of focus, even when triggerOnHover is true, would work as well.

@AshleyBekemeier
Copy link
Collaborator Author

Issue: Has probably been a problem before your changes, but the trigger always needs to be able to activate the popover via keyboard controls. I would suggest to additionally trigger the popover via the focus event when triggerOnHover is true.

What if we want to implement keyboard support in a different way? should I add a prop that disables keyboard support?

What do you mean with "different way"? From an accessibility perspective focus would be the expected behavior, I think. You could, of course, always implement additional keyboard controls. Opening on click instead of focus, even when triggerOnHover is true, would work as well.

We show a separate arrow button that opens the popover. So basically there is one popover trigger for on hover and one for on click for keyboard support. Having both open via keyboard would break the behaviour because a single click selects the default thumbs up emoji instead of opening the popover.

@AshleyBekemeier AshleyBekemeier requested a review from Sqrrl June 11, 2024 10:11
@Sqrrl
Copy link
Collaborator

Sqrrl commented Jun 11, 2024

Issue: Has probably been a problem before your changes, but the trigger always needs to be able to activate the popover via keyboard controls. I would suggest to additionally trigger the popover via the focus event when triggerOnHover is true.

What if we want to implement keyboard support in a different way? should I add a prop that disables keyboard support?

What do you mean with "different way"? From an accessibility perspective focus would be the expected behavior, I think. You could, of course, always implement additional keyboard controls. Opening on click instead of focus, even when triggerOnHover is true, would work as well.

We show a separate arrow button that opens the popover. So basically there is one popover trigger for on hover and one for on click for keyboard support. Having both open via keyboard would break the behaviour because a single click selects the default thumbs up emoji instead of opening the popover.

I see. Then a prop to disable the keyboard controls should be fine.

@AshleyBekemeier
Copy link
Collaborator Author

Issue: Has probably been a problem before your changes, but the trigger always needs to be able to activate the popover via keyboard controls. I would suggest to additionally trigger the popover via the focus event when triggerOnHover is true.

What if we want to implement keyboard support in a different way? should I add a prop that disables keyboard support?

What do you mean with "different way"? From an accessibility perspective focus would be the expected behavior, I think. You could, of course, always implement additional keyboard controls. Opening on click instead of focus, even when triggerOnHover is true, would work as well.

We show a separate arrow button that opens the popover. So basically there is one popover trigger for on hover and one for on click for keyboard support. Having both open via keyboard would break the behaviour because a single click selects the default thumbs up emoji instead of opening the popover.

I see. Then a prop to disable the keyboard controls should be fine.

okay, added.

Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-water-049ec4003-730.westeurope.3.azurestaticapps.net

@AshleyBekemeier AshleyBekemeier merged commit 2abbf2f into main Jun 11, 2024
9 checks passed
@AshleyBekemeier AshleyBekemeier deleted the popover-improvements branch June 11, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants