Closed danrademacher closed 2 weeks ago
Changes to map-styles
are in a PR ready for review by @vknoppkewetzel and @tsinn. But before we merge that we have to remove the dependency on the spritesheet served out of map-styles
or we will break the map on the live site.
Changes on the website code ended up being very minor -- keep the base style ERB since it still loads Maplibre RTL plugin (see https://github.com/OpenHistoricalMap/ohm-website/pull/247)
So I think what's left is these steps:
map-styles
repo.main/main.json
instead of ohm_timeslider_tegola/ohm_timeslider_tegola_production.json
and associated spritesheets.@danrademacher could you check the progress is here https://github.com/OpenHistoricalMap/ohm-deploy/pull/327, it is ready to go to production.
Ok, just confirmed that all spritesheets are coming from staging.openhisotircalmap.org on staging:
hmm. now we have merge conflicts on the map-styles between this WIP PR https://github.com/OpenHistoricalMap/map-styles/pull/29 and the latest map styles. So I'll need to resolve those and merge to get latest map style code into main branch before we deploy this to production.
@Rub21 I merged the changes in map-styles
and this new PR should be ready to merge to staging:
https://github.com/OpenHistoricalMap/ohm-deploy/pull/328/
If that works, then this is good for production
@danrademacher seems the Styles has broken in overpass-turbo:
Ah drat. That's the one place we were pulling the stylehseet live! Once we deploy the new method to production, we could modify Overpass Turbo to point at the production website mapstyle JSON, which is better
that's a change to this line https://github.com/OpenHistoricalMap/overpass-turbo/blob/master/js/configs.js#L6
nice, so this is ready to go production!
The changes are already in production : https://www.openhistoricalmap.org/
That's the one place we were pulling the stylehseet live!
Oh, there’s more…
There’s no telling how many people followed the documentation to hard-code the old URL. But I’m glad we’ve simplified the URL to something that makes more sense.
Oy, OK, hard lesson learned here. As a stop gap, I could make a copy of the main map style and spritesheet under the old name. Then roll this out more thoughtfully.
I’m not sure there’s a great solution. Copying the file would erase the file’s edit history, so it would be more difficult to track down regressions in the future. I wonder if GitHub Pages supports any kind of rewrite rule or symbolic link that would let us keep a redirect around. Anyways, “main” is a good enough name; no need to overthink it right now.
Can we close this ticket?
We still have one open task here:
I don't quite remember right now if we ever had a method to locally pull in the latest map styles for testing. I think that's still copy-paste by hand. Actually, I'm make a new ticket for just that bit.
Until this week, the process of deploying updates to our map styles into the Rails application has been tedious and manual.
@Rub21 wrote a script to make it less so: https://github.com/OpenHistoricalMap/ohm-deploy/blob/main/images/web/update_map_styles.py
This is a huge improvement, but there's one more part of the process:
The stylesheets reference spritesheets ~and glyphs~ that live on the
map-styles
repo in these lines:For the main OHM style, we had an issue long ago where we were editing the spritesheet to test style updates, and that was breaking the live production map. As a stopgap we made this script that simply copies the style json and spritesheets into
_production
versions and then we reference those in the tegola style: https://github.com/OpenHistoricalMap/map-styles/blob/staging/ohm_timeslider_tegola/make_production_version.pyTo build on the improved deployment method Ruben has developed, I propose the following changes:
ohm_timeslider_tegola
tomain.json
in themap-styles
repo and the relevant files onohm-website
. This will make it more obvious what the file is for.map-styles
Github Pages site.ohm-website
local dev environment, so we can actually debug the latest styles there.ohm-style.*
JS files in theohm-website
repo to remove unneeded files and disused Javascript. May need updates to other JS files or HTML templates that call JS files?map-styles
repo to remove extra_production
files and other cruftUPDATED: We rarely chang efonts, so we could leave the fonts as is in
map-styles
repo and just copy over the spritesheets.