1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 19:32:40 +01:00
phorge-phorge/src/applications/files
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
..
action Rate limit outbound requests in Macros 2015-03-26 11:11:52 -07:00
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
applicationpanel Allow diffusion.filecontentquery to load data for arbitrarily large files 2016-01-21 09:52:43 -08:00
builtin Add a map marker icon for Milestones 2016-02-05 13:40:52 -08:00
capability Add default policy to Files application 2014-11-21 11:17:20 -08:00
conduit Add support for temporary files to file.allocate 2015-09-04 10:34:32 -07:00
config Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
controller Don't require one-time tokens to view file resources 2016-04-06 14:14:36 -07:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
editor Transactions - make implementing TYPE_XXXX_POLICY transactions optional 2015-05-19 12:58:18 -07:00
engine Swap S3 to first-party client 2016-01-10 07:55:27 -08:00
exception Give users an explicit error if they try to upload a too-large diff to Differential 2016-01-08 18:53:33 -08:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
iconset Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
lipsum Improve bin/lipsum UX 2015-12-24 09:06:35 -08:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
management Swap S3 to first-party client 2016-01-10 07:55:27 -08:00
markup Reduce thumbnail flickering in comment previews 2016-04-06 15:52:52 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Reduce thumbnail flickering in comment previews 2016-04-06 15:52:52 -07:00
storage Reduce thumbnail flickering in comment previews 2016-04-06 15:52:52 -07:00
transform Scale up small cover images instead of surrounding them with empty space 2016-02-06 16:09:38 -08:00
uploadsource Support pushing data into Git LFS 2016-03-18 09:36:34 -07:00
view phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorImageTransformer.php Extend from Phobject 2015-06-15 18:02:27 +10:00