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)
Thu, Nov 21, 6:45 AM
Unknown Object (File)
Mon, Nov 18, 7:44 PM
Unknown Object (File)
Sat, Nov 16, 4:22 PM
Unknown Object (File)
Tue, Nov 12, 5:39 PM
Unknown Object (File)
Oct 20 2024, 11:28 PM
Unknown Object (File)
Oct 14 2024, 5:49 PM
Unknown Object (File)
Oct 13 2024, 7:09 AM
Unknown Object (File)
Oct 2 2024, 8:04 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)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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–392

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.