1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-28 06:29:27 +01:00
phorge-phorge/src/applications/search
epriestley 36a8b4ea17 When a ProfileMenu has a link item that adds URI parameters, highlight it when clicked
Summary:
Depends on D20352. Fixes T12949. If a user adds a link (for example, to a workboard) that takes you to the same page but with some URI parameters, we'd prefer to highlight the "link" item instead of the default "workboard" item when you click it.

For example, you add a `/query/assigned/` "link" item to a workboard, called "Click This To Show Tasks Assigned To Me On This Workboard", i.e. filter the current view.

This is a pretty reasonable thing to want to do. When you click it, we'd like to highlight that item to show that you've activated the "Assigned to Me" filter you added.

However, we currently highlight the thing actually serving the content, i.e. the "Workboard" item.

Instead:

  - When picking what to highlight, look through all the items for one with a link to the current request URI.
  - If we find one or more, pick the one that would be the default.
  - Otherwise, pick the first one.

This means that you can have several items like "?a=1", "?a=2", etc., and we will highlight them correctly when you click them.

This actual patch has some questionable bits (see some discussion in T13275), but I'd like to wait for stronger motivation to refactor it more extensively.

Test Plan:
  - On a portal, added a `?a=1` link. Saw it highlight properly when clikced.
  - On a workboard, added a link to the board itself with a different filter. Saw it highlight appropriately when clicked.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12949

Differential Revision: https://secure.phabricator.com/D20353
2019-04-02 14:45:33 -07:00
..
application Separate saved queries in applications into "personal" and "global" queries 2017-08-24 15:24:34 -07:00
applicationpanel Fix Search Application Config 2017-07-18 17:44:56 +00:00
buckets Use new Differential bucketing logic on default (non-dashboard) homepage 2016-05-19 15:20:39 -07:00
constants Create a virtual "core" field in the Ferret engine for "title and body together" 2017-09-01 09:40:56 -07:00
controller When query panels overheat, degrade them and show a warning 2019-03-27 15:54:28 -07:00
editor Validate menu item fields (links, projects, dashboards, applications, forms, etc) 2017-01-20 11:58:25 -08:00
engine When a ProfileMenu has a link item that adds URI parameters, highlight it when clicked 2019-04-02 14:45:33 -07:00
engineextension Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
exception Allow administrators to get a list of users who don't have MFA configured 2017-03-15 17:49:01 -07:00
ferret Allow the Ferret engine to remove "common" ngrams from the index 2017-10-03 13:27:42 -07:00
field Make DiffusionCommitSearch accept modern (string) constants 2018-09-10 16:25:42 -07:00
fulltextstorage Fix some minor errors (DarkConsole warning, unstable Ferret sort) 2018-03-18 15:12:25 -07:00
garbagecollector Add a garbage collector for common ngrams 2017-10-05 11:41:18 -07:00
index When waiting for long-running Harbormaster futures to resolve, close idle database connections 2018-11-21 07:53:40 -08:00
interface Extend "fulltext" and "ngrams" interfaces from "indexable" interface 2017-04-17 12:59:41 -07:00
management Track how many columns use a particular trigger 2019-03-25 14:04:55 -07:00
menuitem Don't allow "Conpherence" menu items to be added to editable menus if Conpherence is not installed 2019-03-27 16:01:16 -07:00
ngrams When waiting for long-running Harbormaster futures to resolve, close idle database connections 2018-11-21 07:53:40 -08:00
phidtype Rename "ProfilePanelConfiguration" to "ProfileMenuItemConfiguration" 2016-12-11 11:44:22 -08:00
query Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
relationship Render parent and child tasks in Maniphest with a graph trace 2016-07-01 10:41:07 -07:00
storage Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
typeahead Rename "QuickSearch" Engine/EngineExtension to "Datasource" 2018-02-14 18:03:03 -08:00
view Add "Contact Numbers" so we can send users SMS mesages 2019-01-23 13:39:56 -08:00
worker Don't report search indexing errors to the daemon log except from "bin/search index" 2019-02-19 11:17:11 -08:00