1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00
phorge-phorge/webroot/rsrc/js/application
epriestley 2b19f91936 Allow Doorkeeper references to have multiple display variations (full, short, etc.)
Summary:
Ref T13102. An install has a custom rule for bridging JIRA references via Doorkeeper and would like to be able to render them as `JIRA-123` instead of `JIRA JIRA-123 Full JIRA title`.

I think it's reasonable to imagine future support upstream for `JIRA-123`, `{JIRA-123}`, and so on, although we do not support these today. We can take a small step toward eventual support by letting the rendering pipeline understand different view modes.

This adds an optional `name` (the default text rendered before we do the OAuth sync) and an optional `view`, which can be `short` or `full`.

Test Plan:
I tested this primarily with Asana, since it's less of a pain to set up than JIRA. The logic should be similar, hopefully.

I changed `DoorkeeperAsanaRemarkupRule` to specify `name` and `view`, e.g `'view' => (mt_rand(0, 1) ? 'short' : 'full')`. Then I made a bunch of Asana references in a comment and saw them randomly go short or long.

Maniphest Tasks: T13102

Differential Revision: https://secure.phabricator.com/D19215
2018-03-13 11:29:52 -07:00
..
aphlict Make "No Notifications" setting less broad, and fix a bug with default display behavior 2017-09-13 15:32:46 -07:00
calendar Remove obsolete Calendar event date storage fields 2016-11-02 09:49:08 -07:00
config Fix custom field selector control in cases where the user doesn't edit anything 2015-05-25 05:34:23 -07:00
conpherence Fix spelling 2017-10-09 10:48:04 -07:00
countdown Define JavaScript functions before they are used 2014-12-30 02:53:32 -08:00
daemon Execute Maniphest batch edits in the background with a web UI progress bar 2015-06-23 13:36:16 -07:00
dashboard Restrict movable panels to non-tab panels 2017-02-14 14:15:59 -08:00
diff When a ChangesetList sleeps after a Quicksand navigation, also hide any visible banner 2018-02-14 15:25:25 -08:00
differential Move "List Inline Comments" to the inline header dropdown menu 2017-06-15 07:11:30 -07:00
diffusion Fix spelling 2017-10-09 10:48:04 -07:00
doorkeeper Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
drydock Show a more reasonable status element for pull requests 2015-10-21 11:28:26 -07:00
files Remove defunt project image choices 2016-01-19 08:50:59 -08:00
harbormaster Improve live Harbormaster log follow behaviors 2018-03-01 13:11:22 -08:00
herald Use a tokenizer, not a gigantic poorly-ordered "<select />", to choose repositories in Owners 2018-03-07 20:57:24 -08:00
maniphest Define bulk edits in terms of EditEngine, not hard-coded ad-hoc definitions 2018-01-19 12:43:47 -08:00
owners Use a tokenizer, not a gigantic poorly-ordered "<select />", to choose repositories in Owners 2018-03-07 20:57:24 -08:00
passphrase Rename Passphrase credential control JS 2015-03-02 13:01:00 -08:00
pholio Fix spelling 2017-10-09 10:48:04 -07:00
phortune Don't try to access the Stripe object until the user submits the credit card form 2017-02-10 08:40:14 -08:00
policy De-garbage the horrible garbage project section of the policy selection control 2016-02-05 09:50:06 -08:00
projects Clean up some colors missing from PHUITagView type shade 2017-05-22 10:52:10 -07:00
releeph Make scrolling happen relative to the main content frame 2015-01-25 08:42:40 -08:00
repository Fix an issue with symbol lookup identifying path names in Diffusion 2018-01-26 13:02:20 -08:00
search Allow profile menu items to be reordered 2016-01-13 11:45:57 -08:00
slowvote Replace the primary scrollbar with a fake one to prepare for a persistent chat column 2015-01-23 13:29:15 -08:00
transactions Don't expand folded timelines just because users went to any anchor whatsoever 2017-08-23 14:52:39 -07:00
typeahead Implement viewer() and members(project) typeahead functions 2015-04-17 11:06:58 -07:00
uiexample Remove some old UIExamples 2017-05-30 18:00:28 -07:00