Replace global experiments checkbox with enable/disable button#168
Replace global experiments checkbox with enable/disable button#168dkotter merged 12 commits intoWordPress:developfrom
Conversation
- Replace Enable Experiments checkbox with button that auto-submits - Button text and styling changes based on state (Enable/Disable) - Primary button styling when disabled, secondary when enabled - Add helper text to clarify immediate save behavior - Update SCSS to support new button-based toggle layout - Preserve Save Changes button for other settings Fixes WordPress#157
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #168 +/- ##
=============================================
- Coverage 50.80% 50.45% -0.36%
- Complexity 375 379 +4
=============================================
Files 27 27
Lines 1978 1992 +14
=============================================
Hits 1005 1005
- Misses 973 987 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Update enableExperiments to click button instead of checkbox - Update disableExperiments to click button instead of checkbox - Use button selector with :has-text() for reliability - Add page reload wait for auto-submit behavior
- Use simple class selector 'button.ai-experiments__toggle-button' instead of :has-text() - Add waitForSelector to ensure button exists before clicking - Use develop to get all buttons and click the first one - Fix prettier linting by avoiding complex selectors on single line
Add spaces around array index: buttons[0] -> buttons[ 0 ]
|
@dkotter Now Works ? |
|
@Omcodes23 we're working to wrap up work on version 0.2.0, we'll get to this next as we start to work on 0.3.0. |
What?
Closes #157
Replace the global experiments checkbox with an enable/disable button that auto-submits the settings form, reducing the number of actions needed to enable experiments from 4 to 3.
Why?
Currently, enabling AI Experiments requires:
By replacing the global checkbox with a button that auto-submits, we reduce this to:
This improves the user experience by making the global toggle more intuitive and reducing friction.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast