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

Setting cds-motion="off" in CdsSelect doesn't turn off cds-button-expand animation #282

Open
4 of 8 tasks
squidjam opened this issue Nov 28, 2023 · 3 comments
Open
4 of 8 tasks

Comments

@squidjam
Copy link

squidjam commented Nov 28, 2023

Describe the bug

Setting cds-motion to off on CdsSelect (react) doesn't turn off the inner cds-button-expand's animation, making it so that visual regression testing doesn't pass.

How to reproduce

Steps to reproduce the behavior:

Expected behavior

If any parent component has a setting to turn off animation, this should be passed along to the child components too. Alternatively, a mechanism should be provided to override this behavior.

Versions

Clarity project:

  • Clarity Core
  • Clarity Angular/UI

Clarity version:

  • v5.x
  • v6.x

Framework:

  • Angular
  • React
  • Vue
  • Other: VanillaJS

Framework version:
React 18

Device:

  • Type: Windows laptop
  • OS: Windows
  • Browser: Chrome
  • Version latest

Additional notes

@squidjam squidjam changed the title Setting `cds-motion="off Setting cds-motion="off" in cds-select doesn't turn off cds-button-expand animation Nov 28, 2023
@squidjam squidjam changed the title Setting cds-motion="off" in cds-select doesn't turn off cds-button-expand animation Setting cds-motion="off" in CdsSelect doesn't turn off cds-button-expand animation Nov 28, 2023
@squidjam
Copy link
Author

The way I'm starting to look at this gets me to think that perhaps all animations should be disabled (or set at least to --cds-global-animation-duration-instant) when on @media (prefers-reduced-motion).

This would give developers using the design system a chance to have automated visual regression testing never fail due to animations.

As an added bonus, those of us who have the setting up would benefit from this already as an accessibility feature.

@squidjam
Copy link
Author

plink

@squidjam
Copy link
Author

Plink

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant