Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #76 from cagov/release/1.1.7
Browse files Browse the repository at this point in the history
Release/1.1.7
  • Loading branch information
chachasikes authored Aug 11, 2022
2 parents 85454a0 + 856631a commit e78d46b
Show file tree
Hide file tree
Showing 96 changed files with 28,091 additions and 10,394 deletions.
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/component-01-initial-proposal.md

This file was deleted.

25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/component-02-gutenberg-block.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/improvement.md

This file was deleted.

112 changes: 76 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,83 @@
# Changelog
# CHANGELOG

### 1.1.7
August 11, 2022
- Added references to partial header file to be compatible with CAWeb ^1.6.3.
- Update layouts for scrollable card and promotional card.
- Update the README, ROADMAP and CHANGELOG (including with future plans)
- Add ADR (Architectural Decision Records) folder so we can start to include architectural decisions on this project long term
- Rename DEVELOPMENT.md to MAINTENANCE.md

### 1.1.6
April 20, 2022
- Correct instructions in docs.

### 1.1.5
January 28, 2021
- Updated accordion component to depend on v2 of the <a href="https://designsystem.webstandards.ca.gov/components/accordion/readme/">CA design system accordion component</a>. Since this is a breaking change requiring markup modification all sites using this component headlessly should coordinate an update to the frontend accordion component with this block update.

### 1.1.4
December 2, 2021
- Post list, use correct API data. (Hotfix that fixes display of data on news post lists)

### 1.1.3
November 23, 2021
- Fix REST API error that breaks Divi's gutenberg.js script (Empty Posts have no data and Divi does not want a null result, even though WP docs suggests this.
- Copy edits CHANGELOG and ROADMAP
- Hotfixes for Pantheon (footer menus)
- Hotfix for cannabis: feedback form missing color variable

### 1.1.2
* Check for CAWeb theme & deliver CAWeb specific page templates, otherwise default to Pantheon cagov theme option.
* Clean up folder structure
* Add more notes/suggestions about the structure and direction of this code for keeping flexibility with development coming from agency partners.
* Copy editing
* Removed some reference code
November 15, 2021
Changes made from support of drought.ca.gov. Mostly adding API support for headless rendering & keeping packages updated with design system components.

- Check for CAWeb theme & deliver CAWeb specific page templates, otherwise default to Pantheon cagov theme option.
- Clean up folder structure
- Add more notes/suggestions about the structure and direction of this code for keeping flexibility with development coming from agency partners.
- Removed some reference code
- Apply same template hiding filter used for pantheon template handler to CAweb template handlers
- Redirection API extension script
- OG Meta API extension script
- Fix Accordion display in editor mode
- Fix block category listing for WP versions 5.8 and up.
- Support local builds of newly published design system components
- Update design system packages to latest versions

### 1.1.1
* Rename `ca-design-system` block namespace to `cagov-design-system.`
* Add `patterns/template-pattern-extension` - Structure a starter plugin for adding structured data and blocks for specific State publishing content patterns.
* Add `template-custom-blocks-extension` - Structure a starter plugin that shows how to support custom Gutenberg Blocks as extensions of the California Design System.
* Not deployed to cannabis.ca.gov, temporary update only for drought.ca.gov to update the Pantheon + no CAWeb theme code
* Update og meta content for API
* Alter output for Pantheon development
* Add Content Admin role (which suffered from an issue of not being able to load capabilities in the 15 minutes we had to add this feature)
* Merge in change to support headless rendering.
* Refactor plugin structure to delineate current usage & future changes for planned work.
* Include new `regulatory-outline` block. [#245](https://github.com/cagov/ca-design-system-gutenberg-blocks/issues/245)
* REST API endpoint updates to structure (aligns with headless release data mapping)
* Events system (Event detail, Events Post List, REST support)
* Campaign toolkit feature (`promotional-card` and `scrollable-card`)
- Rename `ca-design-system` block namespace to `cagov-design-system.`
- Add `patterns/template-pattern-extension` - Structure a starter plugin for adding structured data and blocks for specific State publishing content patterns.
- Add `template-custom-blocks-extension` - Structure a starter plugin that shows how to support custom Gutenberg Blocks as extensions of the California Design System.
- Not deployed to cannabis.ca.gov, temporary update only for drought.ca.gov to update the Pantheon + no CAWeb theme code
- Update og meta content for API
- Alter output for Pantheon development
- Add Content Admin role (which suffered from an issue of not being able to load capabilities in the 15 minutes we had to add this feature)
- Merge in change to support headless rendering.
- Refactor plugin structure to delineate current usage & future changes for planned work.
- Include new `regulatory-outline` block. [#245](https://github.com/cagov/ca-design-system-gutenberg-blocks/issues/245)
- REST API endpoint updates to structure (aligns with headless release data mapping)
- Events system (Event detail, Events Post List, REST support)
- Campaign toolkit feature (`promotional-card` and `scrollable-card`)

### 1.1.0
* Refactored single plugin for any WordPress environment.
* Improve plugin naming conventions.
* Decide to keep `ca-design-system` as the block namespace as markup on sites are mapped to this naming convention. Will think this through for design-system version upgrades and validate the long-term usage of this block-library key. The name is mapped to the specific library name, prefixed with ca. The name should be `cagov-design-system` to be accurate to the GitHub repository name and project name. This has migration requirements, so postponing this to the future.
* Keeping the same Gutenberg block library namespace for the California Design System (`ca-design-system`) split blocks into groups
* `cagov-design-system-html` - Simple Gutenberg Blocks that render static markup samples for the California Design System.
* `cagov-design-system-blocks` — Mirrors `@cagov/design-system` published component packages. Each package is hosted on `npm` and loaded into the block library from `cagov-design-system/
* `patterns/cagov-events` - Initial Events data systems plugin, exposes data to REST API
* `patterns/cagov-news` - Initial News posts data systems plugin, exposes data to REST API
* Merge in change to support headless rendering.
* Refactor plugin structure to delineate current usage & future changes for planned work.
* Include new `regulatory-outline` block. [#245](https://github.com/cagov/ca-design-system-gutenberg-blocks/issues/245)
* REST API endpoint updates to structure (aligns with headless release data mapping)
* Events system (Event detail, Events Post List, REST support)
* Campaign toolkit feature (`promotional-card` and `scrollable-card`)
- Refactored single plugin for any WordPress environment.
- Improve plugin naming conventions.
- Decide to keep `ca-design-system` as the block namespace as markup on sites are mapped to this naming convention. Will think this through for design-system version upgrades and validate the long-term usage of this block-library key. The name is mapped to the specific library name, prefixed with ca. The name should be `cagov-design-system` to be accurate to the GitHub repository name and project name. This has migration requirements, so postponing this to the future.
- Keeping the same Gutenberg block library namespace for the California Design System (`ca-design-system`) split blocks into groups
- `cagov-design-system-html` - Simple Gutenberg Blocks that render static markup samples for the California Design System.
- `cagov-design-system-blocks` — Mirrors `@cagov/design-system` published component packages. Each package is hosted on `npm` and loaded into the block library from `cagov-design-system/
- `patterns/cagov-events` - Initial Events data systems plugin, exposes data to REST API
- `patterns/cagov-news` - Initial News posts data systems plugin, exposes data to REST API
- Merge in change to support headless rendering.
- Refactor plugin structure to delineate current usage & future changes for planned work.
- Include new `regulatory-outline` block. [#245](https://github.com/cagov/ca-design-system-gutenberg-blocks/issues/245)
- REST API endpoint updates to structure (aligns with headless release data mapping)
- Events system (Event detail, Events Post List, REST support)
- Campaign toolkit feature (`promotional-card` and `scrollable-card`)

### Releases up to 1.0.17
Build on initial support of early design system component for WordPress monolith

Initial exploration of using Gutenberg block editing tools with the California Design System.
Initial exploration of using Gutenberg block editing tools with the California Design System.

In this phase, we specified the component structure, github repository organization, found preferred methods of rendering Gutenberg blocks, defined matrices for component publishing, and our participation framework.

Expand All @@ -47,6 +86,7 @@ Working with CAWeb publishing and ca.gov, we began weaving knowledge from the CO
We started with a monolithic WordPress instance for the Department of Cannabis Control, and created a plugin that could provide design system elements, specially tailored for State communication officers, interagency communication, and agency support.

Using the same REST API, we built a headless clone off of the original WordPress site and began repackaging the initial plugin code for installation in a variety of WordPress environments and future collaboration, and separating out some of the special adaptations that were necessary to work with the CAWeb theme.

git
### Prior work
This modular approach to a design system uses the accumulated knowledge of the Office of Digital Innovation team's static-site, headless WordPress implementation for https://covid19.ca.gov and combining it with the CAWeb theme that implements the State Template.
This modular approach to a design system uses the accumulated knowledge of the Office of Data and Innovation team's static-site, headless WordPress implementation for https://covid19.ca.gov and combining it with the CAWeb theme that implements the State Template.

18 changes: 0 additions & 18 deletions DEVELOPMENT.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Office of Digital Innovation
Copyright (c) 2021 Office of Data and Innovation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
87 changes: 87 additions & 0 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

# MAINTENANCE

## Issues board
(Coming soon)
(Includes contact information for teams working on Gutenberg Block plugins)

## Branches
* The `main` branch of this plugin should only include content componnets published on the design system website.
* The `staging` branch is used for QA testing and validation of the components
* The `development` branch is used for shared work.
* Other branches can be submitted for feature development following this pattern: `feature/{issue-number}-{short-description}`
* Hotfixes may be applied to branches as needed.

## Content updates
Please notes that some updates will update the markup on a page.

An editor can try the "resolve" feature on pages with issues.


## How to Get Started Building Gutenberg Blocks

Make sure npm is installed along with necessary packages, from a terminal in the projects root directory run the following command.

`npm install`

### Creating Blocks

From a terminal in the projects root directory run the following command.

`npm run new-block --name=`<block name>``

**Note:**It might take a couple of minutes for the block to build

### Editing the block.json File

Modify the `gutenberg/blocks/<block name>/src/block.json` file

If necessary, update the following fields:

@TODO Note this needs to be updated
- title
- description
- add [block attributes](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/)

### **Block Editor Styling**

Modify the `gutenberg/blocks/<block name>/src/editor.scss` file to change the backend styling.
Modify the `gutenberg/blocks/<block name>/src/style.scss` file to change the frontend styling.

### **[Block Edit & Save](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/)**

Modify the `gutenberg/blocks/<block name>/src/edit.js` file to change the edit functionality.
Modify the `gutenberg/blocks/<block name>/src/save.js` file to change the save functionality.

### **Rebuild Block Code**
From a terminal in the projects root directory run the following command.
`npm run build`

## WordPress Gutenberg Block tips
* We use these WordPress components and packages: https://developer.wordpress.org/block-editor/reference-guides/packages/
* Please see current examples for some UI challenges.
* If you have questions about the integration specs, features and requirements please connect with Yesenia or Chach and they will help. (Currently in pre-planning stage 4/29/2022.)
- Build and set up for the blocks takes a couple of minutes. The bundle and bundling are large.
- If VSCode slows down, be sure to exclude `node_modules` from search.


## Update Content components from Design System
* This plugin only includes content compontents from the Design System, other components are handled differently.
* Manually update `./blocks/*/package.json` with updated version number.
* Make sure the markup changes match component documentation from [Design System website](https://designsystem.webstandards.ca.gov/components/.
* Be aware that there is a lot of legacy documentation on Gutenberg Blocks, but the examples in this git repo match the current spec.
* Any issues with Design System components, file on https://github.com/cagov/design-system.
* We recommend checking out the design and engineering principles: https://designsystem.webstandards.ca.gov/components/
* We suggest working with a designer to help with wire-framing a UI experience in the editor.


## Debugging mode for developers

### To run with debugger
* Right now: edit: define( 'CAGOV_DESIGN_SYSTEM_GUTENBERG__DEBUG', false );

* Soon: `export CAGOV_DESIGN_SYSTEM_WORDPRESS_GUTENBERG="true"`
Create local environment variable.

* From root directory, run `npm run build` to generate a full build of *all* Gutenberg Blocks, running from `/src` folder.
* Updates will load in `build/cagov-design-system.debug.js`, `build/gutenberg.debug.js`, etc.
Loading

0 comments on commit e78d46b

Please sign in to comment.