Account created on 24 May 2011, over 13 years ago
  • Manager, Front-End Development at Forum One 
#

Recent comments

Apologies for not seeing this sooner -- we rarely check the drupal.org issue queue as Gesso (and its USWDS variant) are maintained at Github (at https://github.com/forumone/gesso and https://github.com/forumone/gesso-uswds, respectively).

I know it's been a while and I am not sure who you were trying to contact at Forum One or if you ever received a reply, but you may contact me at clafferty@forumone.com if need be.

The short answer to the question above is that Gesso (and the USWDS) variant are not mean to be parent themes that can be easily upgraded. Gesso is not a base theme but is meant as a clean, largely blank slate starter theme for complex, custom designs. Due to the amount of customization and changes typically made on a Gesso based project, upgrading is a very manual process. Smaller upgrades (like updating Twig templates for Drupal 10, security package updates, or even upgrading the version of USWDS being pulled in) are generally relatively painless and would be the same as updating any custom, from scratch theme.

Literally upgrading a customized version of Gesso to a newer version is a much more involved process and is very project specific due to designs and implementations being very different across projects. I have done it several times, but if the version difference is fairly large it will require a lot of effort from someone intimately familiar with the design and theme as it'd be common for changes between versions of Gesso to break anything that had been customized.

That said, targeted upgrades to address security concerns, Drupal compatibility, or USWDS updates/additions are more manageable and generally how we'd proceed rather than a traditional module-like upgrade path.

I believe this is a compatibility issue with the Components module, not Gesso. To work with Drupal 10.2, I think you'll need to upgrade to the dev release of Components 3.

https://www.drupal.org/project/components

Based on their current documentation, to do that run `composer require 'drupal/components:^3.0@beta'`. We've been using the 3.0 beta successfully with the latest Drupal and Gesso releases, but let please let me know if you still encounter issues after upgrading.

Hi, Jimmy! Since Gesso is a starter theme (and not a base theme), this is no automated way to upgrade it to a new version. This is intentional because it's purpose is to be a clean starting place for creating a complex, customized theme that deviates pretty far from the original starting place.

That said, I have been upgrading many of our implementations to either simply make them Drupal 10 compatible or to fully upgrade them to the latest release of Gesso (thereby also making them D10 compatible). I will outline a couple of approaches below that I've used, but realize while some of them are less involved than others, they are all done manually and none of them are particularly simple.

1. You could just manually make any changes in the theme that are necessary for Drupal 10. If you have a lot of custom code in your theme, there may be additional things beyond what I'm listing and even if not I'm probably missing something, but offhand that would include things like:
- Update the info files for the theme and gesso_helper module to list Drupal 10 under core version requirement
- Changing any JavaScript using jQuery once to use Drupal once and updating those library dependencies.
- Changing all instances of {% spaceless %}{% endspaceless %} to {% apply spaceless %}{% endapply %} in Twig files.
- Using the Drupal Upgrade module to catch any changes needed in the /includes/ or /gesso_helper/ files. I don't recall if it's part of that module or something separate, but there's also a command line tool for Drupal that scans PHP files and suggests changes.

2. You could look at particular PRs in our releases that are specific to Drupal 10 and try to replicate them. In particular, release 5.2.0 was the first to be Drupal 10 compatible so just duplicating the changes from a handful of PRs in that release should get you most of the way there. https://github.com/forumone/gesso/releases/tag/5.2.0

The last two options are the ones I've used most, but are certainly the most involved. They both end up upgrading the current version of the theme to the latest release, but one does it all at once while the other does it in smaller chunks.

3. Release by release. You can manually upgrade your theme from it's current release (5.0.9) to each subsequent release, one at a time until you end up at the latest one. All of the releases are listed here: https://github.com/forumone/gesso/releases

The process I've typically followed is to the go to the next release after the one I'm on (in your case that would be 5.0.10) and then use the 'compare' button on the release or tag page to compare it to whatever release I'm currently on then change to the Files Changed tab and manually make each change. So, the first step in your case would be to compare 5.0.10 to 5.0.9 and make each file change manually shown here on the Files Changed tab: https://github.com/forumone/gesso/compare/5.0.9...5.0.10

Since your theme has been customized, it would probably be helpful to look at the list of PR's on the release page and as you make changes somewhat wrap your head around what they're trying to accomplish in case you have additional files that might also need changes (e.g., if there's a PR that fixes all the {% spaceless %} tags in our default template, you'd probably also want to scan your custom templates for that tag).

Once you've upgraded your theme to 5.0.10 and tested that it works, then you'd follow the same process to get to 5.0.11, then 5.1.0, etc. until you got the latest release. While a bit tedious, it can be done slowly over time and you can feel free to skip any changes that don't seem worth the effort (e.g., there's a couple of PRs that just clean up file formatting).

A tip for simplifying this process -- instead of manually updating the package-lock.json file, once you've edited the package.json file, run `npm install --package-lock-only'. Just make sure you've run 'nvm use' first and have node version manager installed so you're running the same version as what we used to generate the file.

And another tip... it can help to have a clone of the Gesso repo locally. That way you can switch to a particular tag and open it in a separate editor instance and quickly copy/paste any new files or files you're sure can just be copied over wholesale instead of tyring to copy their contents out of Github and properly name/rename files.

4. Not sure I'd necessarily recommend this approach, but a way to avoid the step by step approach and just do it all in one go would be to just compare your current version to the latest release and manually make all those changes (as well as updating any of your custom files similarly). For example, this shows all changes from 5.0.9 to 5.2.4. https://github.com/forumone/gesso/compare/5.0.9...5.2.4

That's over 300 files changed (altho a chunk of those are just file formatting changes). Typically I follow the release-by-release approach (or just jumping up 2-3 releases at a time) so I can look at the releases and their individual PRs to give me some context on why the changes were made to help me with any custom files or changes made in my custom theme. But doing it all once is an option.

I hope some of this info is helpful. I've been upgrading Gesso for D10 quite often lately and while it's always a bit tedious and involves lots of copy/pasting, it does start to go faster once you've gotten use to the process. The quickest road to getting things working for D10 is certainly the first option, but let me know things go or if you have other questions.

Production build 0.71.5 2024