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

Framework: Bump refx to 3.x #3983

Merged
merged 3 commits into from Jan 31, 2018
Merged

Framework: Bump refx to 3.x #3983

merged 3 commits into from Jan 31, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Dec 13, 2017

This pull request seeks to bump the refx dependency from 2.1.0 to 3.0.0.

View Changelog

3.0.0 introduces changed call order of the effect, occurring after an action has been applied to state rather than before. This avoids the need for a setTimeout artificial delay in effects.js.

It could also enable refactoring the jQuery meta box holdReady behavior, as described at #3476 (review).

Testing instructions:

Verify there are no regressions in the behavior of side-effects, notably save behaviors.

@aduth aduth added the Framework Issues related to broader framework topics, especially as it relates to javascript label Dec 13, 2017
@aduth
Copy link
Member Author

aduth commented Jan 4, 2018

In rebasing I found that there was an issue with the changing effect dispatch order causing a new post to be marked as dirty, since while we reset change detection the RESET_POST action type, a new post's SETUP_NEW_POST could cause changes to occur in state.editor due to the effect occuring after RESET_POST. This is resolved in bec3e69 by ensuring that during initialization, RESET_POST is always the last effect action.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

This needs a rebase but let's get it in

@gziolo
Copy link
Member

gziolo commented Jan 31, 2018

@aduth can you rebase and merge? :)

refx 3.x effets are fired _after_ the original dispatch finishes
The RESET_POST action type is used as a reset type for change detection, but must occur as the last effect of editor initialization to avoid the new-post-setup title changes from marking the post as having changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants