Closed (fixed)
Project:
ZURB Foundation
Version:
8.x-6.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Jan 2020 at 20:46 UTC
Updated:
25 Jul 2022 at 23:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
erutan commentedMigration notes from 6.6 (none for 6.6.1)
The new settings.scss variables are trivial, and there's no custom off-canvas events in theme calling
closed.zf.offcanvasfrom a quick project search of the folder, so it's really the xy_grids. If we decide to split layout from this base theme, it'd be reliant on having an updated branch of xy_grids for people to use (not technically reliant, but from a user perspective) when the update is pushed on this theme.Comment #3
erutan commentedThe only real issue seems to be integation with the xy_grids layout module.
The community driven 6.7 branch changes up tooling a bit, I had to do a bit of intervention on a static site I upgraded from 6.6 to 6.7, but this seems like a reasonably straightforward push.
Off the top of my head what'd need to be done:
* update static css/js resources in theme/subtheme to 6.6.3
* update https://www.drupal.org/project/xy_grid_layouts to the 6.6 conventions vs < 6.5 (or just note that it needs to be updated)
Comment #6
sim_1Ok, I've created a patch that updates the base theme and the STARTER build process. These updates don't do a whole lot to the css/js itself (beyond the update to the Foundation version.) The BIG difference is to bring the build process in line with the Foundation project itself. I think this makes sense that way we can keep up with all of the package versions, not just the theme itself, and the build process along with the Foundation project. I think we make it harder on ourselves by trying to do something unique rather than just use the packages and tools they have already decided on. Thoughts?
To test:
Either create a new subtheme from the STARTER or --
- Copy over the
.babelrc and config.ymlfrom the STARTER template to the root of your sub theme. Add your site uri to the config.yml in your subtheme.- Copy the
package.jsonfrom STARTER into your subtheme. Make sure to keep the correct project name.- Overwrite
gulpfile.jsin your subtheme withgulpfile.babel.jsfrom the STARTER template.- Copy the
/js/foundation_init.jsto your js folder in your subtheme.- Delete the
node_modulesdirectory and thepackage.lockfiles from your sub-theme. And then runnpm installSome things will probably break, especially if you're not already up to date with the latest version of the dev branch. But does it build? Looking at the patch, does this make sense? Once we do this I think we will be ready to move to Beta/stable releases.
Comment #7
erutan commentedI'll try and test this out in the next few days, but using their build process makes total sense!
Comment #8
sim_1Ok, I tested this on a site and here are a couple additional upgrade notes I came across:
_settings.scssfile. I'm attaching a diff for other ppl to reference, but i don't think it'll work for other ppl to directly apply because the file has theme-specific settings.zurb_foundation.scssfile from the base theme into the_drupal.scssfile in my sub-theme.$callout-paddingvariable (changes to a map called$callout-sizes), I had to update some custom scss that used that variable to bemap-get($callout-sizes, default);new Sticky($('.full-width-header-region'), options);changed tonew Foundation.Sticky($('.full-width-header-region'), options);. An Interchange element I had was using thetype: 'src'in options, but that was changed to'background',new Orbitchanged tonew Foundation.Orbit.I didn't have any custom XY Grid cell mixins like @erutan points out above. I did a quick search for
xy-cellin my scss and didn't have anything. But these migration notes continue to be useful.I also didn't have any offcanvas elements so I didn't need to refactor that.
Also worth noting: I could run npm install with node 12 and node 14. node 16 is not yet supported.
Comment #9
erutan commentedI'm using Node 14 on a static site running zurb-template - they support 12 and 14 according to the foundation repo, but worth noting for sure.
Comment #10
erutan commentedI was upgrading off of the latest dev and had a lot things to put in my settings.scss, but it was an easy merge. I'd recommend diffing your current _settings.csss against the one from the startertheme / github - if you have a GUI tool like Kaleidoscope it'll shine here.
Apparently the `$body-safe-padding: false` is the only real change since 6.6.3 interestingly enough. I was missing the maps for hi-dpi, callout-padding and a few other things and my sites has been compiling fine all this time. It's a very prototype data heavy site so not a ton of custom theming on it, which makes for a pretty clean test.
History of _settings.scss over time.
Note re: Overwrite gulpfile.js in your subtheme with gulpfile.babel.js from the STARTER template. Overwrite isn't quite right, delete your gulpfile.js and copy over gulpfile.babel.js - keeping the latter named gulpfile.babel.js in your theme dir.
Comment #11
erutan commentedI have SSH setup for Drupal.org and have pushed to Gitlab before, but authenticating against the issue fork was giving me issues for whatever reason so it was simpler to just make a .diff
renaming PROXY to BROWSERSYNC is opionated, but makes it a bit clearer perhaps what it is for? You can pass ports over that variable so the previous port onewas redundant. I cleaned out panini, style sherpa, and unCSS (the latter makes a ton of sense for something like Foundation, but would need to have custom selenium tests or something to scan a site & interact with exposed filters on views etc or something ridiculous for a Drupal site vs SSG).
package.json, config.yml, & gulpfile.babel.js still have some extra stuff in it from the Panini SSG in the foundation zurb template - it's still trying to parse SSG *html files. I clarified some wording on config.yml too - it's a bit odd to have a new local server proxying another, but this could be used to test theming changes on a non-local dev/qa site (or prod!) so that's a neat bonus.
Writing up some gotchas and linking out to previous Zurb upgrade guides would make sense, but aside from the server function hack not quite working for browsersync it seems fine. Line 41 of gulpfile.babel.js could perhaps be optimized since we're not using unCSS, but that can wait.
I think we can RBTM this, but there definitely needs to be patch upgrade notes.
Comment #12
sim_1Ok I committed your changes - thanks for reviewing and making that diff! Ok, I think we're good to go. I'm going to merge and then spend some time on the release/upgrade notes. I'll ping this issue when I'm done -- feel free to review and add other notes you think would be helpful!
Comment #14
sim_1Ok marking this as fixed. I've copied the overview of these notes to this release notes page (that we can publish with the next release.) Feel free to edit or expand it however you think is helpful!
Comment #15
erutan commentedWill do, I'm a bit time constrained now but will have more flexibility in two weeks.