Repository navigation
Backup: flip the folder chevrons and back arrows in right-to-left languages - #53485
Conversation
|
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 SummaryCoverage changed in 1 file.
|
Closed-folder chevrons and the Back to overview arrows now follow isRTL(). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
935b801 to
e442ada
Compare
dhasilva
left a comment
There was a problem hiding this comment.
Looks good. The isRTL() choice matches the fix the issue suggested, and I found no other directional icons in the dashboard that need the same treatment. CI is green. One non-blocking nit on a test, inline.
Generated by Claude.
| it.each( [ | ||
| [ 'a valid rewind id', VALID_ID ], | ||
| [ 'an invalid rewind id', 'not-a-real-id' ], | ||
| ] )( 'points the back arrow toward the inline end in RTL for %s', async ( _label, rewindId ) => { |
There was a problem hiding this comment.
Nit: a back arrow points toward the inline start (left in LTR, right in RTL). "Toward the inline end" is true of the folder chevron, so this name looks copied from that test.
This case also runs only in RTL, though the PR body says each icon is covered in LTR and RTL. An LTR row, like the chevron test has, would catch a regression to an always-arrowRight arrow, which this RTL-only row can't see.
Generated by Claude.
There was a problem hiding this comment.
Fixed in 136759b. The test now says "inline start" and has LTR and RTL rows for both a valid and an invalid rewind id. With the arrow forced to always arrowRight, the LTR rows fail.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fixes JETPACK-2977
Proposed changes
arrowRightinstead ofarrowLeft.chevronLeftinstead ofchevronRight. Open folders keepchevronDown.isRTL()from@wordpress/i18n. wp-build route CSS gets no RTL pass, so CSS mirroring is not an option here. Other Jetpack packages (Boost,js-packages/components) use the same inlineisRTL()check.rotateLefticon. It is a counter-clockwise restore arrow, not a direction, and Gutenberg does not mirror it either.rsm_jetpack_ui_modernization_backupfilter, so the changelog entry has no body.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Unit tests:
tests/file-browser-icons.test.tsxandtests/invalid-rewind-id.test.tsxcover each icon in LTR and RTL. Five of them fail without this change.In a browser, you need a site that is connected to WordPress.com and has a Backup plan with at least one backup, running this branch of
packages/backup. Log in as the connection owner.Turn on the modernized dashboard, for example with a mu-plugin (in the monorepo Docker environment, put it in
tools/docker/mu-plugins/):In Users › Profile, set your language to Hebrew or Arabic (install the language pack first if needed), and go to Jetpack › VaultPress Backup.
In the backup detail pane, find the file browser (it is open already). Expect: closed folders show a left-pointing chevron.
Open the Download screen for a backup. Do not generate a download. Expect: the "Back" link's arrow points right.
Open the Restore screen for a backup. Do not confirm a restore. Expect: the "Back" link's arrow points right.
On the Restore or Download screen, replace the backup id in the URL with
abc(for example,admin.php?page=jetpack-backup&p=/restore/abc) and reload. Expect: the invalid-backup screen's "Back" arrow points right.Set your language back to English. Expect: every icon points as on trunk.
I ran these steps on a local Docker site (connected, with a Backup plan), as a user with the Hebrew language.
Restore screen, Back link, after
Invalid-backup screen, Back link, after
🤖 Generated with Claude Code