Skip to content

Show work item comments locked warning only after loading is finished

What does this MR do and why?

This MR adds a boolean isLoading to the comment box component for a task, and it only shows the warning about the task being locked if !isLoading.

(I noticed this while locally testing the tasks UI when I was reviewing an MR)

Screenshots or screen recordings

Before After
Screen_Recording_2023-09-27_at_12.15.21
A warning that reads This Task is locked. Only project members can comment. is briefly shown on the screen while loading, in the spot where the comment box inside the task modal will be, even when the task is not locked
Screen_Recording_2023-09-27_at_12.13.43
No locked warning is shown during the loading process

How to set up and validate locally

  1. git checkout master
  2. create an issue
  3. create a task within the issue
  4. click on the task to open the task modal
  5. refresh the page and watch for the warning to appear while the page loads 🐛
  6. git checkout fix-work-item-comments-locked-flash-while-loading
  7. refresh the page again, no warning should appear while the page loads 🎉

MR acceptance checklist

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

Edited by Miranda Fluharty

Merge request reports