Skip to content

Stopping posts being made while rich-embed preview processing #2418

Ben requested to merge fix/premature-rich-embed-posting-2418 into master

Summary

Closes #2418 (closed)

Original change on prod is that if you hit enter too quickly after posting a link, it will not post with the rich embed preview. That will upload in a separate comment below after the comment is posted.

Steps to test

  1. Log in and go to a post
  2. Copy a link e.g. https://www.google.com/
  3. Paste it into a comment on the post and repeatedly and rapidly hit enter until the preview is done
  4. it should post with the preview, waiting till the preview is ready.
  5. Repeat with an invalid URL e.g. https://www.ks3fnj3n9.com
  6. it should only post when it's been processed for an available preview - you should see the loading indicator that indicates when this is happening.

Estimated Regression Scope

This feature touches a few areas

  1. It affects when a user can post by directly stopping the user from posting until progress equal to 100, when a rich-embed is detected. In the worst-case, this could conceivably stop users posting in some edge-case situation.

  2. It uses the same progress mechanism as image uploads - I felt it made the most sense as there shouldn't be an overlap of uploading an image and a rich-embed. Regardless, tests one after the other are good.

Merge request reports