Page MenuHomePhabricator

Implement viewer() and members(project) typeahead functions
ClosedPublic

Authored by epriestley on Apr 17 2015, 12:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 6, 5:20 PM
Unknown Object (File)
Feb 5 2024, 8:14 PM
Unknown Object (File)
Feb 3 2024, 3:12 AM
Unknown Object (File)
Jan 29 2024, 9:26 PM
Unknown Object (File)
Jan 29 2024, 9:25 PM
Unknown Object (File)
Jan 29 2024, 7:33 PM
Unknown Object (File)
Jan 29 2024, 3:25 PM
Unknown Object (File)
Jan 23 2024, 11:08 PM
Subscribers
Tokens
"Baby Tequila" token, awarded by talshiri."Mountain of Wealth" token, awarded by avivey.

Details

Summary

Ref T4100. This is still a bit rough around the edges, but mostly does what we're after.

  • Implements viewer() and members(...) functions.
  • The new browse workflow makes these discoverable.
Test Plan

Screen_Shot_2015-04-16_at_5.34.47_PM.png (410×1 px, 72 KB)

Event Timeline

epriestley retitled this revision from to Implement viewer() and members(project) typeahead functions.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.

I think I'd ideally like to do this:

  • Give the function tokens a distinct silhouette (change their shape, give them a heavy outline, animate them, something like that).
  • Additionally, give them a consistent background and icon color.
  • Give project tokens their project colors.
  • Change disabled/closed tokens to grey with strikethrough.

I don't know if we can figure out a silhouette approach that doesn't look junky, though. If we can't and/or you don't like that, a less aggressive approach might be:

  • Give function tokens a background and icon color (yellow? yellow = function).
  • Give project tokens an icon color, but leave the token itself blue (blue = object)
  • Change disabled tokens to grey (maybe no strikethrough) (grey = disabled/closed object).
  • Change invalid tokens to red (red = invalid token).

That's a little less crazy than trying to do silhouette changes, and maybe better?

I'm not happy with them right now; I'd like them to be more distinct than they are.

Either of those color approaches would also let us vary the icons freely. I think it might be more natural to give "members(x)" a "users" icon than a "magic wand" icon.

As I think about it I'm less into the silhouette idea. Let's just try the colors first. I'll do that in a followup.

if we are using text, perhaps no icon to be truly distinctive?

btrahan edited edge metadata.

awesometown

src/applications/search/engine/PhabricatorApplicationSearchEngine.php
386

maybe look for a terminal ')' instead?

This revision is now accepted and ready to land.Apr 17 2015, 5:29 PM

I'm looking for "(" because I want this to count as a "function token" as the user types it out:

members(x

Specifically, that's sufficient for the "members" datasource to know that the user is calling the "members" function, and it should query for projects matching "x...".

That said, I can replace that call with PhabricatorTypeaheadDatasource::isFunctionToken().

epriestley edited edge metadata.
  • Use isFunctionToken().
  • Add a comment explaining the reasoning around "(".
This revision was automatically updated to reflect the committed changes.