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

Issues on mapper frontend on offline mode #1940

Closed
manjitapandey opened this issue Dec 3, 2024 · 10 comments
Closed

Issues on mapper frontend on offline mode #1940

manjitapandey opened this issue Dec 3, 2024 · 10 comments
Assignees
Labels
bug Something isn't working effort:low Likely a few hours frontend Related to frontend code priority:high Should be addressed as a priority

Comments

@manjitapandey
Copy link
Contributor

Describe the bug
The button for downloading and loading tiles on mapper frontend is missing

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'mapper frontend page'
  2. Click on 'offline mode'
  3. Choose the basemap
  4. See error

Expected behavior
The button should be visible for downloading the tiles as well as visualising the tiles on mapper frontend

Screenshots
Image

@manjitapandey manjitapandey added the bug Something isn't working label Dec 3, 2024
@spwoodcock spwoodcock added priority:high Should be addressed as a priority frontend Related to frontend code effort:low Likely a few hours labels Dec 3, 2024
@spwoodcock
Copy link
Member

spwoodcock commented Dec 4, 2024

Which project was this for?

I can see the buttons on this project: https://dev.fmtm.hotosm.org/mapnow/35
Just checking if you can too?

Image

@manjitapandey manjitapandey added the testing:ready Ready for testing label Dec 9, 2024
@manjitapandey
Copy link
Contributor Author

manjitapandey commented Dec 9, 2024

I can't see the buttons on https://dev.fmtm.hotosm.org/mapnow/35 (Naxa Demo project).
They are still not visible on my device

@manjitapandey manjitapandey added testing:fail Failed testing and removed testing:ready Ready for testing labels Dec 9, 2024
@spwoodcock
Copy link
Member

Confirmed on mobile - this is a mobile only bug - will look into it!

@spwoodcock
Copy link
Member

@NSUWAL123 if you could possibly look at this and do a sanity check, it would be really appreciated 🙏

I haven't really had a chance to check it thoroughly, but it's quite an important thing to fix.

Such a weird error 😅 The buttons are visible on desktop, but not mobile, I think it's to do with the CSS classes, but on first look I couldn't work it out!

@NSUWAL123
Copy link
Contributor

Sure!

@NSUWAL123
Copy link
Contributor

The problem is different event target support for different browsers.
Mozilla Firefox seems to support target and originalTarget, but Chrome only supports target.
As originalTarget was used there to retrieve the URL id, chromium browsers couldn't access it.

Now the issue is the PMTile showed on the base maps list but didn't load due to s3 URL error.

Chrome
Image

Mozilla Firefox
Image

@spwoodcock
Copy link
Member

spwoodcock commented Dec 13, 2024

Wow, really great debugging!

I definitely learnt something new 😁

I can look into the s3 URL issue

@spwoodcock spwoodcock added testing:ready Ready for testing testing:fail Failed testing and removed testing:fail Failed testing testing:ready Ready for testing labels Dec 13, 2024
@spwoodcock
Copy link
Member

Reminder to me: check the URLs on the basemap uploads

@manjitapandey
Copy link
Contributor Author

manjitapandey commented Dec 16, 2024

Now I can see the buttons and the PM tiles.
Steps :

  1. Select the PM tile.
  2. Click on 'Show on map'
  3. Go to baselayer and choose the PM tile
  4. See the PM tile layer is loaded on the map.

Is there anything to add on this or is it ready to test a bit more and close?
@NSUWAL123 , @spwoodcock

@manjitapandey manjitapandey removed the testing:fail Failed testing label Dec 16, 2024
@spwoodcock
Copy link
Member

spwoodcock commented Dec 16, 2024

Nice!

Perhaps the URL error was because @NSUWAL123 is using a project that was made prior to the basemap S3 upload changes?

There is a migration script that can be used to upload all the basemaps for your local projects to local S3:

docker compose exec api bash
python migrations/upload_basemaps_s3.py

This can probably be closed then 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working effort:low Likely a few hours frontend Related to frontend code priority:high Should be addressed as a priority
Projects
Development

No branches or pull requests

3 participants