WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#43633 new enhancement

Duplicate links to edit profile dropdown in toolbar

Reported by: danieltj Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: has-patch needs-testing 2nd-opinion
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 (3)

user-profile-dropdown.png (24.7 KB) - added by danieltj 4 months ago.
Example of the mini user profile drop down
43633.diff (579 bytes) - added by danieltj 4 months ago.
Replaces edit profile with view posts
43633.2.diff (926 bytes) - added by danieltj 4 months ago.
Refreshed the patch

Download all attachments as: .zip

Change History (11)

@danieltj
4 months ago

Example of the mini user profile drop down

@danieltj
4 months ago

Replaces edit profile with view posts

#1 @danieltj
4 months 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: @swissspidy
4 months ago

You'd need to change the false !== $profile_url condition there as well.

#4 in reply to: ↑ 3 ; follow-up: @danieltj
4 months 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 @netweb
4 months 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:

e.g. https://profiles.wordpress.org/danieltj/profile/

The second link as noted above should remain as is

e.g. https://profiles.wordpress.org/danieltj/profile/edit

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.

@danieltj
4 months ago

Refreshed the patch

#6 @danieltj
4 months 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: @netweb
4 months 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 @danieltj
4 months 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.

Note: See TracTickets for help on using tickets.