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
Theme Details State: Update active field on THEME_ACTIVATED #6703
Merged
ockham
merged 5 commits into
master
from
update/themes-details-reducer-update-active-field
Jul 12, 2016
Merged
Theme Details State: Update active field on THEME_ACTIVATED #6703
ockham
merged 5 commits into
master
from
update/themes-details-reducer-update-active-field
Jul 12, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ockham
added
[Feature Group] Appearance & Themes
Features related to the appearance of sites.
[Status] In Progress
State
labels
Jul 12, 2016
ockham
force-pushed
the
update/themes-details-reducer-update-active-field
branch
from
July 12, 2016 13:30
715bbfb
to
37e5f41
Compare
ockham
added
[Status] Needs Review
The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
and removed
[Status] In Progress
labels
Jul 12, 2016
Nice job. Can't see anything wrong here. |
seear
added
[Status] Ready to Merge
and removed
[Status] Needs Review
The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
labels
Jul 12, 2016
ockham
force-pushed
the
update/themes-details-reducer-update-active-field
branch
from
July 12, 2016 15:28
937efb5
to
df0918a
Compare
bisko
pushed a commit
that referenced
this pull request
Jul 13, 2016
* Theme Sheet: Use isLoaded() helper * Theme Details State: Update active field on THEME_ACTIVATED * Theme Sheet: Drop obsolete isActive() method * Theme Details Reducer: Cover THEME_ACTIVATED action with test * Themes Reducer: Cover THEME_ACTIVATED action with test
Filed #7167. |
bisko
pushed a commit
that referenced
this pull request
Aug 8, 2016
* Theme Sheet: Use isLoaded() helper * Theme Details State: Update active field on THEME_ACTIVATED * Theme Sheet: Drop obsolete isActive() method * Theme Details Reducer: Cover THEME_ACTIVATED action with test * Themes Reducer: Cover THEME_ACTIVATED action with test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR drops the
isActive
method from the theme sheet and instead relies on theactive
property of the theme object returned from the theme details store. To keep it updated, the themes-details reducer now listens toTHEME_ACTIVATED
. I'm also adding a test to cover that functionality, and a slightly modified version of that test to cover the same functionality for thethemes
reducer.This is still rather suboptimal. This is the third reducer covering essentially the same functionality (as evidenced by the imported function we're using here, and by the duplicated test). Ideally, it should be up to selectors to assemble data from single sources of truth. (I think that's one of the things
reselect
was made for.)No visual changes. To test:
Fixes #6595.
Test live: https://calypso.live/?branch=update/themes-details-reducer-update-active-field