OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
19 stars 1 forks source link

Shift to serving timeslider js and css from main web codebase #910

Open danrademacher opened 2 days ago

danrademacher commented 2 days ago

Currently, we pull timeslider assets in directly from this repo, https://github.com/OpenHistoricalMap/leaflet-ohm-timeslider-v2, via GH Pages.

You can see that here: image

That has been convenient in the past for rapid initial development of the timeslider, but it's a problem when we need to make and test changes to the timeslider.

For #855 we had to make some breaking changes to the timeslider to accommodate new expressions-based map styles (#775).

We now have working map styles and a working timeslider (in a branch), but we don't have a staging environment.

To solve that, we are going to:

  1. Pull the relevant JS, CSS, and image assets into the website repo and make sure they are working locally.
  2. Deploy that to staging
  3. Make a new deployment script that will automate future updates by pulling in the assets from https://github.com/OpenHistoricalMap/leaflet-ohm-timeslider-v2 and overwriting the assets in the website repo. @Rub21 will do this part
danrademacher commented 2 days ago

Before we do any automation off the main timeslider branch, we need to merge and deploy https://github.com/OpenHistoricalMap/ohm-website/pull/260, then we can make some changes in the timeslider repo without worrying about impact on the live site.

For the future deployment automation, while it's fresh.

We need to fetch these files:

https://github.com/OpenHistoricalMap/leaflet-ohm-timeslider-v2/blob/main/decimaldate.js https://github.com/OpenHistoricalMap/leaflet-ohm-timeslider-v2/blob/main/leaflet-ohm-timeslider.js https://github.com/OpenHistoricalMap/leaflet-ohm-timeslider-v2/blob/main/leaflet-ohm-timeslider.css https://github.com/OpenHistoricalMap/leaflet-ohm-timeslider-v2/tree/main/images/*

and copy to: https://github.com/OpenHistoricalMap/ohm-website/tree/staging/app/assets/javascripts https://github.com/OpenHistoricalMap/ohm-website/tree/staging/app/assets/stylesheets https://github.com/OpenHistoricalMap/ohm-website/tree/staging/app/assets/images

One note is that the transition will be simpler if we rename the /images/ folder Timeslider repo to /assets/ and update all references in leaflet-ohm-timeslider.css. that will make the paths match between the standalone repo and the Rails assets. Simple change, just need to make it before we implement the automation.

I'd like to sever the live connection between website and timeslider repo before we make that change.