Repository navigation
Search Dashboard: restore visible space between "AI Answers" and "(Preview)" tab label - #48850
Conversation
…eview)" tab label
The new flex-based `Tabs.Tab` from `@wordpress/components` collapses
JSX `{ ' ' }` whitespace between sibling nodes, so the "(Preview)"
suffix rendered flush against "AI Answers". Move a non-breaking
space inside the preview-label span so it survives the flex layout.
Follow-up to #48846 (review comment #3245711759).
|
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! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
…ipt (RSM-3319) Replace the parenthesized inline label "(Preview)" sitting in a plain <span> next to the AI Answers tab title with a semantic <sup> superscript and drop the parens. Visually this leans on the UA's own `vertical-align: super` baseline shift; we only override the font-size (0.7em) and tint the text with the neutral-weak design token so the qualifier reads as metadata instead of competing with the tab title. The translation call moves to _x() with a context note so translators see the badge intent. Removes the ` ` workaround that #48850 had to add against the new flex-based Tabs.Tab — putting the text inside <sup> means the UA superscript handles its own spacing.
Fixes nothing — follow-up to #48846 review comment #48846 (comment).
Proposed changes
dashboard-page.jsx, the "AI Answers (Preview)" tab label was rendering asAI Answers(Preview)after the migration to the unifiedTabs.Tab(variant"minimal") chassis from@wordpress/components. The new flex-based tab layout collapses the JSX{ ' ' }text node sitting between two sibling elements, so the visible separator disappeared.{ ' ' }and instead place a non-breaking space ( ) inside the.jp-search-dashboard-tabs__tab-preview-label<span>itself, right before the localized(Preview)string. A space inside the element's text content is not subject to flex sibling-whitespace collapsing, so the gap renders reliably.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jp build search --deps.