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

Add support for dynamic keyframes #1043

Merged
merged 13 commits into from
Feb 27, 2019

Conversation

HenriBeck
Copy link
Member

What would you like to add/fix?
This fixes having a dynamic animation name.

I think we can have a better system to process the update style changes and not require this duplicate code.

Still missing some tests to make sure we don't break anything.

@HenriBeck HenriBeck marked this pull request as ready for review February 23, 2019 19:37
@HenriBeck HenriBeck requested a review from kof February 23, 2019 19:37
@HenriBeck
Copy link
Member Author

@kof please review.

onCreateRule(key: string, frames: JssStyle, options: RuleOptions): KeyframesRule | null {
return keyRegExp.test(key) ? new KeyframesRule(key, frames, options) : null
const plugin: Plugin = {
onCreateRule(key, frames, options) {
Copy link
Member

Choose a reason for hiding this comment

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

why removing the types?

Copy link
Member

Choose a reason for hiding this comment

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

ah gotcha

onChangeValue(val, prop, rule) {
const {sheet} = rule.options

if (rule.type !== 'style' || !sheet) {
Copy link
Member

Choose a reason for hiding this comment

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

afaik only style rule value can be changed, so the first check can be removed

Copy link
Member

@kof kof left a comment

Choose a reason for hiding this comment

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

looks good!

Henri Beck added 4 commits February 27, 2019 22:19
…frames' into feat/add-support-for-dynamic-keyframes

* origin/feat/add-support-for-dynamic-keyframes:
  v10.0.0-alpha.11
  fix changelog issue id
@HenriBeck HenriBeck merged commit 8a16ecb into master Feb 27, 2019
@HenriBeck HenriBeck deleted the feat/add-support-for-dynamic-keyframes branch February 27, 2019 21:50
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

Successfully merging this pull request may close these issues.

2 participants