1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00
Commit graph

51 commits

Author SHA1 Message Date
epriestley
8796a6036e Let users escape more easily from the autosuggester after typing "[" or "("
Summary:
Ref T13077. The autosuggester is a little too eager right now, and will eat carriage returns after typing `[` if you never activate the tokenizer.

To fix this, try just canceling sooner. If that doesn't work, we might need to cancel more eagerly by testing to see if the tokenizer is actually open.

Test Plan: Typed `[x]<return>`, got my return instead of getting trapped by the autosuggester.

Maniphest Tasks: T13077

Differential Revision: https://secure.phabricator.com/D19110
2018-02-16 11:02:48 -08:00
epriestley
0202c36b62 Suggest Phurl URLs on "((..." in Remarkup text areas
Summary: Depends on D19108. Ref T12241. Ref T13077. See D19108. This extends the `[[ ...` autocompleter to `((...` for Phurl URLs.

Test Plan: Typed `((th`, got `((thing))` suggested.

Reviewers: avivey

Reviewed By: avivey

Maniphest Tasks: T13077, T12241

Differential Revision: https://secure.phabricator.com/D19109
2018-02-16 09:56:39 -08:00
epriestley
8771b7d5c4 Add autocomplete for Phriction documents on "[[ ..." in Remarkup
Summary: Depends on D19107. Ref T13077. The underlying datasource may need some adjustment but this appears to work properly locally.

Test Plan: Typed `[[ por` locally, was suggested "Porcupine Facts". Typed `[[ / ]]`, saw it render as a reference to the wiki root instead of the install root.

Maniphest Tasks: T13077

Differential Revision: https://secure.phabricator.com/D19108
2018-02-16 09:56:18 -08:00
epriestley
c9df8f77c8 Fix transcription of single-value bulk edit fields ("Assign to")
Summary: See PHI333. Some of the cleanup at the tail end of the bulk edit changes made "Assign To" stop working properly, since we don't strip the `array(...)` off the `array(PHID)` value we receive.

Test Plan:
  - Used bulk editor to assign and unassign tasks (single value datasource).
  - Used bulk editor to change projects (multi-value datasource).

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18975
2018-01-31 10:56:16 -08:00
epriestley
687fada5af Restore bulk edit support for remarkup fields (description, add comment)
Summary:
Depends on D18866. Ref T13025. Fixes T12415. This makes the old "Add Comment" action work, and adds support for a new "Set description to" action (possibly, I could imagine "append description" being useful some day, maybe).

The implementation is just a `<textarea />`, not a whole fancy remarkup box with `[Bold] [Italic] ...` buttons, preview, typeaheads, etc. It would be nice to enrich this eventually but doing the rendering in pure JS is currently very involved.

This requires a little bit of gymnastics to get the transaction populated properly, and adds some extra validation since we need some code there anyway.

Test Plan:
  - Changed the description of a task via bulk editor.
  - Added a comment to a task via bulk editor.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13025, T12415

Differential Revision: https://secure.phabricator.com/D18867
2018-01-19 12:45:34 -08:00
epriestley
09e71a4082 Define bulk edits in terms of EditEngine, not hard-coded ad-hoc definitions
Summary:
Depends on D18862. See PHI173. Ref T13025. Fixes T10005. This redefines bulk edits in terms of EditEngine fields, rather than hard-coding the whole thing.

Only text fields -- and, specifically, only the "Title" field -- are supported after this change. Followup changes will add more bulk edit parameter types and broader field support.

However, the title field now works without any Maniphest-specific code, outside of the small amount of binding code in the `ManiphestBulkEditor` subclass.

Test Plan: Used the bulk edit workflow to change the titles of tasks.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13025, T10005

Differential Revision: https://secure.phabricator.com/D18863
2018-01-19 12:43:47 -08:00
Dmitri Iouchtchenko
9bd6a37055 Fix spelling
Summary: Noticed a couple of typos in the docs, and then things got out of hand.

Test Plan:
  - Stared at the words until my eyes watered and the letters began to swim on the screen.
  - Consulted a dictionary.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, yelirekim, PHID-OPKG-gm6ozazyms6q6i22gyam

Differential Revision: https://secure.phabricator.com/D18693
2017-10-09 10:48:04 -07:00
Chad Little
11046d495d Add a selected button ui state
Summary: Only for grey buttons, but can expand. Sets a selected class.

Test Plan: Review new changes in UIExamples.

Reviewers: epriestley

Reviewed By: epriestley

Spies: Korvin

Differential Revision: https://secure.phabricator.com/D18501
2017-08-30 10:14:29 -07:00
Chad Little
020f3c729a Fix username typeahead in Remarkup with German keyboard layout
Summary:
Ref T10252. The previous fix rPa8a9fddb0738 only works for macOS.
Under Windows the @ symbol is composed of AltGr+q. For Chrome and Edge the "AltGr" keypressEvent is like pressing the Control key and the Alt key at the same time.
This fix changes the condition in such a way, that this case (pressing Control and Alt at the same time) is not blocked.

Test Plan:
Testing for the issue:

 - Launch Windows 10, Select German Keyboard, Use latest Chrome (60)
 - Observe typing `@` does not trigger typeahead
 - Apply patch, retest, see typeahead.

Regression tested:

 - Windows 10, Chrome, Firefox, Edge
 - Mac OS, Chrome, Firefox, Safari
 - Keyboard layouts, English, French, German, Spanish

All tests passed

Reviewers: benwick, epriestley

Reviewed By: epriestley

Subscribers: epriestley

Maniphest Tasks: T10252

Differential Revision: https://secure.phabricator.com/D18269
2017-08-03 10:46:32 -07:00
epriestley
9b93697d52 Move "List Inline Comments" to the inline header dropdown menu
Summary: See D18128. Ref T12733. Ref T8250.

Test Plan: {F5003153}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733, T8250

Differential Revision: https://secure.phabricator.com/D18129
2017-06-15 07:11:30 -07:00
Chad Little
d3c464a610 Separate button CSS classes
Summary: Try to dis-ambiguate various button types and colors. Moves `simple` to `phui-button-simple` and moves colors to `button-color`.

Test Plan: Grep for buttons still inline, UIExamples, PHUIX, Herald, and Email Preferences.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18077
2017-06-05 20:14:34 +00:00
epriestley
48c6ca40c4 Add an "Unsaved" button to the Differential persistent header
Summary: Ref T12733.

Test Plan: {F4987956}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733

Differential Revision: https://secure.phabricator.com/D18070
2017-06-05 09:48:08 -07:00
Chad Little
c001781264 Allow buttons to just be icons
Summary: Let's buttons just be an icon, no pressure to also have text.

Test Plan: UIExamples, Search, Home, Policy Controls... Probably 99% of them.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18056
2017-06-01 06:37:42 -07:00
epriestley
683647f1fb Add PHUIXButtonView and a UIExample
Summary:
Ref T12733. Ref M1476. This adds `PHUIXButtonView`, for client-side button rendering.

It also adds a PHUIX example which renders the server and client versions of each component side-by-side so it's easier to see if they're messed up.

Test Plan: {F4984128}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733

Differential Revision: https://secure.phabricator.com/D18051
2017-05-30 18:01:16 -07:00
epriestley
adb1d3a5be Fix autocomplete/send-on-enter interactions
Summary:
Send-on-enter and autocomplete both listen for "return" keypresses, and could race. Have autocomplete let other handlers take a shot at the action before it does.

Also, fix a case where ":)" and the suffix list (which lets you type `someone is 100% to blame here (@epriestley)` and get the results you want) interacted badly, so ":)" cancels the autocompleter like ":3" does.

Test Plan:
  - Typed "@xxx" and mashed return real fast over and over again while reloading the page. Before: sometimes handlers raced and text submitted. After: always handled by autocomplete behavior.
  - Typed ":", ")", "<return>", sent an emoticon (previously: no).

Reviewers: chad, amckinley

Reviewed By: chad

Subscribers: xxx

Differential Revision: https://secure.phabricator.com/D17794
2017-04-26 08:48:25 -07:00
epriestley
f0fbf7a7d3 Sort "closed" results (like disabled users) to the bottom of typeaheads, but don't hide them completely
Summary:
Fixes T12538. Instead of hiding "closed" results unless only closed results match, show closed results but sort them to the bottom.

This fixes the actual issue in T12538, and I think this is probably the correct/best behavior for the global search.

It also makes all other typeaheads use this behavior. They currently have a "bug" where enabled user `abcd` makes it impossible to select disabled user `abc`. This manifests in some real cases, where enabled function `members(abc)` makes it impossible to disabled user `abc` in some function tokenizers.

If ths feels worse, we could go back to filtering in the simpler cases and introduce a rule like "show closed results if only closed results would be shown OR if query is an exact match for the disabled result", but that gets dicier because "exact match" is a fuzzy concept.

(There are a lot of other minor bad behaviors that this doesn't try to fix.)

Test Plan:
Enabled project "instabug" no longer prevents bot user "instabug" from being shown:

{F4903843}

Disabled user "mmaven" is sorted below enabled user "mmclewis", in defiance of the otherwise alphabetical order. There's no visual cue that this user is disabled because of T6906.

{F4903845}

Same as above, but this source renders "disabled" in a more obvious way:

{F4903848}

Function selecting members of active project `members(instabug)` no longer prevents selection of bot user `instabug`:

{F4903849}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12538

Differential Revision: https://secure.phabricator.com/D17695
2017-04-14 13:01:48 -07:00
epriestley
130ebd2c42 Immediately deactivate remarkup autocomplete if there's no query
Summary:
Fixes T12479. If you end a line with a character like ":" in a context which can trigger autocomplete (e.g., `.:`), then try to make a newline, we swallow the keystroke.

Instead, allow the keystroke through if the user hasn't typed anything else yet.

Test Plan:
  - Autocompleted emoji and users normally.
  - In an empty textarea, typed `.:<return>`, got a newline instead of a swallowed keystroke.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12479

Differential Revision: https://secure.phabricator.com/D17583
2017-03-30 11:29:54 -07:00
epriestley
add1038109 Don't summon the emoji autocompleter for ":3"
Summary:
Fixes T12460. Also ":)", ":(", ":/", and oldschool ":-)" variants.

Not included are variants with actual letters (`:D`, `:O`, `:P`) and obscure variants (`:^)`, `:*)`).

Test Plan: Typed `:3` (no emoji summoned). Typed `:dog3` (emoji summoned). Typed `@3` (user autocomplete summoned).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12460

Differential Revision: https://secure.phabricator.com/D17577
2017-03-28 15:50:56 -07:00
epriestley
fab37aa4e3 When accepting revisions, allow users to accept on behalf of a subset of reviewers
Summary:
Ref T12271. Currenty, when you "Accept" a revision, you always accept it for all reviewers you have authority over.

There are some situations where communication can be more clear if users can accept as only themselves, or for only some packages, etc. T12271 discusses some of these use cases in more depth.

Instead of making "Accept" a blanket action, default it to doing what it does now but let the user uncheck reviewers.

In cases where project/package reviewers aren't in use, this doesn't change anything.

For now, "reject" still acts the old way (reject everything). We could make that use checkboxes too, but I'm not sure there's as much of a use case for it, and I generally want users who are blocking stuff to have more direct accountability in a product sense.

Test Plan:
  - Accepted normally.
  - Accepted a subset.
  - Tried to accept none.
  - Tried to accept bogus reviewers.
  - Accepted with myself not a reviewer
  - Accepted with only one reviewer (just got normal "this will be accepted" text).

{F4251255}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12271

Differential Revision: https://secure.phabricator.com/D17533
2017-03-22 14:25:04 -07:00
Chad Little
f930fd2e00 Add an Emoji Typeahead
Summary:
This adds a more complete emoji datasource, with a typeahead and autocomplete. It works by pulling in a raw datasource from EmojiOne (I chose Unicode 8, but they have a Unicode 9 datasource as well) and transforming it for speed/need. If we build more robustness or an actual picker into the Remarkup bar, having the additional keywords, etc, might be important. When Unicode 9 support is more prevalent, we should only need to update the single file.

 Tossing up as a proof of concept on engineering direction. Also I can't quite get the autocomplete to complete.

Test Plan: Test UIExamples, Autocomplete, and TypeaheadSource

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12139

Differential Revision: https://secure.phabricator.com/D17244
2017-01-24 13:13:10 -08:00
epriestley
45c3aaeb26 Attempt to make dropdown item actions more consistent
Summary:
See D17210. Currently, this handler needs to be installed on each menu that doesn't build with the default behavior.

Rather than copy-pasting it to the user menu, try to make it a default behavior. This adds a new rule: don't close the menu if the item is a dynamic item built in JS with PHUIXActionView.

This allows dynamic items to control the menu themselves, while giving static items the desired default behavior.

Test Plan:
  - Opened menus on: dashboards, user menu, timeline comments. Clicked stuff. Menus went away.
  - Other menus still seemed to work right: Diffusion, Favorites, mobile menu.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17222
2017-01-18 13:14:54 -08:00
Chad Little
6f5dab634d Redesign header menus and search
Summary:
Still lots to fix here, punting up since I'm running into a few roadblocks.

TODO:
[] Sort Personal/Global correctly
[] Quicksand in Help Items correctly on page changes

Test Plan: Verify new menus work on desktop, tablet, mobile. Test logged in menus, logged out menus. Logging out via a menu, verify each link works as expected. Help menus get build when using an app like Maniphest, Differential. Check that search works, preferences still save.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12107

Differential Revision: https://secure.phabricator.com/D17209
2017-01-17 12:13:06 -08:00
epriestley
3c5a17ba8a Restore "Reclaim" and "Abandon" actions to Differential on EditEngine
Summary: Ref T11114. This begins restoring comment actions to Differential, but on top of EditEngine.

Test Plan: {F2263148}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17107
2016-12-31 10:06:46 -08:00
Chad Little
d78802f3ab Redesign Comment Box
Summary: Redesign the action comment box for better use in two column, mobile, nuance.

Test Plan: Test in mobile / desktop / tablet, adding and removing actions. Actionless comment boxes, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: cspeckmim, Korvin

Differential Revision: https://secure.phabricator.com/D16811
2016-11-09 10:36:25 -08:00
epriestley
a8a9fddb07 Trigger autocomplete when "@" is typed on German keyboards
Summary:
Ref T10252. On the German keyboard layout, you must type "Alt" + "L" to generate an "@" character.

We currently ignore this event, assuming it's a keyboard command. However, I think we can safely continue so that autocomplete works on German layouts.

Test Plan:
  - Switched keyboard layout to German.
  - Typed Alt + L to generate an "@".
  - Typed some username text.
  - Got autocompleter.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10252

Differential Revision: https://secure.phabricator.com/D16259
2016-07-08 08:36:35 -07:00
epriestley
56d3197fe0 Fold task-relationship actions into an accordion dropdown
Summary:
Ref T11179. Alternative to D16152. I think this turned out a bit better than the other one did.

Currently, we render two copies of the menu (one for mobile, one for desktop). A big chunk of this is sharing the nodes instead: when you open the mobile dropdown menu, it steals the nodes from the document. When you close it, it puts them back. Magic! Sneaky!

Test Plan:
{F1695499}

{F1695500}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11179

Differential Revision: https://secure.phabricator.com/D16157
2016-06-20 19:14:27 -07:00
epriestley
67629aab14 Implement a rough optgroup-based "Move on Workboard" stacked action
Summary:
Ref T6027. Try this out and see how it feels? Clear issues:

  - This definitely shouldn't be at the top.
  - You should probably be able to select it multiple times?
  - Some of the "which columns show up" rules might need adjustment?
  - Diamond marker maybe not great?

Not sure I love this but it doesn't feel //terrible//...

Test Plan: {F1207891}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6027

Differential Revision: https://secure.phabricator.com/D15638
2016-04-06 09:15:12 -07:00
epriestley
f84130f9cd Support enabling a formal points field in Maniphest
Summary:
Ref T4427.

  - New config option for labels, enabling, etc., but no UI/niceness yet.
  - When enabled, add a field.
  - Allow nonnegative values, including fractional values.
  - EditEngine is nice and Conduit / actions basically just work with a tiny bit of extra support code.

Test Plan:
  - Edited points via "Edit".
  - Edited points via Conduit.
  - Edited points via stacked actions.
  - Tried to set "zebra" points.
  - Tried to set -1 points.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4427

Differential Revision: https://secure.phabricator.com/D15220
2016-02-08 18:14:44 -08:00
epriestley
64b1b212df Cancel autocomplete on "{" and "}"
Summary: Ref T10163. These are almost certainly not username/project characters, and are fairly likely to be `@{...}` Diviner references.

Test Plan: Typed `@{...`, no more autocomplete.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15110
2016-01-24 15:03:36 -08:00
epriestley
7ab970d1a7 Eat right-click, etc., on autocomplete suggestion menu
Summary:
Ref T10163. If you right-click the suggestion menu, just eat it. I don't think we can really choose a different behavior reasonably, or that users have any reason to do this.

I'm leaving "clicking the header dismisses it", I think that behavior is fine and reasonable.

Test Plan: Control-clicked a suggestion menu, didn't trigger a suggestion.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15042
2016-01-16 15:52:26 -08:00
epriestley
b7fe07bbd6 When autocompleting, add a space if a user didn't already add something
Summary: Ref T10163. When a user autocompletes, add a space for them, unless they already added a comma, colon, or space themsevles.

Test Plan: Autocompleted `@dog`, got `@dog `. Autocompleted `@epriestley,` got `@epriestley,`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15041
2016-01-16 15:18:49 -08:00
epriestley
75781dba1a Improve autocomplete behavior in lists and with noncompleting results
Summary:
Ref T10163. Currently, we don't activate on indented lines, but were too aggressive about this, and would not activate on lines like `  - Hey, @user...`, where we should.

Instead, don't activate on indented lines if there's only an indent (i.e., `#` probably means enumerated list).

Also, if results don't have autocompletes (rare but possible with projects missing slugs), improve behavior.

Test Plan:
  - Typed `  #a`, got no autocomplete.
  - Missing slug thing is a pain to test locallly, `#1 z z z z` reproduces in production. I'll just verify it there.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15040
2016-01-16 15:18:24 -08:00
epriestley
75b8d3312b Hide the autocompleter intelligently when you ignore it and keep typing
Summary:
Ref T10163. When we think the user has finished typing a word (because they typed a space, period, or other similar characters) and nothing else they might type could possibly change the outcome (usually because the words they have typed already match nothing), just deactivate the autocomplete.

As a special case, if the word they have typed already select exactly one result, //and// they have already typed exactly that result,  assume they just typed it from memory and deactivate.

Test Plan:
  - Typed `@dog qwer zxcv` and saw autocomplete deactivate on the space before `z` (on my local install, `@dog` is ambiguous but `@dog qwer` matches nothing).
  - Typed `@epriestley ` and saw autocomplete deactivate on space.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15039
2016-01-16 14:41:43 -08:00
epriestley
849b4c765a When the autocompleter would fall off the bottom of the screen, put it above the text instead
Summary: Ref T10163. In cases like Conpherence, the autocompleter can currently render off the bottom of the screen. Put it above if it would be offscreen.

Test Plan: {F1062286}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15038
2016-01-16 14:38:25 -08:00
epriestley
14ebf662f3 Don't show the autocompleter until the user types at least one character
Summary: Ref T10163. Activate on `@d`, not just `@`. Note that if you type `@d` and then press delete once so you're left with `@`, we stay active (and show the "type a username" hint).

Test Plan:
  - Typed `@`, no completer.
  - Typed `d`, got completer.
  - Typed delete, still had completer, now showing hint prompt.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15037
2016-01-16 14:38:11 -08:00
epriestley
4f3a9a8aca Immediately cancel autocomplete if the user types certain characters anywhere
Summary:
Ref T10163. Some characters are almost certainly punctuation or markup rather than autocomplete requests. Immediately cancel any active autocomplete when the user types one of these.

Note that some of these are also suffix characters. If you type `@dog,`, you have until the next character to decide you actually mean to autocomplete. Once you type something else we deactivate.

If you type `#dog#` or `##`, we deactivate immediately.

Test Plan: Typed `@dog#`, etc.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15036
2016-01-16 14:38:00 -08:00
epriestley
df272dfa26 Allow autocomplete to activate after ">", ":" or "!"
Summary: Ref T10163. This allows activation in blockquotes or after `NOTE:`, for consistency.

Test Plan: Typed `>@dog`, etc., got autocomplete.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15035
2016-01-16 13:28:48 -08:00
epriestley
2d495e9701 Improve autocomplete behavior when typing ordered lists
Summary:
Ref T10163.

  - If a user types an autocomplete character ("@" or "#") and then a space, deactivate immediately (probably an ordered list).
  - If a user types an autocomplete character indented on a line with no other prior text, don't activate (probably an ordered list or code block).

Test Plan:
Typed:

  - `# `, saw immediate deactivation.
  - ` #`, saw no activation in the first place.
  - `#x`, saw activation.
  - `asdf #x`, saw activation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15033
2016-01-15 11:19:04 -08:00
epriestley
7f19216e44 Better fix for autocomplete blur (select on mousedown instead of delaying blur)
Summary: Ref T10163. I would still sometimes not get a replacement after clicking with the delayed blur. This seems to fix the issue more consistently: instead of listening for a click event (which fires after the blur), listen for a mousedown event (which fires before the blur).

Test Plan: Observed consistent selection via mouse locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15032
2016-01-15 09:47:23 -08:00
epriestley
3c19004f9f Fix blur and sort behavior for autocomplete
Summary:
Ref T10163.

  - If you click a result, we get a blur before your click hits, and deactivate before the click can work. Instead, wait before responding to blur.
  - Use the standard sort handler which puts unixnames over human names. Also use the standard filter which deals with disabled users not matching unless they're the only match.

Test Plan:
  - Clicked a result, got a replacement.
  - Named myself "dog dog", typed "@dog", user "@dog" was now first match despite me being "@admin".
  - Used normal typeaheads to make sure I didn't break sort handler.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10163

Differential Revision: https://secure.phabricator.com/D15031
2016-01-15 09:33:15 -08:00
epriestley
5d6dd7df7d Add a basic remarkup typeahead for users and projects
Summary: Ref T3725. This probably has 900,000 bugs. This will need updates for subprojects/milestones.

Test Plan:
  - Tested very gently in Safari, Firefox and Chrome.
  - Reasonable inputs appear to work.
  - Clicking, escape, tab, return, arrow keys work OK?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T3725

Differential Revision: https://secure.phabricator.com/D15029
2016-01-15 09:11:46 -08:00
epriestley
273e22d59f Save stacked actions in drafts, not just comments
Summary:
Ref T9132. Fixes T4580. Thhat might actually have been fixed a while ago or something since it describes a buggy/bad interaction which doesn't reproduce for me at HEAD.

This saves and restores all the stacked actions (subscribers, projects, etc) so that you don't lose anything if you close a window by accident.

Test Plan:
Added a bunch of actions in various states, reloaded the page, draft stuck around.

Submitted form, actions didn't stick around anymore.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4580, T9132

Differential Revision: https://secure.phabricator.com/D14675
2015-12-04 16:29:43 -08:00
epriestley
f9e84d1a88 Make "Assign / Claim" stacked action work properly in Maniphest
Summary:
Ref T9132. This is kind of a mess because the tokenizer rewrite left rendering tokenizers in Javascript a little rough. This causes bugs like icons not showing up on tokens in the "Policy" dialog, which there's a task for somewhere I think.

I think I've fixed it enough that the beahavior is now correct (i.e., icons show up properly), but some of the code is a bit iffy. I'll eventually clean this up properly, but it's fairly well contained for now.

Test Plan:
  - Reassigned a task.
  - Put a task up for grabs.
  - No reassign on closed tasks.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14669
2015-12-04 16:29:35 -08:00
epriestley
92ea07e787 Restore "Change Status" and "Change Priority" comment actions to Maniphest
Summary: Ref T9132. Supports selects in stacked actions and adds "Change Status" + "Change Priority".

Test Plan: Changed status and priority from stacked actions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14667
2015-12-04 16:29:33 -08:00
epriestley
dc0d914134 Basic stacked action support for EditEngine
Summary: Ref T9132. This still has a lot of rough edges but the basics seem to work OK.

Test Plan: {F1012627}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14653
2015-12-03 12:32:02 -08:00
Chad Little
91714568f5 Adds a setLabel function to ActionView
Summary: I copied some JavaScript. I think I did OK. Though, I couldn't stop icons from writing HTML as undefined. Anyways, this give us more options, like labels, when drawing ActionViews. I'll update the UI in other places like Policy too.

Test Plan:
Built and tested on the search ui dropdown.

{F379678}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12522
2015-04-23 07:03:03 -07:00
Chad Little
3a81f8c68d Convert rest of SPRITE_STATUS to FontAwesome
Summary:
Updates policy, headers, typeaheads to FA over policy icons

Need advice - can't seem to place where icons come from on Typeahead? Wrong icons and wrong colors.... it is late

Test Plan:
- grepped for SPRITE_STATUS
- grepped for sprite-status
- grepped for setStatus for headers
- grepped individual icons names

Browsed numerous places, checked new dropdowns, see pudgy people.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4739

Differential Revision: https://secure.phabricator.com/D9179
2014-05-18 16:10:54 -07:00
epriestley
bfc1ccfdf1 Move all comment management junk into a dropdown menu
Summary:
man I sure hate Javascript

I removed the ajax-edit and ajax-remove interactions, becuase they were prohibitively complex to get working given that the entire menu has to change too. Instead, the page just reloads. This works perfectly fine in practice.

If we want to restore these in the future, we should have the server re-render the entire transaction group or something. I think very little is lost here, though.

Test Plan:
  - Took all the actions.
  - Used existing dropdown menus.

{F150196}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8966
2014-05-05 10:57:23 -07:00
epriestley
cb44531751 Use ActionList-based dropdowns in Policy
Summary: See previous diffs. These mostly look reasonable with shared CSS.

Test Plan: {F150431}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8975
2014-05-05 10:56:57 -07:00
epriestley
7584d10b49 Use ActionList-based dropdowns in Conpherence
Summary:
See D8966, D8973. Replace PhabricatorDropdownMenu with PHUIXDropdownMenu.

These new menus look weird on mobile because all action lists pick up a bunch of weird styles on mobile and we're now reusing the CSS.

Test Plan:
{F150425}

{F150426}

Reviewers: btrahan, chad

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8974
2014-05-05 10:56:38 -07:00