Page MenuHomePhabricator

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

Authored by epriestley on Apr 17 2015, 12:37 AM.
Tags
None
Referenced Files
F14405657: D12444.id29871.diff
Mon, Dec 23, 8:17 AM
Unknown Object (File)
Fri, Dec 20, 6:46 AM
Unknown Object (File)
Tue, Nov 26, 11:16 PM
Unknown Object (File)
Tue, Nov 26, 9:26 PM
Unknown Object (File)
Sun, Nov 24, 10:03 PM
Unknown Object (File)
Nov 23 2024, 3:33 AM
Unknown Object (File)
Nov 21 2024, 6:45 AM
Unknown Object (File)
Nov 18 2024, 7:44 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)

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.