Skip to content

Fix disappearing badge in commit image thread edit

Samantha Ming requested to merge 19804-keep-bagde-after-commit-edit into master

What does this MR do?

When the user is editing a comment of an image thread on the commit page, the badge disappears when the user saves the comment.

Before

Initial After Edit Refresh
image image image

2017-10-10_13.26.46

This MR

In this MR, we fix this by forcing a page refresh when the edit comment is saved.

commit-thread-image-edit

Note 🍄

Yes, this solution is not ideal but as pointed out here:

Given the rarity of this occurrence (commit comments are rare, image comments are even rarer), I'd be ok in finding a very simple fix, even if forcing a reload of the page.

The code is not shared with MR Diffs and these pages are set to be rewritten into Vue anyway, so not worth putting a lot of effort into it.

Testing case

  1. Navigate to a commit page that contains an image.
  2. Make a comment on the image by clicking on the image and save that comment.
  3. Edit that previously said comment.
  • the page will refresh and the badge on the avatar remains.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #19804 (closed)

Edited by Samantha Ming

Merge request reports

Loading