Skip to content

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

Closed

Description

@danrademacher

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

Activity

  1. danrademacher commented on Nov 19, 2024

    @danrademacher
    Author

    Before we do any automation off the main timeslider branch, we need to merge and deploy OpenHistoricalMap/ohm-website#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.

  2. removed their assignment
    on Dec 9, 2024
  3. danrademacher commented on Dec 9, 2024

    @danrademacher
    Author

    @Rub21 this is now ready for the next step:

  4. danrademacher commented on Dec 17, 2024

    @danrademacher
    Author

    This was merged and deployed here OpenHistoricalMap/ohm-deploy#428

  5. added theissue type on Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions