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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update accordion vf-transition syntax #4548

Merged

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented Aug 23, 2022

Done

  • Update accordion to use the new vf-transition syntax
  • Make vf-transition require a string
  • Automatically escape the property string

QA

  • Open demo
  • [Add QA steps]
  • Review updated documentation:
    • [List any updated documentation for review]

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

Screenshots

[if relevant, include a screenshot or screen capture]

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4548.demos.haus

transition-duration: map-get($animation-duration, $duration);
transition-property: $property;
transition-property: unquote($property);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you pass quoted strings or list to vf-transition as $property it'll result in an invalid CSS (and scss does not complain).

As an example, passing either $property: ('width', 'box-shadow') or 'width, box-shadow' will have a result similar to the following:
image

@bartaz In cases such as this, would you prefer if we formatted the string (e.g. by using unquote) or simply threw an error and disallow passing incorrectly formatted strings in the first place?

Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting the string seems better.
I guess in most cases anyone trying to use it would search for examples of use and copy those. But I agree it is a little bit unclear how to pass multiple prop to animate at once.

@petermakowski petermakowski marked this pull request as ready for review August 23, 2022 09:01
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM

@bartaz bartaz merged commit ad47282 into canonical:main Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants