311-data icon indicating copy to clipboard operation
311-data copied to clipboard

Map should display a loading modal when it's retrieving new data

Open nichhk opened this issue 2 years ago • 10 comments

Overview

Currently, it can take up to 25s for the dev site to pull data for the past month. We should display a loading modal in these situations.

Action Items

  • [ ] Design a loading indicator.
  • [ ] Display it when the client is retrieving data, and hide it when the client finishes retrieving data

Resources

  • https://github.com/hackforla/311-data/issues/1380
  • https://github.com/hackforla/311-data/issues/1396

nichhk avatar Jul 14 '22 20:07 nichhk

@elizabeth-ux and @melissahermes99, could you design a loading indicator for the map?

On the eng side, I've gotten a material-ui CircularProgress component to load, but it doesn't look good.

bad-loading-modal

nichhk avatar Aug 01 '22 18:08 nichhk

I've come up with two test loading indicators for the map. The first indicator utilizes the logo and the second is just a simple loading bar. If neither of these is what we're looking for I can keep experimenting to find something that works. For now, you can find the UI for both indicators under the Map Loading Screen Test page.

I've gone ahead and created a quick prototype for both indicators as well. https://www.figma.com/proto/eF63O8yIGz2soQ4JJFfyoK/311_Data_UXUI?node-id=5106%3A17198&scaling=contain&page-id=2375%3A0&starting-point-node-id=5106%3A17185&show-proto-sidebar=1

image image

melissahermes99 avatar Aug 03 '22 21:08 melissahermes99

Thanks Melissa! They look great. I prefer the first one, but would appreciate feedback from others! @elizabeth-ux @EchoProject any thoughts?

nichhk avatar Aug 04 '22 19:08 nichhk

I also like the first. @melissahermes99 Is it possible to have the shimmer go in the other direction (from left to right)?

@nichhk The darkened state of the page while loading isn't currently a feature, correct? Are we building this in? So every time the screen is loading it darkens? Makes sense for predictably long loads, but I feel like it'll be eye straining if the load happens quickly and possible more than once.

I think it'll look weird if the screen isn't darkened given the colors.

EchoProject avatar Aug 05 '22 01:08 EchoProject

I also like the first. @melissahermes99 Is it possible to have the shimmer go in the other direction (from left to right)?

I've updated the first loading indicator to move to the left. image

melissahermes99 avatar Aug 05 '22 01:08 melissahermes99

I have created a progress bar. I am not sure if looping it is a good idea, so I've slowed down the speed of it's progression. You can view it here.

image

melissahermes99 avatar Aug 11 '22 23:08 melissahermes99

Thanks Melissa, this looks good to me! Was there any discussion last night about which loading indicator to go with?

nichhk avatar Aug 12 '22 18:08 nichhk

I think we landed with the bar at the top, below the nav, would prompt as orange and then turn teal during the loading. The color change would not loop, and the background would not darken. @melissahermes99 am I missing anything?

EchoProject avatar Aug 17 '22 00:08 EchoProject

Sounds good! I did have to make a slight adjustment to the canvas to lower to bar just a bit. I had previously had it overlapping the header on accident. I've updated the color transitions as well to make the flow of the loading bar more smooth.

melissahermes99 avatar Aug 17 '22 04:08 melissahermes99

Update for Killen: we already have an ugly loading indicator on the dev site, but we want to upgrade it to the one that Melissa designed. You can see how I added the ugly loading indicator here.

nichhk avatar Sep 13 '22 17:09 nichhk

Hey @jekijo Do you have an update for us on this issue?

Please update:

  • Progress:
  • Blockers:
  • Availability:
  • ETA:

Thanks!

mc759 avatar Dec 13 '22 03:12 mc759

Hey @mc759, I actually finished this issue a while ago and submitted a pull request (#1412 ). I didn't know the issue hadn't been closed yet, but I'll go ahead and do that now

jekijo avatar Dec 14 '22 01:12 jekijo