publiclab / Leaflet.DistortableImage

A Leaflet extension to distort or "rubber sheet" images
https://publiclab.github.io/Leaflet.DistortableImage/examples/
BSD 2-Clause "Simplified" License
268 stars 284 forks source link

Functionality to Restore welcomeModal to View #1294

Closed segun-codes closed 1 year ago

segun-codes commented 1 year ago

There's currently no way to restore welcomeModal to view when closed by clicking the begin or close button. A user must therefore refresh/reload archive.html to restore it to view, whereas this approach is appropriate in the event of an uncontrolled error on the webpage, it is however counterintuitive in the case of the above stated use cases.

Please describe the desired behavior. Implement functionality that extends the use case of the stack button icon already present on archive.html to support restoring the welcomeModal to view and focus.

Additional context (optional) See screenshot below for more insight on the issue.

Screenshot-2

segun-codes commented 1 year ago

Hi @jywarren, I'd like to proceed to implement a fix for this issue, okay?

Note, this task is consistent with task distribution @7malikk and I agreed upon and listed on trello board, many thanks!

jywarren commented 1 year ago

Hi, just wondering, would this restart the whole experience? I.e. remove images? or just re-show the modal? What if we made a link from the top of the images sidebar, so that in "minimized" state there's still just one button?

But yes, this sounds like a good idea!

segun-codes commented 1 year ago

Apologies, I didn't disclose these thoughts earlier. So my thoughts, there's need for welcomeModal when:

  1. The archive.html page is newly loaded - this already works
  2. User closes the welcomeModal for whatever reason without loading any image overlay to the tile and needs the welcomeModal back
  3. User deletes all image overlays (for whatever reason) and needs to restore welcomeModal to continue using the service - this use case just flashed into my mind

Further thoughts:

  1. The whole experience will not be restarted as the page will not be reloaded, the welcomeModal will just be made visible again.
  2. Your idea of placing a link on the image sidebar is a good suggestion, we should stick to it. Thanks for this.
  3. Then, I will just update the tooltip on the stack button to let users know they can restore the welcomeModal by following the "stack" button. I think this is quite important, we don't want users left hanging and wondering how to restore the welcomeModal.
  4. No new button will be introduced on the tile.

So what do you think @jywarren?

jywarren commented 1 year ago

this sounds good, but just to be thorough -- what if someone inputs a new URL... i never thought of it but do we allow making maps from multiple sources? Pros/cons?

On Wed, Dec 14, 2022 at 1:11 PM Segun @.***> wrote:

Apologies, I didn't disclose these thoughts earlier. So my thoughts, there's need for welcomeModal when:

  1. The archive.html page is newly loaded - this already works
  2. User closes the welcomeModal for whatever reason without loading any image overlay to the tile and needs the welcomeModal back
  3. User deletes all image overlays (for whatever reason) and needs to restore welcomeModal to continue using the service - this use case just flashed into my mind

Further thoughts:

  1. The whole experience will not be restarted as the page will not be reloaded, the welcomeModal will just be made visible again.
  2. Your idea of placing a link on the image sidebar is a good suggestion, we should stick to it. Thanks for this.
  3. Then, I will just update the tooltip on the stack button to let users know they can restore the welcomeModal by following the "stack" button. I think this is quite important, we don't users left hanging and wondering how to restore the welcomeModal.
  4. No new button will be introduced on the tile.

So what do you think @jywarren https://github.com/jywarren?

— Reply to this email directly, view it on GitHub https://github.com/publiclab/Leaflet.DistortableImage/issues/1294#issuecomment-1351889088, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF6J2VX6UYVQZVSBHSMQ3WNIET3ANCNFSM6AAAAAAS6IPI5I . You are receiving this because you were mentioned.Message ID: @.***>

segun-codes commented 1 year ago

In my proposal I suggested we could have alternative image sources besides IA. Now your suggestion pushes the idea further. So yes, we can allow making maps from multiple sources. This means, the welcomeModal could also be required even with overlays already present on the tile.

Here are some considerations: Pros

  1. users have the flexibility of sourcing images from multiple online sources
  2. service is less tightly-coupled to IA in the case of fetching images from online sources

Cons

  1. code will perhaps become slightly more complex but not really a problem I guess
  2. availability of true alternatives to IA - not sure if this is indeed a concern

So @jywarren, what do you think?