Page MenuHomePhabricator

Make it easier to find objects while in remarkup box
Open, Needs TriagePublic


When trying to use a phurl in a comment, I find it hard to find the right alias / U id for the link I'm trying to use - usually around things like bug vs bugs or install vs setup, and other similar names.
I end up opening Phurl in a new tab to find it there.

I have similar difficulties mentioning specific tasks, where I remember most of the title but not the ID.

Some possible solutions:

  • Autocomplete ((… phurl syntax, like users/projects, and {T… for tasks, etc.
  • A remarkup toolbar button to open the datasource UI, where we can search for any object using magic, and have it generate and insert the appropriate remarkup syntax.

Event Timeline

I think this is the same as T11543 but I'm going to merge that here since this one is a little cleaner. My current thinking:

  • Autocomplete on ((... is probably good for Phurl.
  • I'd like to do the button (that pops up a datasource browser thing) as a general solution, since it's a lot easier for new users to discover than autocomplete stuff is, and I worry that autocompleting documents without good "token" identifiers (like tasks/wiki pages) may never feel really great. For power users, I'm thinking keyboard shortcut rather than trying to add more magic syntax.
  • Probably some room for syntax magic after the button is built, where it makes sense.

In the specific case of Phurl autocompletion, I'd be happy to review a change if someone wants to tackle it. The recent emoji autocompletion is probably a pretty good example to start from.

I think the only tricky bit is that it should only trigger on ((, not just (, and I think the JS will need some tweaks to recognize a multiple-character trigger.

the trigger was the main thing preventing me from implementing phurl

If you want to implement the rest of it with a ( trigger I can counter-diff you for a (( trigger.

I vaguely wanted to make a couple tweaks like having :), :/, and :( immediately dismiss the emoji input anyway.