Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boost: make the setting modules work more consistently (#40224)
* Update minification modules, clean up * changelog * Remove the InputLabel, not used any more * Reset the text input value if closed (and opened) * Add Tracks events to minification modules * Add events in comments and minify toggle will say "panel" * Don't show "Hide" to hide minify modules. Others don't There's an Up chevron for that. * Remove "closeEditText" from imageCDN quality meta. * Update CSS to fix concatenate panels * Update so it works with other modules. * Allow it to use Chevrons as well as pencil * External state for enclosing module to track expanded status. * Set a Tracks event when it's toggled open/closed. * Use CollapsibleMeta component to display meta information * Saving forms will close form so add Tracks event there. * Pass the same event to component to do the same * Quality settings don't use chevrons for toggle * Move collapsible meta features/ui/ and adjusted paths to load it * Use the state to record the toggle Tracks event * Moving Page Cache to CollapsibleMeta * Add colouring of the chevron, using that instead of pencil * Update so it handles modules more consistently. * Add extraButtons prop for the Clear Cache button. * Replaced Header for most modules with headerText and summary * Renamed editText to toggleText * Added onToggleHandler, a callback called when the section is toggled up/down. * Renamed editText to toggleText, remove useChevron prop * The Quality module uses the up/down chevrons now * * Use callback instead of state to update minify exceptions * Add wrapper div, like Page Cache module. * Style the minify title text correctly * Remove a bunch of CSS that's not needed here * Update for changes to CollapsibleModule * Use extraButtons and headerText instead of Header * Add Exceptions title back in. * Don't use external isExpanded state any more. * Fix up the logging status messages * Press Return or Enter to submit the concatenate exceptions * Minor edits to force a failed rebuild * Break it up, the optimizer is breaking things * Use this wait function like PageCache uses * This started to cause a linter error just now. * Pass the data-testid to the CollapsibleMeta to display This should fix the concatenate tests that were failing * Revert this as I figured out where the selector went * Describe what modules were changed * Try to fix tests * Remove this, not needed as it's on the wrapper now * Remove this wrapper, the div wraps this code. * Use the original "Exclude" strings that will be translated. * Update projects/plugins/boost/app/assets/src/js/features/minify-meta/minify-meta.tsx Add the Number Pad Enter so it can be used to save exceptions. Co-authored-by: Peter Petrov <[email protected]> * Update projects/plugins/boost/app/assets/src/js/features/page-cache/meta/meta.tsx Align closing bracket with opening one. Co-authored-by: Peter Petrov <[email protected]> * Remove most of this, it's not good * Remove, it's not used anywhere * Replace useEffect with a single function, props @dilirity * Add default values and handle extraButtons better * Update the CollapsibleMeta Storybook * The title points at Features/UI now * Only style the up/down chevrons green * Trying this because linter is showing an odd error. Error: 58:46 error Replace `⏎↹↹↹` with `·` prettier/prettier * Add default value for onToggleHandler * Change this so svg files in icons are coloured green * This style isn't used any more, remove it --------- Co-authored-by: Peter Petrov <[email protected]>
- Loading branch information