Skip to content
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

add spinner gif to display instead of No results while data is loading #573

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

grmbyrn
Copy link

@grmbyrn grmbyrn commented Jun 11, 2024

I added spinner.gif to torrents.vue to display instead of No results, which currently flashes on the screen when torrents are being loaded as mentioned here.

<span data-cy="no-results-element" class="text-neutral-content flex items-center justify-center">
  <img src="/spinner.gif" class="w-20 h-20" alt="Loading Spinner">
</span>

@grmbyrn grmbyrn requested a review from josecelano June 11, 2024 18:25
Copy link
Member

@josecelano josecelano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @grmbyrn I think this solves a different problem now.

The issue #411 was solved here.

Anyway, this PR is still useful because you see the spinner while the app is getting the list from the API. Althougth, that should be fast.

We can merge it but some E2E tests are failing.

@grmbyrn
Copy link
Author

grmbyrn commented Jun 12, 2024

HI @grmbyrn I think this solves a different problem now.

The issue #411 was solved here.

Anyway, this PR is still useful because you see the spinner while the app is getting the list from the API. Althougth, that should be fast.

We can merge it but some E2E tests are failing.

Hi @josecelano I realised after I'd made the PR that this was referring to another part of the app, but I was seeing 'No results.' flash on my screen while it was getting the list so thought the spinner would suit there.

As for the E2E tests, I've been going through it and trying to find a solution but new errors keep coming up. I haven't done much E2E so maybe it's just something I need to look at more.

@grmbyrn
Copy link
Author

grmbyrn commented Jun 18, 2024

HI @grmbyrn I think this solves a different problem now.

The issue #411 was solved here.

Anyway, this PR is still useful because you see the spinner while the app is getting the list from the API. Althougth, that should be fast.

We can merge it but some E2E tests are failing.

Hi @josecelano the E2E tests seem to be passing now that I changed no_torrents_to_display.cy.ts to expect an image and not text.

Copy link
Member

@josecelano josecelano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @grmbyrn the spinner should be shown only when the client is fetching data from the API. If the result is empty after making the request, we should keep the old message "No results". Otherwise people might think there is a problem with the app (API, connectivity, ...)

image

On the other hand, I don't know if a spinner is the best solution. We wanted to use skeletons. See #411.

Spinners vs Skeletons

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