#43633 closed enhancement (fixed)
Duplicate links to edit profile dropdown in toolbar
Reported by: | danieltj | Owned by: | joedolson |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Toolbar | Keywords: | has-patch commit |
Focuses: | ui | Cc: |
Description
Within the mini user profile drop down in the toolbar (to the right), there are two links which direct the user to the edit profile page. Not only is this confusing, it's a poor user experience as some users may wish to have a link to their author archive instead to see what they've written.
I propose this is changed so there is a link to author archives and the edit profile page.
Attachments (13)
Change History (39)
#1
@
7 years ago
- Keywords has-patch needs-testing added
Added the 43633.diff patch which changes the link from an edit profile link to a view posts link.
#3
follow-up:
↓ 4
@
7 years ago
You'd need to change the false !== $profile_url
condition there as well.
#4
in reply to:
↑ 3
;
follow-up:
↓ 5
@
7 years ago
- Keywords needs-refresh added; needs-testing removed
Replying to swissspidy:
You'd need to change the
false !== $profile_url
condition there as well.
Thanks for the heads up, I think it's worth refreshing the patch anyway to change the name and username link to the archive page rather than removing the edit profile link as that makes more sense to leave as it is so there is a clear way to edit the profile.
#5
in reply to:
↑ 4
@
7 years ago
Replying to danieltj:
Replying to swissspidy:
You'd need to change the
false !== $profile_url
condition there as well.
Thanks for the heads up, I think it's worth refreshing the patch anyway to change the name and username link to the archive page rather than removing the edit profile link as that makes more sense to leave as it is so there is a clear way to edit the profile.
I'd much rather see the first link become a "view profile" link rather thean the current "edit profile" link:
The second link as noted above should remain as is
Per the above examples, most users of a bbPress site will not have any posts so linking to a users posts, or post archive when they have no posts is not what we want to do for sites such as those that use bbPress.
#6
@
7 years ago
- Keywords needs-testing added; needs-refresh removed
I've refreshed the patch in 43633.2.diff and added a filter so that plugins and site owners can change the URL if they wish. I think this is the best course of action as it opens up the author archive but lets people change it to whatever they like by filtering it. Essentially just letting people choose where they want this additional link to go.
Can I get tests and thoughts on this please?
#7
follow-up:
↓ 8
@
7 years ago
I stand by what I wrote in comment:5, the primary purpose of the wp_admin_bar_my_account_menu()
function is to add "My Account" items to the admin bar which are the user profile links, first the user profile #L291, and then, if it is not multisite #L266 the "Edit My Profile" link is added.
43633.2.diff changes multisite behaviour by changing the first link to link to a users post archive rather than the current link to the dashboard #L267, this is currently used I expect due to all of the multisite blog/site/network juggling complexities that are required to retrieve any user related content in multisite environments.
Also adding a filter as proposed in 43633.2.diff puts the onus on developers to opt-out of a what is a breaking change being introduced into WordPress and these types of change should be avoided.
#8
in reply to:
↑ 7
@
7 years ago
- Keywords 2nd-opinion added
Replying to netweb:
I stand by what I wrote in comment:5, the primary purpose of the
wp_admin_bar_my_account_menu()
function is to add "My Account" items to the admin bar which are the user profile links, first the user profile #L291, and then, if it is not multisite #L266 the "Edit My Profile" link is added.
43633.2.diff changes multisite behaviour by changing the first link to link to a users post archive rather than the current link to the dashboard #L267, this is currently used I expect due to all of the multisite blog/site/network juggling complexities that are required to retrieve any user related content in multisite environments.
Also adding a filter as proposed in 43633.2.diff puts the onus on developers to opt-out of a what is a breaking change being introduced into WordPress and these types of change should be avoided.
How do we fix the issue of having two links to the same page though? As it stands, single-site installs have two links to the same place which isn't useful and is confusing. In 43633.2.diff, the ids are kept the same to ensure additional links are still added correctly to the toolbar, the link location has simply changed.
There is another way to the dashboard on multisites anyway on the left hand side, so access to these account pages isn't lost and still very accessible. The aim here is to change the fact we have two links going to the same page right next to each other. A much better use of toolbar UI would be to provide a link to somewhere that is hard to find.
Adding 2nd-opinion to get more thoughts on this.
#9
@
4 years ago
Adding a link to the author archive page likely is more appropriate with a plugin.
However, combining the two links seems possible with something like 43633.3.diff.
- "Edit profile" is included within the 'user-info' link, with the
display-name
class to keep the same styling. That span also has anedit-profile-link
class for plugin authors who might wish to change those styles. - I don't think the username adds any value for screen reader users, so it has
aria-hidden
(if I'm wrong, that attribute can be removed).
This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.
10 months ago
#12
@
10 months ago
I support the desired changes and find this topic very important because I think that the current linking is inadequate and far too redudant.
I'm interested in understanding how the new design here, particularly the View Profile link, is intended to appear.
For example, on wordpress.org, navigation to your own profile is made enormously difficult by the fact that you have 3x Edit Profiles and 0x View Profiles links. The drop-down menu on wordpress.org, has been customized using a MU plugin, resulting in a different appearance. Therefore there is an issue on GitHub: https://github.com/WordPress/wporg-mu-plugins/issues/268#issuecomment-1938290193
PS: As for the current design suggestion for wordpress.org, here's a visual representation:
The added value here would be that users can distinguish their accounts by their unique user names, but also see their display names. The design would not be changed too much either.
This ticket was mentioned in Slack in #design by dionysous. View the logs.
10 months ago
#14
@
10 months ago
- Keywords needs-testing 2nd-opinion removed
- Milestone changed from Awaiting Review to 6.5
Adding this to 6.5 to record that I'm committing essentially the same change as in @sabernhardt's 43633.4.diff as part of the fix for #34668.
#15
@
10 months ago
- Owner set to joedolson
- Resolution set to fixed
- Status changed from new to closed
In 57708:
@
9 months ago
in WordPress 6.5 beta, smaller screens do not increase the font size of the Edit Profile text, and it is closer to Log Out than the rest of the link text
@
9 months ago
restores ( false !== $profile_url )
check, adds display-name
class, adds zero tabindex
to profile menu without a link, removes grid row-gap
, adds another space after 'meta', capitalizes the ARIA acronym, adds a translator comment
#16
@
9 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
I added a patch to fix some things, but we could consider reverting this part of [57708] instead and revisiting the duplicate links in another release cycle.
- The separate "Edit Profile" link needed an
if ( false !== $profile_url )
condition for users without a role in [34122], and it should continue to check that condition for the text. - Also for users without a role, the profile menu
div
would need the zerotabindex
to be focusable (more related to #34668). The parameter checks for an integer, and I chose an empty string for the usual case of notabindex
. Another possibility is giving any( $is_parent && ! $has_link )
node the zerotabindex
, but there may have been a reason not to do that when the parameter was added. - The 12-pixel
row-gap
added to the combined link is too much space on Make Core and likely in other conditions too. I simply removed it in the patch for now. Editing theheight
,line-height
and/orfont-size
could be better. - 43633.4.diff specifically had the
display-name
class before the new class for the Edit Profilespan
. This was an easy way to match its styles to the display namespan
without editing the color palettes. In addition to the color, smaller screens need the adjustments tofont-size
,line-height
andheight
. - Additional edits in the patch include an extra space after 'meta' to align the array values, capitalizing the ARIA acronym, and adding a translator comment. These changes could be made if reverting is the better option.
The profile menu also does not show the image/icon on smaller screens when the site enables avatars and the user has no role, but that bug is older so I did not add absolute positioning for the image within this patch.
#17
@
9 months ago
I mostly committed that to get feedback, honestly. Pretty OK with reverting it, although I think minor visual issues are better than the duplicated link, overall.
Had not considered users without a role, however.
#18
@
9 months ago
Looks Good 43633.5.diff I can see that the solution has been improved with better design and issue resolution.
@
9 months ago
Changes item heights to be measured in rem
instead of px
so menu items are still readable when font size is increased.
#19
@
9 months ago
Actually making the adminbar functional at 200% is a large problem, but this at least makes the dropdowns readable, even if the top level items aren't. That simply stood out more now that the profile links are grouped inside one item.
This ticket was mentioned in PR #6222 on WordPress/wordpress-develop by @joedolson.
9 months ago
#20
Trac ticket: https://core.trac.wordpress.org/ticket/43633
#21
@
9 months ago
- Keywords commit added
I think this is good. It improves on a prior change, includes some important changes to code quality and some changes to design. Given the choice between improvement and reverting, I'm in favor of improvement.
#22
@
9 months ago
Noting for the record that I mathed wrong in the patch, and changed the item height to 1.875rem instead of 1.625rem; but fixing that in commit.
@joedolson commented on PR #6222:
9 months ago
#24
in r57765
Example of the mini user profile drop down