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.
- Have an EE license uploaded to your GitLab instance
- If you have workspaces supported, update the
ee/app/assets/javascripts/vue_shared/components/web_ide_link.vue
component: setthis.supportsWorkspaces =
tofalse
in theonProjectDetailsResult
method - Go to any project page and reload it
- Click on the Edit button
- See the spinner is rendered at the top
- Apply changes from this MR
- If you have workspaces supported, update the
ee/app/assets/javascripts/vue_shared/components/web_ide_link.vue
component: setthis.supportsWorkspaces =
tofalse
in theonProjectDetailsResult
method - Reload the project page
- See the spinner is rendered at the bottom
- Update the
ee/app/assets/javascripts/vue_shared/components/web_ide_link.vue
component: setthis.supportsWorkspaces =
totrue
in theonProjectDetailsResult
method - Reload the project page
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #420326 (closed)