AI Sidebar: Hide legacy toolbar when replacement is active#49219
AI Sidebar: Hide legacy toolbar when replacement is active#49219t-wright wants to merge 5 commits into
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 3 files.
|
01bfd3f to
95e51df
Compare
95e51df to
028b836
Compare
a7b6d55 to
8cfb00b
Compare
Mark the legacy AI Assistant toolbar extensions unavailable when Jetpack AI Sidebar block transformations are active. Prevents duplicate AI toolbar buttons while preserving the legacy controls whenever the sidebar entrypoint is gated off.
Use the block transformations feature name for the sidebar availability flag so Jetpack and Calypso refer to the same capability consistently.
Require the blockToolbarButton preview feature before exposing the sidebar replacement flag so preview/editorial review can run without hiding the legacy toolbar controls.
Explicitly marks the sidebar block transformations extension unavailable until its release flags are active. Prevents Jetpack from hiding the legacy toolbar before the replacement button is available.
8cfb00b to
89eb28a
Compare
Replaced the ai-sidebar-block-transformations extension with ai-sidebar-toolbar-button, so hiding the legacy AI toolbar is driven solely by whether its replacement button is live. Block transformations is becoming inherent agent behaviour with no real off state, so coupling the toolbar's visibility to it was a fiction that locked the two features in lockstep. Also deduplicated the post-editor/AI-features/preview checks through should_expose_sidebar().


Part of FORNO-335
Proposed changes
Related product discussion/links
jetpack-sidebar/add-big-sky-toolbar-button.Does this pull request change what data or activity we track or use?
No.
Testing instructions
~/htdocs/wp-content/plugins/jetpack-dev/extensions/plugins/ai-assistant-plugin/ai-sidebar/class-jetpack-ai-sidebar.phpL538, edit this'blockToolbarButton' => true