hypothesis / hypothesis/client

Annotation body height animates when embedded media loads

Open
#1,630 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Mustache
Stars
730
Forks
224
PR merge metrics
No merged PRs in 30d

Description

When an annotation card transitions from _editing_ to _viewing_ states, any changes in the height are animated. This looks strange.

One place where this quite obviously happens is when a YouTube link is replaced with an iframe or an image is rendered:

![animated-resize-on-publish](https://user-images.githubusercontent.com/2458/71643850-b3c62a00-2cb6-11ea-9a10-07a0766ce5fe.gif)

I think the ideal behaviour here would be that the annotation card is immediately rendered with its final height. That is not possible in general because the height of images can change as the media loads. It would be better if any height transitions after saving/canceling an edit were instant however, at least "most" of the time.

One way of resolving this might be to disable animated height transitions after saving an annotation, or alternatively only enable them for a short period of time after clicking the "More"/"Less" links on an annotation card to expand it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.