maputnik icon indicating copy to clipboard operation
maputnik copied to clipboard

Why does https://maplibre.org/maputnik fetch http://localhost:8000/styles ?

Open zstadler opened this issue 1 year ago • 7 comments

To reproduce:

  • Open the browser's development console
  • Load https://maplibre.org/maputnik
  • Look for localhost:8000 in the network tab

zstadler avatar Jan 13 '24 12:01 zstadler

Seems like this is related to the desktop communication. See here: https://github.com/maplibre/maputnik/blob/1da65f2116e5643c9bf06056c7ca463e41ada523/src/libs/apistore.ts#L22 There's a mod of operation where the style is stored in a "backend" and not it local storage.

Should this be converted to a discussion or is there an issue you have encountered that is problematic?

Also the console log is somewhat descriptive I think: image

HarelM avatar Jan 13 '24 12:01 HarelM

There is no functional issue, but it is strange. I didn't expect to see any desktop-related functionality in the web site. Was there a discussion about on-boarding the desktop?

zstadler avatar Jan 13 '24 13:01 zstadler

There was a discussion on desktop to some extent here: https://github.com/maplibre/maplibre/issues/352 Currently, desktop is created as part of the CI of the web, I'm guessing that their functionality is not "separated" enough. A build flag is what I would expect in this kind of scenario, it might be that I overlooked it when migrating to vite.

HarelM avatar Jan 13 '24 19:01 HarelM

Should a new discussion on Maputnik Desktop be done in this repository, or in the MapLibre organization level?

zstadler avatar Jan 13 '24 21:01 zstadler

Depending on what you would like to achieve. I personally don't think anything else is needed in term of migrating a repository, as I see the desktop a "nice to have" king of a feature. Having said that, if someone is willing to maintain it, s.he could open an on boarding issue and explain why this part should be in maplibre. There's also another option to move this part of the code into this repo, but again, it will require someone who understands the code and would like to continue maintaining it.

Maintainence and maintainer are the key word here I guess.

HarelM avatar Jan 13 '24 22:01 HarelM

I think desktop should be part of this repo, e.g. /desktop, but only if someone can create a pr that:

  • moves all the code with history (I can help with that)
  • modifies ci to automate build and test
  • updates the docs
  • updates ci release process to auto publish the binary

nyurik avatar Jan 13 '24 22:01 nyurik

I feel that in addition, the Maputnik Desktop also requires some UX changes.

For example when "watching" a local file and then opening a different file from the app, the first file is overwritten with the contents of the second file. Luckily for me, I had the first file also opened in an editor, so I was able to recover.

There is another option for the future of Desktop:

  • Keep desktop as a separate repository
  • Move all desktop-specific code to the desktop repository
  • Have the maputnik CI/CD build, test and publish https://maplibre.org/maputnik
  • Have the desktop CI/CD build, test and publish the desktop app, using code from the maputnik repository

I agree with @nyurik that any future support of desktop requires someone to prepare a PR.

zstadler avatar Jan 14 '24 09:01 zstadler