Skip to content
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

LTR direction for username, email, password and URL fields #3933

Open
wants to merge 53 commits into
base: trunk
Choose a base branch
from

Conversation

sabernhardt
Copy link

@sabernhardt sabernhardt commented Jan 27, 2023

Sets all password type inputs to LTR direction and adds the .ltr class to forms.css for use in the login page. Several fields need the ltr class or another method of setting the direction.

Site fields in Arabic

Login pages: username and password

Common login at wp-login.php, with the password visibility button on the right (as recommended by ierwira)

Login screen

Reset Password

Reset Password, with the password visibility button on the right

Custom login form using wp_login_form() in Twenty Sixteen (this adds the direction style inline, but I do not expect anyone would want to override that)

Custom login form

Comments: email field

Switching the type from text to email would solve the direction, but I used the .code class instead to match the styling of the URL field. (These could have both the email type and the class, too.)

Edit Comment

comment author email in top section

Quick Edit on Comments screen

comment author email in bottom row

Post password

Quick Edit on Posts screen

Post password in Quick Edit

Post metabox (in Classic Editor)

Post password in metabox

Media: URL fields

Edit from Media Gallery (list mode)

Edit Media page

Edit from Media Gallery (grid mode)

Attachment details modal

Insert an image into a post (I used Classic Editor)

Add media modal

User Profile: username, password and application password

Navigate to your profile page (/wp-admin/profile.php) or edit another user's profile (/wp-admin/user-edit.php).

Profile page

Editing another user is very similar.

New User: username and password

Add User page

Network (multisite) fields, in Persian

Activation page: activation key

Set language in Network Settings, and navigate to /wp-activate.php.

site activation key

Registration page: username and email

Set language in main site's Settings, and make sure the network allows both site and user registrations. Then navigate to /wp-signup.php.

User signup (not logged in, step 1)

Signing up for an account in network installation, step 1

Network Site Info: Site Address (URL)

Navigate to /wp-admin/network/sites.php (if using a mouse, you could hover over the first link under My Sites dropdown, and then click the second link in the sub-menu). Open individual sites, and the first tab will be Info.

The main site has a code element to fix the direction.

uneditable code element for main site's URL

Other sites use the url type for their input fields.

URL type field for second site in network

Network Site Users: username and email

Navigate to the second tab for each Site (main: /wp-admin/network/site-users.php?id=1), and scroll down to the Add New User form.

Add New User form within network administration

Network Site Settings: several options are URLs, usernames or emails

Navigate to the fourth tab for each Site (main: /wp-admin/network/site-settings.php?id=1).

This patch adds the ltr class to multiple option fields (siteurl, home, admin_email, new_admin_email, mailserver_url, mailserver_login, mailserver_pass, ping_sites, permalink_structure, category_base, tag_base, upload_path, upload_url_path).

Main site:

Site URL, Home, Admin Email and mailserver options for main site
...
Permalink Structure, Category Base and Ping Sites options
...
Tag Base option
...
New Admin Email option
(The upload path options were empty.)

Second site:

Site URL, Home URL and Site Title options for the second site in the network

Trac ticket: https://core.trac.wordpress.org/ticket/54915


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

The print styles change is unnecessary. The form is already hidden in print with the `.comment-form-flex` selector.

Also, the wrong class name was used where the comments title div is closed (above this form).
@sabernhardt
Copy link
Author

sabernhardt commented Jan 28, 2023

The Install and setup-config.php pages already set LTR direction on their fields (by ID selectors).

The Repeat Password fields on the profile screens, which appear when JavaScript is inactive, would not need the special class because they remain password type.

Password and Repeat Password fields on Profile page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant