Post Author: Add help text linking to profile screen - #82019
dhaval-parekh wants to merge 2 commits into
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @dhaval-parekh, @yanksyoon. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @dhaval-parekh! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
Hey 👋 I wanted to give you a heads-up since this pull request adds new files containing JSX. #80123 enables an ESLint rule that requires that files containing JSX must use the What you'll need to do: You'll need to rename any new files containing JSX to use the This comment is automated, based on pull requests with recent activity that contain affected |
What?
Closes #17364
Adds help text below the author selector in the post Author flyout: "You can edit your display name in your profile." — where "your profile" links to
profile.php(opens in a new tab).Why?
The author dropdown only shows display names. When multiple users share the same display name they are indistinguishable, and it isn't obvious where the shown name comes from or how to change it.
The original request was to append the username (as the classic editor did), but the
usernamefield is intentionally only exposed in theeditcontext of the REST API, and exposing new user data was ruled out in the issue discussion. The settled direction (see #17364 (comment) — jasmussen's mockup) is to add descriptive help text pointing users at the Display Name setting on their profile instead.How?
AuthorHelpTextcomponent (packages/editor/src/components/post-author/help-text.js) usingcreateInterpolateElementfor the translatable string andLinkfrom@wordpress/uiwithopenInNewTabfor the profile link.helpprop on both variants of the selector:SelectControl(≤ 25 users) andComboboxControl(> 25 users), so it renders below the field in both cases.PostAuthorlives in@wordpress/editor, the change applies to the post editor and both site editors automatically.Testing Instructions
profile.php) in a new tab.npm run wp-env run cli -- wp user generate --role=author --count=30) and repeat steps 1–5, The flyout now renders a combobox with the same help text.Testing Instructions for Keyboard
Ctrl+Shift+,(⌘+Shift+,on Mac) to open the Settings sidebar, and navigate to the Post/Page tab.Screenshots or screencast
Use of AI Tools