Closed becw closed 11 months ago
Hi @becw! To answer your first question, the version you started with should be listed in the package file. It should match one of the release tags here: https://github.com/forumone/gesso-uswds/tags
The second question is a bit trickier. As you've discovered, upgrading Gesso isn't as straight-forward as updating a module or something as Gesso is a starter theme and it's meant to be heavily customized. Generally I have done much of what you describe when trying to upgrade, depending on the particulars of the project. Off-hand, I can think of the following options:
Treat your theme as a completely custom theme now separate from Gesso. Upgrade the pieces of it you need as you run into them (e.g., adding Drupal 10 support or upgrading the USWDS version).
Depending on how old your version of the theme is, you could manually update it to the latest release by comparing the tag of the version you started with to the current version. For example, if you began with 5.1.1 and wanted to move to 5.2.5, you could look at this compare and manually make each file change: https://github.com/forumone/gesso-uswds/compare/5.1.1...5.2.5
The tricky bit of doing that is if your theme is quite old, there will be a LOT of changes. Also some of them may not be applicable or may need modification depending on what customizations you've done. To make things more manageable you might instead compare your current version to the release directly after it (e.g., compare 5.1.1 to 5.1.2 https://github.com/forumone/gesso-uswds/compare/5.1.1...5.1.2), make those changes, test them, then move to the next release tag (e.g., compare 5.1.2 to 5.1.3, and so on until you get to the latest release).
The best option really depends on how far behind your version is, how much customization you've done and how important it is to you to be on the latest release. Unfortunately all of them are done manually and require you to be very familiar with the workings of your theme.
In my own work I've used option 2 often while building a site or doing maintenance on it as new Gesso releases come out just to keep things up to date and save myself time later if I want to upgrade. If I'm going back to a site that hasn't been touched in a while to do something like upgrade it to Drupal 10, I've often used option 3 and just started over, using the old theme as a guide and moving things over one at a time. That can certainly be a time intensive process, but does come with the benefit of giving you a chance to reorganize, improve and streamline things as you put your theme back together.
I answered a similar question on drupal.org recently that might have additional details helpful to you: https://www.drupal.org/project/gesso/issues/3396707
Please let me know if you have other questions. Thanks!
What a great response! Thank you so much, this is very helpful :)
We developed a theme based on gesso-uswds about a year and a half ago. We'd like to keep it up to date, and have made some updates for Drupal 10 compatibility and also updated the USWDS version. Does it make sense to update some of the underlying pieces from Gesso as well? Do you have ideas about how to do this?
What we've found so far is that we're having a hard time figuring out exactly the version that we started with, aside from the date that we started. We also tried starting "from scratch" in order to move our theme into the new version of Gesso, but the setup process wasn't smooth as there were new pieces of functionality (like using typescript). We're also realizing that we've modified some of the underlying components, so this isn't necessarily a way to do this cleanly.
So, the other approach would be to update the underlying components, without trying to use a newer version of Gesso. Is this the assumed path for Gesso-based themes?
Thanks!