Homec4science

Separate loading inline comments from drawing inline comments

Authored by epriestley <git@epriestley.com> on Feb 23 2013, 15:27.

Description

Separate loading inline comments from drawing inline comments

Summary:
Currently, we issue one Ajax request to get inline comments, and then draw them when they come back. This has some limitations:

  • A user could quickly click image 1, and then click image 2. The request for image 1 may take longer to come back than image 2. In this case, we'd draw the image 2 inlines and then draw the image 1 inlines when that request arrived, resulting in image 2 shown with both image 1 and image 2 comments. This is hard to make happen in a sandbox because the requests are so fast, but prevent it by drawing only the currently visible image's inlines.
  • Every time we want to draw inlines, we need to request them -- even if we've already loaded them! This allows us to draw them without reloading them (although we don't actually do this, yet). When we do, it will make it faster to switch between images you've aleady looked at (and we can do other optimizations).

Test Plan: Clicked between images, saw inlines draw correctly. Added a new inline. Moused over inlines.

Reviewers: chad, ljalonen

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5083

Details

Committed
epriestley <git@epriestley.com>Feb 23 2013, 15:27
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa2abbd560a06: Simplify comment highlight behavior in Pholio
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH7c49f2bf4ffb: Separate loading inline comments from drawing inline comments (authored by epriestley <git@epriestley.com>).Feb 23 2013, 15:27