Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into add-iqts
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed May 8, 2024
2 parents 2546e36 + 6729525 commit 410a5e1
Show file tree
Hide file tree
Showing 219 changed files with 35,832 additions and 32,512 deletions.
Binary file modified .DS_Store
Binary file not shown.
19 changes: 16 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@ assignees: ''

---

**Describe the bug**
# This is mandatory information for an issue to be accepted.

If this information is not provided, it may be closed without action being taken.

## Must associate a type and project

1. Assign the 'DfE Design' project to this issue
2. Assign a label (Documentation, Bug, Enhancement etc)

## Describle the issue
A clear and concise description of what the bug is.

**To Reproduce**
## What do you do to reproduce it
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
## What should happen?
A clear and concise description of what you expected to happen.

------

## The following is optional information

**Screenshots**
If applicable, add screenshots to help explain your problem.

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/require-issue-number.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Enforce Issue Number in PR Title'

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
check-pr-title:
runs-on: ubuntu-latest
steps:
- name: Check title
uses: actions/checkout@v2
- name: Verify issue number in PR title
run: |
if ! [[ "${{ github.event.pull_request.title }}" =~ #[0-9]+ ]]; then
echo "PR title does not contain an issue number!"
exit 1
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.env
.env
.DS_Store
8 changes: 8 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
10 changes: 10 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false
10 changes: 10 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rules:
quoted-strings:
required: only-when-needed
extra-allowed: ['{|}']
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
37 changes: 37 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.18.1
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v1.4.1
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- [email protected]
- [email protected]
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
actions:
disabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
enabled:
- trunk-upgrade-available
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to the DfE Design manual

Thank you for your interest in contributing to the DfE Design manual project. This document outlines the processes and guidelines that help ensure successful contributions.

## Code of Conduct

Please review our [Code of Conduct](https://github.com/DFE-Digital/design?tab=coc-ov-file#) before contributing to uphold our community standards.

## Getting Started

To begin contributing, make sure your development environment is set up according to the instructions in the project's `README.md`.

## How to Contribute

### Reporting Bugs

To report a bug, use the **Bug Issue Template** provided in the repository. Ensure you provide all the necessary details to help us understand and address the issue swiftly.

### Suggesting Enhancements

For new features or enhancements, please use the **Feature Request Template**. Detailed descriptions help us better evaluate and prioritize your suggestions.

### Making a Pull Request (PR)

#### Creating Your PR

**Create a New Branch**: From your local repository, create a new branch for your changes. Name your branch something descriptive, like `feature/add-new-design-component`.

`git checkout -b your-branch-name`

**Make Your Changes**: Implement the changes as intended. Be sure to adhere to the coding standards and guidelines outlined in the repository.

**Commit Your Changes**: Once your changes are ready, commit them to your branch.

`git add .`

`git commit -m "Add a descriptive commit message"`

**Push Your Branch**: Push the branch to the main repository.

**Open a Pull Request**:

- Navigate to the [main repository on GitHub](https://github.com/DFE-Digital/design). You should see a prompt to open a pull request from your newly pushed branch.
- Ensure the pull request details include:
- **Associated Issue Numbers**: Link the issue numbers addressed by your PR.
- **Assignee**: Set yourself or another relevant contributor as the assignee.
- **Label**: Apply appropriate labels to categorize the PR (e.g., bug, enhancement).
- **Project**: Allocate the PR to the "DfE Design" project.
- PRs must be reviewed by the code owner in DesignOps; assign the PR to `andyjones81`.

#### PR Review Process

Each PR will automatically create a review app in the Heroku pipeline for the design manual. This review app will be linked to your PR, and you must test your changes in this environment. The app will automatically be deleted after 5 days if no further changes are deployed.

#### PR Requirements

PRs that do not meet the following criteria will be rejected:

- Has no associated issue numbers in the details.
- Assignee is not set.
- Appropriate label is not set.
- Not allocated to the "DfE Design" project.

## Need Help?

If you need help with your contribution, please contact designops at [[email protected]](mailto:[email protected]).
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This is the Department for Education Design Manual

## Contributing
Please see our [Contributing Guide](CONTRIBUTING.md) for details on how you can contribute to this project.


## Prerequisites

Expand All @@ -18,13 +21,14 @@ Run `npm i nodemon -g`
Add a .env file and add the following keys:

```
recaptchaPublic=x
recaptchaSecret=x
feedbackTemplateID=x
notifyKey=preprod-x
BASE_URL=http://localhost:3066
sessionkey=xxx
apikey=xxx
cmsurl=xxx
airtableFeedbackKey=xxx
airtableFeedbackBase=xxx
```
Contact Design Ops for the keys to use in your local environment. These must never be checked in to source code - the file is included in the .GITIGNORE file.
Contact DesignOps for the keys to use in your local environment. These must never be checked in to source code - the file is included in the .GITIGNORE file.

Run `npm install`

Expand Down
Binary file modified app/.DS_Store
Binary file not shown.
Binary file modified app/assets/.DS_Store
Binary file not shown.
Binary file added app/assets/images/app.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/ehcp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/familyhubs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/frontends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/layers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/part-of-gdd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/sas_manage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/temp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/js/all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/js/dfefrontend.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 29 additions & 37 deletions app/assets/js/feedback.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,43 @@
var feedbackTab = document.getElementById('feedback-tab');
var feedbackPanel = document.getElementById('feedback-panel');

var feedbackForm = document.getElementById('feedback-form');
var feedbackFormInput = document.getElementById('feedback_form_input');
var servicesTab = document.getElementById('services-tab');
var servicesPanel = document.getElementById('services-panel');

var submitButton = document.getElementById('submitbutton');
var cancelButton = document.getElementById('cancelbutton');
var closeNav = document.getElementById('closeNav');

feedbackTab.addEventListener('click', function (event) {

servicesTab.addEventListener('click', function (event) {
event.preventDefault(); // prevent the default link behavior
if (feedbackPanel.style.display === 'none') {
feedbackPanel.style.display = 'block';
feedbackPanel.setAttribute('aria-hidden', 'false');
feedbackTab.setAttribute('aria-expanded', 'true');
if (servicesPanel.style.display === 'none') {
servicesPanel.style.display = 'block';
servicesPanel.setAttribute('aria-hidden', 'false');
servicesTab.setAttribute('aria-expanded', 'true');
} else {
feedbackPanel.style.display = 'none';
feedbackPanel.setAttribute('aria-hidden', 'true');
feedbackTab.setAttribute('aria-expanded', 'false');
servicesPanel.style.display = 'none';
servicesPanel.setAttribute('aria-hidden', 'true');
servicesTab.setAttribute('aria-expanded', 'false');
}
});


submitButton.addEventListener('click', function (event) {
event.preventDefault();
var formData = new FormData(feedbackForm);
var xhr = new XMLHttpRequest();

xhr.open('POST', '/submit-feedback');
xhr.onload = function () {
if (xhr.status === 200) {
feedbackFormInput.value = "";
feedbackTab.textContent = 'Feedback submitted';
feedbackPanel.style.display = 'none';
feedbackPanel.setAttribute('aria-hidden', 'true');
feedbackTab.setAttribute('aria-expanded', 'false');
document.addEventListener('keydown', function (event) {
// Check if the Escape key is pressed
if (event.key === "Escape" || event.key === "Esc") {
// Prevent the default action to avoid any side effects
event.preventDefault();

// Check if the servicesPanel is currently displayed
if (servicesPanel.style.display === 'block') {
servicesPanel.style.display = 'none';
servicesPanel.setAttribute('aria-hidden', 'true');
servicesTab.setAttribute('aria-expanded', 'false');
}
};
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send(new URLSearchParams(formData).toString());

}
});

cancelButton.addEventListener('click', function (event) {
closeNav.addEventListener('click', function (event) {
event.preventDefault();

feedbackFormInput.value = "";
feedbackPanel.style.display = 'none';
feedbackPanel.setAttribute('aria-hidden', 'true');
feedbackTab.setAttribute('aria-expanded', 'false');

servicesPanel.style.display = 'none';
servicesPanel.setAttribute('aria-hidden', 'true');
servicesTab.setAttribute('aria-expanded', 'false');
});
1 change: 1 addition & 0 deletions app/assets/js/govuk-frontend.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 410a5e1

Please sign in to comment.