--
-
Navigate to this folder
cd src/components/charts/cannabis-local-ordinances/
-
Manually update static/assets/data/cannabis-local-ordinances-interactive.2022-01-22.json
-
Manually update static/assets/data/cannabis-local-ordinances-interactive.2022-01-22.csv
- Artesia,Los Angeles County,City,Prohibited,Prohibited,Prohibited,Prohibited,Prohibited,Prohibited,Yes,Yes,,2022-01-06 + Artesia,Los Angeles County,City,Prohibited,*Allowed*,Prohibited,Prohibited,Prohibited,Prohibited,Yes,*No*,,*2023-02-06*
-
Bump versions in package.json
"version"
"scripts": {"build:bundle"}
-
Run script twice
npm run build:bundle
-
Commit changes
-
Replace previous js bundle (ei 1.0.8) with and new js bundle (ei 1.0.9) through WordPress UI > CAWeb Options > Custom JS
-
Replace csv in the WordPress Media Library In order to cache bust, upload a file with a new name.
-
Update tracker boxes WordPress UI - Where cannabis businesses are allowed
Interactive production environment:
- CDT’s CAWeb Publishing Flywheel hosting environment, the interactive is uploaded through CAWeb theme (current version 1.6.2, WP 5.9).
Assets uploaded to WordPress include:
- cannabis-local-ordinances.css file - a manually compiled file.
- Tracker box CSS
- IE overrides
- A named and numbered JavaScript bundle of all of the interactive and supporting web components.
- Number should match settings in
package.json
.
- Number should match settings in
- SVG and CSV files uploaded through WordPress media interface.
- The ca-design-system-gutenberg-blocks plugin includes code that allows editors authorized to upload files to upload SVG, CSV and JSON files.
- If Excel (.xls) files are needed this support will need to be enabled and updated in the plugin with a hotfix.
- We are moving to a new arrangement of WordPress plugins. Going forward, all changes to Flywheel should happen in cagov/cannabis-ca-gov-wordpress-flywheel-plugin
- To update: do updates and test on Pantheon
- When complete, bundle as a release to cagov/cannabis-ca-gov-wordpress-flywheel-plugin
- Contact CAWeb Publishing to update via FTP.
- After this, CAWeb Publishing team can update via WP Plugin's Github update scripts interface. If this fails, request FTP update.
- Check out
@cagov/cannabis.ca.gov
repo - Run
npm install
; node version v14.17.0. - Go to the root of the data viz project:
cd src/js/charts/cannabis-local-ordinances
- Update
package.json
, bump version number and update the bundle number inscripts
>build:bundle
- Make sure you run
npm install
at root and also at root ofsrc/js/combobox-places
-- please run
npm run build:all
from combobox-places.
- please run
- run
npm run build:bundle
- This will run a build and then add the file into
static/assets
. - Please keep changes neatly versioned.
- Make sure you run
- For CSS changes
- Make changes in
_monolith/cannabis-local-ordinances.css
- Make changes in
- Manually test the changes in the WordPress staging environment on Pantheon
- Log in to: api.cannabis.ca.gov
- Request access from Office of Digital Innovation Engineering team.
- Upload files in theme settings at https://api.cannabis.ca.gov/wp-admin/admin.php?page=caweb_options under JS and CSS (as needed).
- Ensure that the theme version enabled matches production (currently CAWeb 1.6.2, cannabis.ca.gov website. Contact CAWeb publishing if you have any questions.
- Note that the Divi dependency was patched and disconnected for Pantheon staging environment.
- Files in this clone need to be publishing to
master
branch and pushed into Pantheon git environment in order to actually deploy code to server.
- Files in this clone need to be publishing to
- Ensure that the Gutenberg blocks & other ODI or Design System publishing features are set to whatever code matches the production environment.
- Currently ca-design-system-gutenberg-blocks 1.1.6 (latest release)
- Please note that we are actively working on the next generation of WordPress plugins for the Design System, but testing on environment that closely matches production will give the best results with the most error detection in WordPress’s constantly changing code ecosystem.
- Ensure that the markup on the test page matches the expectations of the web component.
- These markup changes will need to be manually introduced on production at the same time as the bundle is updated.
- Since we are developing web components, that may share the same name, new versions of the component may require alternate methods.
- For this project, swapping out the bundle for the web component will work.
- If more complex needs (or development)
- consider versioning the web components
- consider using plugin cannabis-ca-gov-wordpress
- this code will need to be updated in pantheon
- the plugin will need to be enabled
- Note: the self-service CAWeb uploader will make the file available to any page.
- If page specific JavaScript is required, an alternative method is to use a plugin.
- See ___ as an example.
- This method requires direct updates from CAWeb publishing and is not self-service.
- If page specific JavaScript is required, an alternative method is to use a plugin.
- Important: Be sure that your introduction of JavaScript directly onto the production site does not break the rest of the site.
- Log in to: api.cannabis.ca.gov