Improve visibility of deploy boards
Description
Deploy boards have an inconsistent state when they are loading, showing the empty state even if they are not empty. This is due to the fact that the frontend needs to receive information by the backend to know something about them. It is also a possible performance issue if we have many deploy boards opened at the same time, as each of them requires a separate polling.
The solution was to make deploy boards closed by default, but this breaks the usability of the feature.
This issue is intended to solve once for all the problem, reverting the previous behavior (deploy boards open by default) without impacting performances.
After that it was changed to be opened by default as per this issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/2106
The change did not worked well at the time and it does not work well with polling:
- We request
environments.json
endpoint - that does not bring deploy boards data - If the environment has a deploy board we render the empty state
- We start the request for the deploy board and load a sinner
- When we receive the data we show the deploy board.
This caused a bad UX, so we reverted to have them all closed by default.
Open by default | Closed by default |
---|---|
Technical problems of open by default
- When we have 20 environments in a page this means requesting 21 endpoints every 15 seconds, because we poll all of them. The all table is not visible in one screen with all the deploy boards opened.
Proposal
Make Deploy boards open by default, showing the spinner instead of the empty state when no data is available for a specific environment. It happens between the first load of the table and the first request for the status (that will show the same spinner as well).
In order to avoid performance issues, one single request will be done for all the boards, instead of one request for each board.
See the proposed solution at https://gitlab.com/gitlab-org/gitlab-ee/issues/3328#note_40369486.
Possible further implications about performance if we have all deploy boards open by default are considered in https://gitlab.com/gitlab-org/gitlab-ee/issues/3422.