Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: search-v2 follow ups #97

Merged
merged 9 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Title of PR should use a standard commit prefix (feat, fix, chore, etc.) followed by an optional context ((components), (linting), etc), and a succinct description. I.E. feat(components): add MyFancyComponent -->

<!-- Does not have to match PR title. I.E. MyFancyComponent -->
# {Insert short title}

<!-- What is the rationale for the changes? -->
## Background
- a
- b
- c

<!-- What is the description of the changes? -->
## Description
- Adds this
- Removes that

## Acceptance Criteria
<!-- What are the steps to test the changes? -->
1. a
2. b
3. c
7 changes: 6 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export default {extends: ['@commitlint/config-conventional']};
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'footer-max-length': [2, 'never']
}
};
38 changes: 36 additions & 2 deletions eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ module.exports = {
'plugin:vue/vue3-recommended',
'plugin:vue/strongly-recommended',
'@vue/eslint-config-prettier',
'plugin:vuejs-accessibility/recommended'
],
env: {
node: true
},
plugins: ['prettier'],
plugins: ['prettier', 'vuejs-accessibility'],
rules: {
'vue/require-default-prop': 'off',
indent: 'off',
Expand Down Expand Up @@ -41,9 +42,42 @@ module.exports = {
tabWidth: 2,
useTabs: true,
singleQuote: true,
quotes: [2, "single", { "avoidEscape": true }]
quotes: [2, 'single', { 'avoidEscape': true }]
},
],
'vue/no-multiple-template-root': 'off',
'vuejs-accessibility/alt-text': [
'error',
{
'elements': ['img', 'object', 'area', 'input[type="image"]'],
'img': ['Image'],
'object': ['Object'],
'area': ['Area'],
'input[type=\'image\']': ['ImageInput']
}
],
"vuejs-accessibility/no-redundant-roles": [
"error",
{
"nav": ["navigation"],
}
],
"vuejs-accessibility/media-has-caption": [
"error",
{
"audio": ["Audio"],
"video": ["Video"],
"track": ["Track"]
}
],
"vuejs-accessibility/label-has-for": [
"error",
{
"required": {
"some": ["nesting", "id"]
},
"allowChildren": true
}
]
},
};
8 changes: 6 additions & 2 deletions eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pdap-design-system/eslint-config",
"version": "1.0.0",
"version": "1.0.2",
"description": "eslint config for PDAP client apps",
"main": "index.js",
"type": "commonjs",
Expand All @@ -16,5 +16,9 @@
"homepage": "https://github.com/Police-Data-Accessibility-Project/design-system#readme",
"peerDependencies": {
"eslint": ">= 8"
},
"devDependencies": {
"@ronilaukkarinen/stylelint-a11y": "^1.2.9",
"eslint-plugin-vuejs-accessibility": "^2.3.0"
}
}
}
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@100..900&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
Expand Down
107 changes: 104 additions & 3 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@pdap-design-system/eslint-config": "^1.0.0",
"@pdap-design-system/eslint-config": "^1.0.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^12.1.0",
Expand Down Expand Up @@ -103,7 +103,7 @@
"clean:test": "rimraf coverage",
"lint": "run-p lint:*",
"lint:css": "stylelint 'src/**/*.{css,vue}'",
"lint:es": "eslint src --ext .ts .",
"lint:es": "eslint --ext .ts,.vue src",
"lint:ts": "vue-tsc",
"postbuild": "rimraf dist/{config,utils}",
"posttest": "npm run clean:test",
Expand Down Expand Up @@ -135,4 +135,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
22 changes: 13 additions & 9 deletions src/components/Breadcrumbs/PdapBreadcrumbs.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<nav aria-label="Breadcrumb">
<transition-group class="pdap-breadcrumbs" name="pdap-breadcrumbs" tag="ul">
<transition-group class="pdap-breadcrumbs" tag="ul">
<li
v-for="breadcrumb in breadcrumbs"
:key="breadcrumb.text"
Expand Down Expand Up @@ -58,15 +58,19 @@ export default {
.pdap-breadcrumbs .is-active {
@apply text-neutral-950;
}
</style>

/* Animations */
.pdap-breadcrumbs-enter-active,
.pdap-breadcrumbs-leave-active {
transition: opacity 0.2s ease;
}
<style scoped>
@media (prefers-reduced-motion: no-preference) {
/* Animations */
.v-enter-active,
.v-leave-active {
transition: opacity 0.2s ease;
}

.pdap-breadcrumbs-enter-from,
.pdap-breadcrumbs-leave-to {
opacity: 0;
.v-enter-from,
.v-leave-to {
opacity: 0;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`PdapBreadcrumbs > renders breadcrumbs correctly for a double-nested route 1`] = `
<nav aria-label="Breadcrumb">
<transition-group-stub appear="false" class="pdap-breadcrumbs" css="true" name="pdap-breadcrumbs" persisted="false" tag="ul">
<transition-group-stub appear="false" class="pdap-breadcrumbs" css="true" persisted="false" tag="ul">
<li class>
<a>Product</a>
</li>
Expand All @@ -18,7 +18,7 @@ exports[`PdapBreadcrumbs > renders breadcrumbs correctly for a double-nested rou

exports[`PdapBreadcrumbs > renders breadcrumbs correctly for a single-nested route 1`] = `
<nav aria-label="Breadcrumb">
<transition-group-stub appear="false" class="pdap-breadcrumbs" css="true" name="pdap-breadcrumbs" persisted="false" tag="ul">
<transition-group-stub appear="false" class="pdap-breadcrumbs" css="true" persisted="false" tag="ul">
<li class>
<a>Product</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/PdapButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
}

.pdap-button-primary {
@apply pdap-button bg-brand-gold text-white;
@apply pdap-button bg-brand-gold text-neutral-50;
}

.pdap-button-primary[type='submit'] {
Expand Down
Loading
Loading