HomePhabricator

Reduce thumbnail flickering in comment previews

Description

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

Details

Provenance
epriestleyAuthored on Apr 6 2016, 9:48 PM
epriestleyPushed on Apr 6 2016, 10:52 PM
Reviewer
chad
Differential Revision
D15646: Reduce thumbnail flickering in comment previews
Parents
rP8aad862cd4e2: Normalize casing on property boxes
Branches
Unknown
Tags
Unknown
Tasks
T10262: Scramble file secrets when attached objects change their view policies
Build Status
Buildable 11572
Build 14457: Run Core Tests