-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add code of conduct * update default port and install instructions * link and copy updates * update preview image * update ds link in overview * update versioning docs * update process docs * add cms integration docs Co-authored-by: Nathan Rogan <nathanroagn@centro.org.uk>
- Loading branch information
Showing
23 changed files
with
492 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
education, socio-economic status, nationality, personal appearance, race, | ||
religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at {{ email }}. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# CMS Integration | ||
|
||
Every new template should be created on a new branch based on `release` following the guidelines in [Versioning](../versioning.md#123-new-branches). | ||
|
||
Where feasible any new components should be added as a partial view and imported into the template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Creating pages | ||
|
||
When the Design System is built it automatically generates files from `src/www` to the `build` folder. These are the files used to generate the [Design System front-end](https://wmcads.netlify.app/). | ||
|
||
These pages are created from the files within `src/www/pages`. This is where you can import [components](../../../src/wmcads/components/README.md) or [patterns](../../../src/wmcads/patterns/README.md) found in `src/wmcads`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Nunjucks parameters | ||
|
||
Change the behavior of components by sending custom parameters. | ||
|
||
This enables us to re-use components without having to duplicate them just to change copy or UI features. | ||
|
||
## Change copy | ||
|
||
As an example lets change the title of a component: | ||
|
||
1 - In the compoent `.njk` file add a custom parameter like this: | ||
|
||
{% set title = params.title or 'Default Title' %} | ||
|
||
This is looking for a parameter called `title`, if the parameter is not found the default value is used after `or`. | ||
|
||
2 - Display the value in the front end. | ||
|
||
Add the parameter name within `{{ }}` where you want the value to appear: | ||
|
||
<h1>{{title}}</h1> | ||
|
||
3 - Send the title value to the component | ||
|
||
{{ | ||
wmcadsComponentName({ | ||
title: "New title" | ||
}) | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Internal process for developing the new WMCA website | ||
|
||
These docs outline the process all designers and developers should be following when updating the WMCA Design System and for testing templates for the new WMCA website. | ||
|
||
## Development | ||
|
||
Make sure you are familiar with how the design system is setup and how to contribute to it by reviewing the [Contributing guide](../contributing.md). | ||
|
||
Main points to follow: | ||
|
||
- Each new feature or bugfix should be created on a new branch based on `release` following the guidelines in [Versioning](versioning.md#123-new-branches). | ||
- This makes it easier for multiple developers to work on the same feature or bugfix without disturbing the main codebase. | ||
- This also makes it easier to carry out staggered releases to the main codebase. | ||
- All new components or patterns need to follow the [Coding standards](coding-standards.md). | ||
- Any new CMS templates should be added to the design system to ensure: | ||
- That the latest components and patterns are in use | ||
- To show the template to designers for sign off | ||
- Any custom styles and javascript are checked and generated in the build process | ||
- Once you are ready to propose new changes, you must **open a pull request to the** `release` **branch**. | ||
- This will trigger the Github actions which will: | ||
- Check the pull request title to ensure the semantic-release works correctly | ||
- Checks the codebase for any linting or accessibility issues | ||
- A preview will be created in Netlify | ||
- The pull request will then be reviewed by the head developer and any issues identified. | ||
- Once the lead developer is happy with the pull request an ICT change request will be created and merged into the `master` branch. | ||
|
||
### Points for template creation | ||
|
||
- All templates should be added into `src/www/pages/templates`. These will appear on the main Design System site [here](https://wmcads.netlify.app/templates/). | ||
- Ensure you use the appropriate style [utilities classes](https://wmcads.netlify.app/styles/utility-classes/) for the template layout. | ||
- Check that the page passes accessibility checks using automated tools such as [AXE](https://www.deque.com/axe/), [Wave](https://wave.webaim.org/) or [Lighthouse](https://developers.google.com/web/tools/lighthouse) (or a combination of the tools). | ||
- Once the pull request passes all checks and the lead developer confirms it's ok the template preview will be sent to the designers for final sign off. | ||
|
||
## Design / UX / UI | ||
|
||
- When a template has been signed off by the lead developer a Netlify preview link will be sent to the designers | ||
- Designers should review the template on desktop, tablet and mobile to ensure the design works as expected. | ||
- Any issues to be added to the GitHub repository [issues](https://github.com/wmcadigital/wmca-design-system/issues) page. Where possible add the sprint card reference found in the [West Midlands Combined Authority - Backlog](https://github.com/orgs/wmcadigital/projects/18). E.g. `DS2.1 - Font issue with body copy`. | ||
|
||
### Template Sign Off | ||
|
||
Only when the template has been signed off by the lead developer and design can it be integrated into the Content Management System. | ||
|
||
#### Sign off checklist | ||
|
||
- Templates use the design System utility classes, components & patterns | ||
- If the template requires extra styles or scripts these should be added into the `src/www/pages/templates/template-name` folder so they can go through [Linting](../contributing/testing-and-linting.md) and the build process. | ||
- If the code is concidered useful for other pages it should be added to the base Design System. | ||
- Templates pass accessibility checks | ||
- Approved by lead developer | ||
- Approved by Design | ||
|
||
## CMS Integration | ||
|
||
When the template has been signed off it can be integrated into our [CMS](../contributing/cms/cms-integration.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.