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

Revise progress UI in offline maps #6198

Open
seadowg opened this issue Jun 14, 2024 · 11 comments
Open

Revise progress UI in offline maps #6198

seadowg opened this issue Jun 14, 2024 · 11 comments

Comments

@seadowg
Copy link
Member

seadowg commented Jun 14, 2024

The current implementation displays the progress indicator in the center of the "Layers" section.

I'm thinking we should either show the progress bar at the top or show the circular indicator in a container with text to explain what's happening. I prefer option 1 because it's more clear.

Image

Figma

Notes

Once we've decided on a design, we should look at a restructure of how we show layers. In the current form, we need to share data using view models, but it probably makes more sense to introduce a LayersDataService that handles most of this for us.

Additionally, we probably want to hold the URIs the user imports in Fragment args rather than in a view model to support import cases where the app is killed in the background (while multitasking) and then returned to (this currently just closes the import screen).

@seadowg seadowg added this to the v2024.2 milestone Jun 14, 2024
@alyblenkin
Copy link
Collaborator

Updated this one @seadowg. Let me know what you think.

@seadowg
Copy link
Member Author

seadowg commented Jun 18, 2024

In both cases we need to disable all the controls right? I'm worried it might be confusing to have disabled stuff on screen while copying the files.

@seadowg seadowg modified the milestones: v2024.2, v2024.3 Jun 18, 2024
@alyblenkin
Copy link
Collaborator

In both cases we need to disable all the controls right? I'm worried it might be confusing to have disabled stuff on screen while copying the files.

I think you would only have to disable "Add layers" but they can still cancel or select layer access while it's importing, right? I agree that could be confusing if we had to disable both bottom actions. We can also leave it as is. This was a nice to have.

@seadowg
Copy link
Member Author

seadowg commented Jun 19, 2024

I think you would only have to disable "Add layers" but they can still cancel or select layer access while it's importing, right?

Yeah, that sounds right! I definitely like the direction of 1 more than 2. I'm not sure about the "card" like background, but it could be that I've just never seen it used like that before.

@alyblenkin
Copy link
Collaborator

I swear they had an image of it in the docs just last week! They do mention that progress indicators can be displayed in a card too, but they no longer have a reference (maybe I'm going mad). Regardless, I don't think it's necessary. The main thing is having a little descriptor so the user knows what's happening.

@seadowg
Copy link
Member Author

seadowg commented Jul 8, 2024

They do mention that progress indicators can be displayed in a card too, but they no longer have a reference (maybe I'm going mad). Regardless, I don't think it's necessary. The main thing is having a little descriptor so the user knows what's happening.

I think the weird part about the card for me is that we're not then going to show the layers in a card. Maybe we could just show a circular progress indicator in the space where the layers will be?

@alyblenkin
Copy link
Collaborator

Maybe we could just show a circular progress indicator in the space where the layers will be?

That works for me. I think it would still be helpful to have the label "Importing layers" below the progress indicator just in case it takes a while.

@lognaturel
Copy link
Member

I’ve been wondering why that step takes so long. It’s not doing any copying, it’s just getting the layer names. Shouldn’t that be close to instant?

@seadowg
Copy link
Member Author

seadowg commented Jul 8, 2024

I’ve been wondering why that step takes so long. It’s not doing any copying, it’s just getting the layer names. Shouldn’t that be close to instant?

It is copying it into a cache. Correct me if I'm wrong here @grzesiek2010, but my understanding was that we're doing that so we can inspect the file metadata (to show the tile names). Unless there's another reason, I am now wondering if we could safely do this via the Uri Android gives us (via the Kotlin extension Uri#toFile that I've just spotted) rather than performing the extra copy into our cache.

@seadowg
Copy link
Member Author

seadowg commented Jul 16, 2024

@grzesiek2010 I'm thinking we should investigate removing the copy to cache before doing any more design here. It seems like people are seeing a big delay when copying to cache, but then not after "Add layers" for big files (please correct me if I'm wrong anyone). If that's the case, I can imagine that if we do get rid of the copy to cache, we might end up moving that delay to after "Add layers" making optimizing the first progress UI a bit pointless. What do you think?

@lognaturel
Copy link
Member

I believe there's the same delay twice currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: not ready
Development

No branches or pull requests

3 participants