Skip to content

Add support for dynamic keyframes#1043

Merged
HenriBeck merged 13 commits intomasterfrom
feat/add-support-for-dynamic-keyframes
Feb 27, 2019
Merged

Add support for dynamic keyframes#1043
HenriBeck merged 13 commits intomasterfrom
feat/add-support-for-dynamic-keyframes

Conversation

@HenriBeck
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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