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

Stop displaying spinner if a layer fails to load for 10 seconds #290

Open
jywarren opened this issue Dec 3, 2019 · 10 comments · May be fixed by #414
Open

Stop displaying spinner if a layer fails to load for 10 seconds #290

jywarren opened this issue Dec 3, 2019 · 10 comments · May be fixed by #414
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jywarren
Copy link
Member

jywarren commented Dec 3, 2019

We are getting occasional permanent spinners when layers don't respond, like in #146 - and with so many sources, I think this can just happen from time to time. We should either make the spinner much smaller and put it in a corner, so it's not distracting, or we should have it disappear after 10 seconds.

Try it out here: https://publiclab.org/wiki/sandbox-3

We could separately decide to show a "didn't load" broken icon like https://fontawesome.com/v4.7.0/icon/exclamation-triangle next to the layer name!

@crisner maybe this is a feature you might consider in your plan? Thanks!!

Screen Shot 2019-12-03 at 10 06 44 AM

@neelesh17
Copy link
Contributor

I wanna work on this issue.

@crisner
Copy link
Contributor

crisner commented Feb 19, 2020

Great! Go ahead!

@neelesh17
Copy link
Contributor

Hey @crisner should i put the spinner on the top-left hand side corner.

@crisner
Copy link
Contributor

crisner commented Feb 21, 2020

You could do one of the two things mentioned below. Whichever you could accomplish. 😃

If the spinner is still running after 10 seconds

  • stop the spinner or
  • make it smaller and put it on the bottom-left corner.

@neelesh17
Copy link
Contributor

First one sounds good to me.

@crisner
Copy link
Contributor

crisner commented Feb 21, 2020

Great! 👍

@neelesh17
Copy link
Contributor

@crisner i added the code for some of the layers. Please review it.

@crisner
Copy link
Contributor

crisner commented Mar 2, 2020

@jywarren, there is an implementation in PR #417 where the spinner is stopped when the data fails. There were times it took really long to respond but I am not sure I am remembering it right as it doesn't happen now. My question is do we still add the feature to stop the spinner if it takes longer than 10 seconds? Also, do we add it in a successful data fetch as well? For example, fractracker mobile layer sometimes takes longer than 10secs to load the data. This has been tried in PR #414 .

@jywarren
Copy link
Member Author

jywarren commented May 7, 2020

Yes, so sorry for replying slowly but I think this is a good idea. We could think about adding an X icon next to the layer if it breaks but the spinner in the middle of the map makes it hard to use those layers which did succeed, you know?

Thank you!

@crisner
Copy link
Contributor

crisner commented May 8, 2020

Great! We've already implemented using '⚠️' icon from font awesome to display next to the layer when it breaks. 🥳
image

@neelesh17, would you like to continue working on your PR #414?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
3 participants