ramp4-pcar4 / story-ramp

Storytelling with interactive maps using RAMP
MIT License
4 stars 13 forks source link

Outline changes needed to migrate Storylines products #389

Open dan-bowerman opened 10 months ago

dan-bowerman commented 10 months ago

This issue is to document (right here is fine) the process for migrating existing RAMP3/Vue2-based Storylines products such that they will work in a refactored, Vue3 Storylines deployment that leverages RAMP4.

yileifeng commented 10 months ago

For Vue 3, there should be no work required to upgrade existing products, and the PR migrating to RAMP4 https://github.com/ramp4-pcar4/story-ramp/pull/377 is expected to work without issues after rebasing to Vue 3.

Vue 3 version of editor is in PR: https://github.com/ramp4-pcar4/storylines-editor/pull/242. Upgrading to RAMP4 will require work on replacing the outdated RAMP2 map editor plugin with the R4 config editor https://github.com/ramp4-pcar4/storylines-editor/issues/239 to remain compatible.

https://github.com/ramp4-pcar4/ramp4-pcar4/issues/1908 remains one of the highest priority issues that needs to be addressed as soon as we upgrade to RAMP4.

mohsin-r commented 10 months ago

RAMP4 Specific Steps

Steps before we can migrate products.

  1. Review this PR and decide if we are happy with how RAMP4 stuff works in Storylines.
  2. Merge the above PR.
  3. Figure out time sliders. There is a demo time slider fixture in the PR above but we also have additional considerations in #390.
  4. Figure out how to do something on instance startup. The RAMP config is currently a JSON like before, which means we can't do anything like use the API for an instance. The main downfall of this at the moment is we wouldn't be able to use custom details templates. Perhaps the JSON config structure needs a revisit or rework for RAMP4.
  5. Figure out language stuff. RAMP4 has one config object with each language having its own subconfig. Therefore, no matter what the language is in storylines, RAMP4 will show all the languages inside it, and it will start off with the first language in the list, which might not match the current language.

Steps to actually migrate the products

  1. Convert each English and French config from RAMP2 to RAMP4. We can leverage the RAMP4 config upgrader module to achieve this. Note that because of how RAMP4 has each language's config in just a single config object instead of separate, we will now have one JSON file per config instead of a separate one for English and French.
  2. Move this one config into the ramp-configs folder, and remove the en and fr subfolders.
  3. Adjust the path of the RAMP config in the main storylines config accordingly. Note that both English and French paths are the same now.
james-rae commented 10 months ago

Figure out language stuff. RAMP4 has one config object with each language having its own subconfig. Therefore, no matter what the language is in storylines, RAMP4 will show all the languages inside it, and it will start off with the first language in the list, which might not match the current language.

https://github.com/ramp4-pcar4/ramp4-pcar4/issues/1985 might help with this if you want to entertain alternate options. If it helps, we could also add a "starting language" property to the RAMP instance constructor options param.

dan-bowerman commented 10 months ago
1. Review [this PR](https://github.com/ramp4-pcar4/story-ramp/pull/377) and decide if we are happy with how RAMP4 stuff works in Storylines.
2. Merge the above PR.

This should be a top priority to get merged.

3. Figure out time sliders. There is a demo time slider fixture in the PR above but we also have additional considerations in [Timesliders require update for RAMP4/Vue3 #390](https://github.com/ramp4-pcar4/story-ramp/issues/390).

Timesliders I would like to keep "as-is" at this time, this is not the opportunity for longer-term timeslider planning in RAMP4.

4. Figure out how to do something on instance startup. The RAMP config is currently a JSON like before, which means we can't do anything like use the API for an instance. The main downfall of this at the moment is we wouldn't be able to use custom details templates. Perhaps the JSON config structure needs a revisit or rework for RAMP4.

Is this/can this be captured in an issue? I don't believe this is a dealbreaker for migrating STB's products, but the CWS products do use details templates (we are migrating theirs separately).

5. Figure out language stuff. RAMP4 has one config object with each language having its own subconfig. Therefore, no matter what the language is in storylines, RAMP4 will show all the languages inside it, and it will start off with the first language in the list, which might not match the current language.

I'm not sure what to make of this one... is it a problem if we've explicitly defined English and French in the same config? Does this mean French maps load/perform more slowly as-is?

spencerwahl commented 10 months ago

Timesliders I would like to keep "as-is" at this time, this is not the opportunity for longer-term timeslider planning in RAMP4.

This should just require updating the API calls, and placing it within the RAMP4 shell rather than the RAMP2 method of creating a "panel" (different than RAMP4 panel).