Page MenuHomePhabricator

If a ProfileMenu has Link items, and one or more have the request URI as the link target, highlight the first one
Closed, ResolvedPublic

Description

If users add "Link" menu items to a profile menu that point to variations of the object itself, they don't highlight when followed, but it would be more clear to highlight them.

For example, on Workboards, users may add Link items which point to different views of the workboard (open tasks, closed tasks, etc). When clicked, these will show the right content but the "Workboard" item will remain highlighted. When the request URI exactly matches one or more targets of Link items, highlighting the first Link item is a better behavior than highlighting the Workboard item.


Original Description

User is requesting saving workboard queries and exposing them via menu item, to click and see different views quickly. I think this sounds great, but it breaks my little design head when I think about implementation.

Event Timeline

chad triaged this task as Wishlist priority.Aug 2 2017, 4:22 PM
chad created this task.
chad added projects: Feature Request, Workboards.
  • What's the root problem?
  • Why can't they use links?
  • How is this different from T12374?
chad added a comment.Aug 2 2017, 4:33 PM

A link doesn't stay highlighted if clicked on. Like dashboards, I can understand wanting multiple board views from the sidebar.

chad added a comment.Aug 2 2017, 4:33 PM

Or maybe there is a simple way to get the link to highlight, I couldn't think of one though.

Is there any reason that the rule "if any menu items have the same link target as the request URI, highlight the first one" wouldn't work?

chad added a comment.Aug 2 2017, 4:39 PM

That sounds much easier than all the solutions I came up with.

epriestley renamed this task from Build a Workboard Query MenuItem? to If a ProfileMenu has Link items, and one or more have request URI as the link target, highlight the first one.Aug 2 2017, 4:40 PM

Heh, that was going to be my suggestion in the original discourse post, but I figured it was too simplistic. Glad to hear we're on the same page. Thanks everyone!

epriestley renamed this task from If a ProfileMenu has Link items, and one or more have request URI as the link target, highlight the first one to If a ProfileMenu has Link items, and one or more have the request URI as the link target, highlight the first one.Aug 2 2017, 4:43 PM
epriestley updated the task description. (Show Details)
chad added a comment.Aug 2 2017, 4:45 PM

I'm obviously low on AM brian power today.

This is an unusually low-tech solution but I can't think of any reasons why it won't work.

chad edited projects, added Profile Menu Item; removed Workboards.Aug 2 2017, 5:19 PM

I've written a patch to make this work for the project sidebar nav for my organization's install. I don't want to take up your time with it if it's not helpful, but let me know if you'd like me to push a diff.

Happy to take a look if you found a reasonable way to get access to $request. If you're reading $_REQUEST['__path__'] directly or something though the eventual upstream version probably won't look too similar.

chad added a comment.Aug 5 2017, 12:50 AM

That looks pretty hawt.

chad added a comment.Aug 5 2017, 12:51 AM

remind me to add some more icons for Link.

  • workboard
  • project
  • ???
epriestley moved this task from Backlog to Next on the Dashboards board.Mar 31 2019, 9:56 PM