Fix RTL layout on Connectors admin screen#11247
Fix RTL layout on Connectors admin screen#11247tejas0306 wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks for the PR!
The approach not make sense to me. Instead for adding additional action and inline script we have to check how to fix the issue with that inline style on connector option page.
| // Set parent file for menu highlighting. | ||
| $parent_file = 'options-general.php'; | ||
| $parent_file = 'options-general.php'; | ||
| $submenu_file = 'options-connectors.php'; |
There was a problem hiding this comment.
| $submenu_file = 'options-connectors.php'; |
There was a problem hiding this comment.
@mukeshpanchal27 Thanks for the review.
I’ve removed the extra admin_head action and the inline script so the patch no longer adds additional actions or inline styles.
The remaining fix focuses only on the RTL menu arrow issue on the Connectors screen.
Please let me know if you’d prefer a different approach.
There was a problem hiding this comment.
@mukeshpanchal27 I’d recommend keeping this line.
$submenu_file is the standard way in wp-admin to mark the active submenu item. Without it, the "Connectors" item under Settings is not highlighted when visiting the page.
This follows the same pattern used in other options pages such as options-general.php.
|
@tejas0306 Check https://core.trac.wordpress.org/ticket/64857#comment:7, @jorgefilipecosta open PR WordPress/gutenberg#76496 that fix the issue. Closing in favour of GB PR |
Addresses two RTL issues on Settings → Connectors when the admin locale is RTL (e.g. Arabic, Hebrew, Central Kurdish):
• Page heading alignment
The "Connectors" heading remained left-aligned in RTL. The page header used
justify-content: left, which does not respect document direction. This patch adds an RTL override so the heading aligns to the inline-start edge (right in RTL).• Admin menu current-item arrow
The Connectors page injected
border-right-color: #ffffor the current menu item arrow, which is correct in LTR. In RTL, WordPress usesborder-left-color, causing a duplicate arrow to appear. This patch removes the right border color and appliesborder-left-color: #ffffor RTL so only the correct arrow is displayed.Additionally sets
$submenu_file = 'options-connectors.php'so the Settings → Connectors menu item highlights correctly.Fixes https://core.trac.wordpress.org/ticket/64857