As this is to resolve an issue with the build script where it's unable to find the civictheme path, rather than hard-code a path in as part of the update script, we could resolve the path at runtime within the build script.
Example:
const DIR_CIVICTHEME = getCivicthemeDir(PATH)
// ...
function getCivicthemeDir(subthemeDir) {
let currentDir = subthemeDir
while (currentDir !== path.parse(currentDir).root) {
if (path.parse(currentDir).name === 'themes') {
const civicthemePath = globSync(currentDir + '/**/civictheme').pop()
if (fs.existsSync(civicthemePath) && fs.lstatSync(civicthemePath).isDirectory()) {
return path.relative(civicthemePath, subthemeDir)
}
}
currentDir = path.dirname(currentDir)
}
errorReporter('Could not find civictheme directory.')
}
fionamorrison23 → credited alan.cole → .
fionamorrison23 → credited alan.cole → .
kristen pol → credited alan.cole → .
You will need to be able to build the theme for it to work properly.
The issue you're seeing is likely due to using an old PHP version. I can see on the docs: https://www.php.net/manual/en/function.ini-set.php
that Since PHP 8.1.0 `ini_set` supports more than just string values. I'm assuming you're on an older version so it's throwing an error as the call to `ini_set` is passing in an integer.
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
alan.cole → made their first commit to this issue’s fork.
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
alan.cole → created an issue.
I have raised a PR for internal review on a currently private repository. I believe all necessary scripts will be made available at some point when the release is done.
----------------------------
Notes from PR:
----------------------------
This script includes a number of bash files for handling:
Cloning the civictheme-monorepo[1] to get the required files.
Removing old files and replacing with new files in the civictheme subtheme being upgraded.
And a node.js file for handling:
Updating all subtheme stories using anthropic.
The script can be used by navigating to ./storybook-v8 and running:
export ANTHROPIC_API_KEY=[API_KEY]
export SUBTHEME_DIR="/path/to/subtheme"
bash ./update-build-and-storybook.sh
node convert-subtheme-storybook.js
An example file run-upgrade.sh exists that can be edited to include the path and API key and run using bash run-upgrade.sh.
Assumptions:
The custom site's base theme is already updated to civictheme 1.10 (the script will not do this).
Notes:
[1] Currently git does not use branch main due to main not currently having 1.10. When main has 1.10, the line # git checkout -b main origin/main should be uncommented from update-build-and-storybook.sh.
fionamorrison23 → credited alan.cole → .
richardgaunt → credited alan.cole → .
richardgaunt → credited alan.cole → .
richardgaunt → credited alan.cole → .
gargsuchi → credited alan.cole → .
gargsuchi → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
richardgaunt → credited alan.cole → .
Raised a PR to fix this:
gargsuchi → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
Thanks Kristen, please find fix here: https://git.drupalcode.org/project/demo_design_system/-/merge_requests/57
kristen pol → credited alan.cole → .
Within `experience_builder/ui/src/features/layout/preview/Preview.tsx` the screen size of the Desktop is hard-coded to 1024 x 768.
The demo designs we have been building work best at 1920 x 1080 for desktop.
Would it be possible to add another preview size for 1920 x 1080, or make the preview sizes configurable?
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
kristen pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Sorry, last patch was missing a few more changes.
I've added the constant and display the option in the theme settings available flags.
Thanks Alex, I've updated the patch as per the changes.
alan.cole → created an issue.
gargsuchi → credited alan.cole → .
gargsuchi → credited alan.cole → .
gargsuchi → credited alan.cole → .
gargsuchi → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .
Kristen Pol → credited alan.cole → .