1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00
phorge-phorge/webroot/rsrc/css
epriestley 2b4c551b0e Provide a global router for Ajax requests
Summary:
Fixes T430. Fixes T4834. Obsoletes D7641. Currently, we do some things less-well than we could:

  - We just let the browser queue and prioritize requests, so if you load a revision with 50 changes and then click "Award Token", the action blocks until the changes load in most/all browsers. It would be better to prioritize this action and queue it immediately.
  - Similarly, changes tend to load in order, even if the user has clicked to a specific file. When the user expresses a preference for a specific file, we should prioritize it.
  - We show a spinning GIF when waiting on requests. This is appropriate for some types of reuqests, but distracting for others.

To fix this:

  - Queue all (or, at least, most) requests into a new queue in JX.Router.
  - JX.Router handles prioritizing the requests. Principally:
    - You can submit a request with a specific priority (500 = general content loading, 1000 = default, 2000 = explicit user action) and JX.Router will get the higher stuff fired off sooner.
    - You can name requests and then adjust their prorities later, if the user expresses an interest in specific results.
  - Only use the spinner gif for "workflow" requests, which is bascially when the user clicked something and we're waiting on the server. I think it's useful and not-annoying in this case.
  - Don't show any status for draft requests.
  - For content requests, show a subtle hipster-style top loading bar.

Test Plan:
  - Viewed a diff with 93 changes, and clicked award token.
    - Prior to this patch, the action took many many seconds to resolve.
    - After this patch, it resolves quickly.
  - Viewed a diff with 93 changes and saw a pleasant subtle hipster-style loading bar.
  - Viewed a diff with 93 changes and typed some draft text. Previews populated fairly quickly and there was no spinner.
  - Viewed a diff with 93 changes and clicked something with workflow, saw a spinner after a moment.
  - Viewed a diff with 93 changes and clicked a file in the table of contents near the end of the list.
    - Prior to this patch, it took a long time to show up.
    - After this patch, it loads directly.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T430, T4834

Differential Revision: https://secure.phabricator.com/D8979
2014-05-05 10:57:42 -07:00
..
aphront Fix Aphront Filter on mobile 2014-05-02 14:25:05 -07:00
application Use ActionList-based dropdowns in Conpherence 2014-05-05 10:56:38 -07:00
core Provide a global router for Ajax requests 2014-05-05 10:57:42 -07:00
diviner Support WOFF files in Celerity and add Source Sans Pro 2014-03-06 11:28:24 -08:00
font Clean up FontAwesome / Timeline CSS 2014-04-22 18:29:14 -07:00
layout Use ActionList-based dropdowns in Policy 2014-05-05 10:56:57 -07:00
phui Move all comment management junk into a dropdown menu 2014-05-05 10:57:23 -07:00
sprite-actions.css Add action icons to object list views 2013-05-10 12:57:01 -07:00
sprite-apps-large.css Workboard and Aphlict application icons 2014-04-26 15:16:06 -07:00
sprite-apps-xlarge.css Added Feed icons. 2013-01-10 10:00:18 -08:00
sprite-apps.css Workboard and Aphlict application icons 2014-04-26 15:16:06 -07:00
sprite-buttonbar.css ProjectView improvements 2014-02-13 14:36:49 -08:00
sprite-conpherence.css Conpherence - some cleanup type stuff 2013-03-13 13:03:51 -07:00
sprite-docs.css Document icons sprite sheet. 2013-03-10 14:16:16 -07:00
sprite-gradient.css Add objectheaders to new View 2013-09-28 15:55:38 -07:00
sprite-icons.css ProjectView improvements 2014-02-13 14:36:49 -08:00
sprite-login.css Add Persona login icon 2013-10-14 16:33:49 -07:00
sprite-main-header.css Multicolor headers 2013-12-06 12:08:11 -08:00
sprite-menu.css Mobile "quick create" icons. 2013-07-28 13:47:09 -07:00
sprite-minicons.css PhabricatorActionHeaderView v0 2013-04-05 07:40:27 -07:00
sprite-payments.css Payment sprite icons. 2013-04-22 16:41:00 -07:00
sprite-projects.css Add an icon+background selector for project images 2013-10-17 09:32:34 -07:00
sprite-status.css Use ActionList-based dropdowns in Policy 2014-05-05 10:56:57 -07:00
sprite-tokens.css Add Pebkac app icon, 2x Tokens 2013-11-04 11:50:19 -08:00