1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 07:42:40 +01:00
phorge-phorge/src/applications/files/storage
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__ Scramble file secrets when related objects change policies 2016-04-06 14:14:16 -07:00
PhabricatorFile.php Reduce thumbnail flickering in comment previews 2016-04-06 15:52:52 -07:00
PhabricatorFileChunk.php Reduce PhabricatorUser::getOmnipotentUser calls by adding a getViewer method to PhbaricatorDestructionEngine 2015-05-15 14:07:17 -07:00
PhabricatorFileDAO.php Remove @group annotations 2014-07-10 08:12:48 +10:00
PhabricatorFileSchemaSpec.php Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
PhabricatorFileStorageBlob.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
PhabricatorFileTransaction.php File names should be editable. 2015-04-26 15:24:29 -07:00
PhabricatorFileTransactionComment.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
PhabricatorTransformedFile.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00