Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#19425 closed defect (bug) (fixed)

Lower priorities on toolbar search and my account actions.

Reported by: koopersmith's profile koopersmith Owned by: ryan's profile ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Toolbar Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

In [19518], we altered the priorities of the search and my account toolbar actions. Some plugins may have been adding items to the my account menu at earlier priorities, which pushes the user info and log out links down in the my account menu.

Given the significance of these links, I would suggest shifting both search and my account to priority 0.

Attachments (7)

the-problem.png (43.1 KB) - added by koopersmith 13 years ago.
the-solution.diff (668 bytes) - added by koopersmith 13 years ago.
19425.2.diff (1.3 KB) - added by koopersmith 13 years ago.
19425.3.diff (4.1 KB) - added by koopersmith 13 years ago.
19425.diff (4.1 KB) - added by nacin 13 years ago.
19425.4.diff (5.7 KB) - added by koopersmith 13 years ago.
19425.5.diff (5.7 KB) - added by koopersmith 13 years ago.

Download all attachments as: .zip

Change History (23)

#1 @koopersmith
13 years ago

  • Component changed from General to Admin Bar
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.3
  • Version set to 3.3

#2 @koopersmith
13 years ago

Thinking this over, we only really care about the positioning of the submenu items within the my account menu. I suggest we use one function to add the my account submenu items (bound to priority 0), and two others to add the top level search and my account items.

#3 @nacin
13 years ago

Agree we have to do something here.

I had suggested 0 but now I'm wondering if 1 & 2 might make sense, in case a plugin has a particular use case. For example, a top-level "Log Out" button.

The main worry here is the submenu items, rather than the top-level items. Let's split the my-account submenu items into a separate function and make them priority 0, then stagger search and my-account at 2 and 4, respectively.

#4 @nacin
13 years ago

While looking into the history of this I found #19425.

Version 0, edited 13 years ago by nacin (next)

@koopersmith
13 years ago

#5 @nacin
13 years ago

19425.2.diff is clever, but see #19429.

#6 @koopersmith
13 years ago

Okay, so attachment:19425.2.diff is probably a little too sneaky. Try this one on for size.

@koopersmith
13 years ago

#7 @nacin
13 years ago

19425.3.diff: Noting that most of these changes are just un-indenting due to if ( ! $user_id ) return;. Yay for returning early.

#8 @nacin
13 years ago

  • Keywords commit needs-refresh added

Note that this will need refresh to work with #19429's renaming of my-account.

@nacin
13 years ago

#9 @nacin
13 years ago

  • Keywords needs-refresh removed

#10 @johnbillion
13 years ago

  • Cc johnbillion@… added

#11 follow-up: @nacin
13 years ago

Wondering if it would be worth moving user-info, edit-profile, and logout into a user-info-group, but adding logout much later, that way logout is consistently the last link of the first group. Sometimes people may want to add secondary items, other times primary items. It would be better if logout is not so lost.

#12 in reply to: ↑ 11 @koopersmith
13 years ago

Replying to nacin:

Wondering if it would be worth moving user-info, edit-profile, and logout into a user-info-group, but adding logout much later, that way logout is consistently the last link of the first group. Sometimes people may want to add secondary items, other times primary items. It would be better if logout is not so lost.

I agree, and then some. The user info section has been a perfect example for why we needed groups in the first place, and making it a defined (instead of default) group will keep the account menu more organized as we move forward.

As for a group name, user-actions has a lovely ring to it. :)

#13 @ryan
13 years ago

Okay.

#14 @nacin
13 years ago

  • Keywords dev-reviewed added

@koopersmith
13 years ago

@koopersmith
13 years ago

#15 @koopersmith
13 years ago

Updated for [19549].

#16 @ryan
13 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19559]:

Introduce user-actions group and move profile and logout menu items to it and change priority. Props koopersmith. fixes #19425

Note: See TracTickets for help on using tickets.