-
Notifications
You must be signed in to change notification settings - Fork 96
docs article section design break fix #218
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
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe update modifies the layout spacing within the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
🔭 Outside diff range comments (1)
src/components/DocListing/SectionArticles.js (1)
274-277:formattedDateStringis passed as a function, not its result
sprintfexpects a string, but the code supplies the function reference. This renders as"function formattedDateString()"instead of the formatted date.- __( 'Updated on %s', 'wedocs' ), - formattedDateString + __( 'Updated on %s', 'wedocs' ), + formattedDateString()
🧹 Nitpick comments (3)
src/components/DocListing/SectionArticles.js (3)
235-235: Verify enlarged gap – possible unintended extra whitespace on small viewports
gap-7(1.75 rem) is noticeably wider than the surroundinggap-5wrapper. On narrow screens this can push the updated-date block off-screen or create irregular spacing. Double-check the layout in mobile breakpoints; if the extra spacing is only desired on desktop, consider a responsive modifier:-<div className="flex items-center gap-7"> +<div className="flex items-center sm:gap-7 gap-5">
245-245: Right-margin addition may break visual alignment with sibling controls
mr-6adds 1.5 rem padding after the comments badge. Ensure it still lines up with the admin-restriction icon and contributors components, especially when either element is toggled off. Quick visual QA in the three comment states (disabled / zero / non-zero) is recommended.
95-101: Avoid repeated expensive filter calls – cache the result once
wp.hooks.applyFilters( 'wedocs_check_is_admin_restricted_article', … )is invoked four times in this component. As it may hit external hooks, compute it once and reuse to reduce overhead and guarantee consistent return values.-const isAdminRestrictedArticle = wp?.hooks?.applyFilters( - 'wedocs_check_is_admin_restricted_article', - false, - article?.id -); +const isAdminRestrictedArticle = wp?.hooks?.applyFilters( + 'wedocs_check_is_admin_restricted_article', + false, + article?.id +);Then use
isAdminRestrictedArticlethroughout.Also applies to: 143-150
Summary by CodeRabbit