Skip to content

Hide discussion reply actions when diff_refs is null

What does this MR do and why?

When diff_refs are not available, we already hide the reply functionality on the Overview tab. This change also hides the reply actions on the Changes tab as well to be consistent and avoid console errors.

Changelog: changed

This MR is the last of a series to fix a number of issues around imported comments from GitHub.

MR Bug description Status
Fix discussion_navigation scrolling unresolvable discussions Discussions that were not resolvable were included when scrolling through unresolved discussions Merged
Fix rendering of imported file comments from GitHub Comments made on whole files were not rendering properly on the Overview tab Merged
Hide discussion reply actions when diff_refs is null A "Reply..." text box appears on a discussion in the Changes tab but clicking on it does not render the reply view and leads to a console error 👈 You are here

Screenshots or screen recordings

Before After
MR_Changes_tab_with_imported_discussion_before MR_Changes_tab_with_imported_discussion_after
MR_Changes_tab_with_imported_discussion_console_error No console error

How to set up and validate locally

Note: This might not be the easiest to replicate but here are the main steps:

  1. (If you don't already have one) Create a GitHub project (yes GitHub) that can be tested on.
  2. Create a Pull Request with changes to at least 1 file (you can test with image / binary files as well). Add a file comment (a comment on the whole file, has a separate button on the top right) and some normal comments.
  3. Open GitLab, in the sidebar select + > New project/repository.
  4. Select Import project > GitHub. Then fill in a GitHub-issues Personal Access Token and click Authenticate.
  5. Select the project from 1 for import. Once the import is complete, view the Merge Request that was created from importing the PR from step 2.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #381503 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports