Skip to content

fix: Loading state in the workspaces page #2967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

I noticed the loading state for the workspaces page was broken.

Before:
You can notice it displays the empty state and right after, the workspace list.

Screen.Recording.2022-07-13.at.10.13.24.mov

After:
The loading state is displayed before showing the list

Screen.Recording.2022-07-13.at.10.26.13.mov

Why?
We were using the loading tag to match the loading state but, we would also have to use it in the gettingWorkspace since it is also a "loading" state but, since we are using it for refreshing as well, the loading state would be displayed every 5 seconds.

Possible solutions

  • Check if there are workspaces or not
  • Add a new state for refreshing so we could tag idle and gettingWorkspace as loading. Basically, the refreshing state would be identical to the gettingWorkspace but this would help us to better split the "responsibilities" even if in the implementation, they look the same

What did I chose?
I chose the first option because it is way more simple and I think it is easy enough to follow, but I'm open to suggestions.

@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner July 13, 2022 13:34
@BrunoQuaresma BrunoQuaresma self-assigned this Jul 13, 2022
@BrunoQuaresma BrunoQuaresma merged commit 0212933 into main Jul 13, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-workspace-loading-state branch July 13, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants