fix (design library): change to question mark#3599
Conversation
WalkthroughThe tooltip icon in DesignLibraryListItem changes from "lock" to "editor-help" when selectedNum !== 0. No other logic, text, or conditions are modified. No public APIs are changed. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Pull request artifacts
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/components/design-library-list/design-library-list-item.js (2)
136-140: Guard condition can render tooltip when not selected (selectedNum defaults to false).
selectedNum !== 0is true whenselectedNum === false, so the tooltip shows unintentionally on initial render. Prefer a numeric check.Apply this diff:
- { selectedNum !== 0 && + { Number(selectedNum) > 0 && <Tooltip text={ __( 'Style options are locked for this design because it is selected.', i18n ) }> <Dashicon icon="editor-help" size={ 16 } /> </Tooltip> }
137-139: Optional: Align tooltip copy with the “help” icon.Slightly tighten the message to read more like an informational hint.
Apply this diff:
- <Tooltip text={ __( 'Style options are locked for this design because it is selected.', i18n ) }> + <Tooltip text={ __( 'Styles are locked while this design is selected.', i18n ) }> <Dashicon icon="editor-help" size={ 16 } /> </Tooltip>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/design-library-list/design-library-list-item.js(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: PHP 8.2 and WP latest
- GitHub Check: PHP 7.3 and WP latest
- GitHub Check: PHP 7.3 and WP 6.5.5
- GitHub Check: PHP 8.2 and WP 6.5.5
- GitHub Check: PHP 8.2 and WP 6.7.2
- GitHub Check: PHP 8.2 and WP 6.6.2
🔇 Additional comments (1)
src/components/design-library-list/design-library-list-item.js (1)
138-138: Icon swap LGTM.Using Dashicon "editor-help" for the tooltip looks good.
Summary by CodeRabbit