1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 19:52:44 +01:00
phorge-phorge/src/aphront/response
epriestley 5664c838fb Reduce thumbnail flickering in comment previews
Summary:
Ref T10262. Currently, we always render a tag like this when you `{F123}` an image in remarkup:

```
<img src="/xform/preview/abcdef/" />
```

This either generates the preview or redirects to an existing preview. This is a good behavior in general, because the preview may take a while to generate and we don't want to wait for it to generate on the server side.

However, this flickers a lot in Safari. We might be able to cache this, but we really shouldn't, since the preview URI isn't a legitimately stable/permanent one.

Instead, do a (cheap) server-side check to see if the preview already exists. If it does, return a direct URI. This gives us a stable thumbnail in Safari.

Test Plan:
  - Dragged a dog picture into comment box.
  - Typed text.
  - Thing didn't flicker like crazy all the time in Safari.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10262

Differential Revision: https://secure.phabricator.com/D15646
2016-04-06 15:52:52 -07:00
..
__tests__ Be more strict about "Location:" redirects 2014-08-18 14:11:06 -07:00
Aphront304Response.php Remove @group annotations 2014-07-10 08:12:48 +10:00
Aphront400Response.php Remove @group annotations 2014-07-10 08:12:48 +10:00
Aphront403Response.php Update AphrontRequestFailure to common display libs 2014-09-26 17:40:09 -07:00
Aphront404Response.php phtize all the things 2015-05-22 21:16:39 +10:00
AphrontAjaxResponse.php Modularize Celerity postprocessors 2015-06-20 06:10:42 -07:00
AphrontDialogResponse.php Remove @group annotations 2014-07-10 08:12:48 +10:00
AphrontFileResponse.php Don't require one-time tokens to view file resources 2016-04-06 14:14:36 -07:00
AphrontHTMLResponse.php Remove @group annotations 2014-07-10 08:12:48 +10:00
AphrontHTTPProxyResponse.php Strip "Transfer-Encoding" headers from proxied HTTP responses 2016-01-07 16:33:09 -08:00
AphrontJSONResponse.php Various linter fixes 2015-05-20 07:27:41 +10:00
AphrontPlainTextResponse.php Fix an undeclared property on AphrontPlainTextResponse 2015-06-15 07:05:03 -07:00
AphrontProxyResponse.php Don't require one-time tokens to view file resources 2016-04-06 14:14:36 -07:00
AphrontRedirectResponse.php Improve granluarity and defaults of security.allow-outbound-http 2015-03-23 10:44:03 -07:00
AphrontReloadResponse.php Remove @group annotations 2014-07-10 08:12:48 +10:00
AphrontResponse.php Reduce thumbnail flickering in comment previews 2016-04-06 15:52:52 -07:00
AphrontStandaloneHTMLResponse.php Improve top-level exception handling 2015-01-02 10:49:27 -08:00
AphrontUnhandledExceptionResponse.php Replace AphrontUsageException with AphrontMalformedRequestException 2015-09-03 10:04:17 -07:00
AphrontWebpageResponse.php Remove @group annotations 2014-07-10 08:12:48 +10:00