Widget Visibility: Rewrite the way that the major/minor rules lists are generated.#3444
Closed
cfinke wants to merge 2 commits intoAutomattic:masterfrom
cfinke:master
Closed
Widget Visibility: Rewrite the way that the major/minor rules lists are generated.#3444cfinke wants to merge 2 commits intoAutomattic:masterfrom cfinke:master
cfinke wants to merge 2 commits intoAutomattic:masterfrom
cfinke:master
Conversation
…re generated to save bandwidth and memory. In situations where a site has hundreds of widgets each with multiple visibility rules, the widget admin pagesize can grow out of control, causing out-of-memory errors and issues with loading the customizer. This commit rewrites the way that the admin UI is generated, moving from hardcoding everything server-side to providing a single set of all the possible visibility options that are then dynamically generated client-side when they're needed. This also has the happy side-effect of eliminating the need for the AJAX calls when changing the major rule type. It also fixes some inconsistencies with how the "Include children" checkbox was processed.
Contributor
|
Failing some jshint stuff, can you take a look? https://travis-ci.org/Automattic/jetpack/jobs/111335805 |
Address some comparison and variable declaration issues, mostly by eliminating them alltogether by using a simpler method of setting the value of a select input.
Member
|
Sorry we didn't get around to it until now. It looks like it will need a rebase now. |
Member
Contributor
|
Rebase in progress... |
Contributor
|
Closing in favour of #6333. Hopefully it won't get closed in favour of 9222. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Widget Visibility: Rewrite the way that the major/minor rules lists are generated to save bandwidth and memory.
In situations where a site has hundreds of widgets each with multiple visibility rules, the widget admin pagesize can grow out of control, causing out-of-memory errors and issues with loading the customizer.
This commit rewrites the way that the admin UI is generated, moving from hardcoding everything server-side to providing a single set of all the possible visibility options that are then dynamically generated client-side when they're needed.
This also has the happy side-effect of eliminating the need for the AJAX calls when changing the major rule type. It also fixes some inconsistencies with how the "Include children" checkbox was processed -- in some circumstances, the "Include children" option was being applied to the wrong set of conditions.