Page MenuHomePhabricator

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

Authored by epriestley on Apr 17 2015, 12:37 AM.
Tags
None
Referenced Files
F13221878: D12444.diff
Sun, May 19, 3:07 AM
F13214359: D12444.id29871.diff
Fri, May 17, 10:05 AM
F13206759: D12444.id29887.diff
Wed, May 15, 5:23 PM
F13204423: D12444.diff
Wed, May 15, 12:34 AM
F13204422: D12444.diff
Wed, May 15, 12:34 AM
F13201192: D12444.id29861.diff
Tue, May 14, 9:09 AM
F13201101: D12444.id29871.diff
Tue, May 14, 8:02 AM
F13201053: D12444.id.diff
Tue, May 14, 7:34 AM
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.