-
Notifications
You must be signed in to change notification settings - Fork 68
fix (design library): change to question mark #3599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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