Skip to content

Conditionally render a spinner at the top/bottom of the Edit dropdown

What does this MR do and why?

The workspaces loading spinner is always rendered at the top of the Edit dropdown whereas the workspaces section can be rendered at the top and at the bottom. The spinner is visible on the first click of the Edit button after the page loads.

This fix is to render the spinner:

  • at the top when the workspaces ARE supported
  • at the bottom when the workspaces are NOT supported

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
When workspaces are NOT supported Screen Recording 2023-09-06 at 16.23.10.mov Screen Recording 2023-09-06 at 16.26.41.mov
When workspaces are supported Screen Recording 2023-09-06 at 16.33.59.mov Screen Recording 2023-09-06 at 16.28.21.mov

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Have an EE license uploaded to your GitLab instance
  2. If you have workspaces supported, update the ee/app/assets/javascripts/vue_shared/components/web_ide_link.vue component: set this.supportsWorkspaces = to false in the onProjectDetailsResult method
  3. Go to any project page and reload it
  4. Click on the Edit button
  5. See the spinner is rendered at the top
  6. Apply changes from this MR
  7. If you have workspaces supported, update the ee/app/assets/javascripts/vue_shared/components/web_ide_link.vue component: set this.supportsWorkspaces = to false in the onProjectDetailsResult method
  8. Reload the project page
  9. See the spinner is rendered at the bottom
  10. Update the ee/app/assets/javascripts/vue_shared/components/web_ide_link.vue component: set this.supportsWorkspaces = to true in the onProjectDetailsResult method
  11. Reload the project page
  12. See the spinner is rendered at the top

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 #420326 (closed)

Merge request reports