Skip to content

v1.1.0 #347

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

Merged
merged 23 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
61abcdb
Only `e.preventDefault` when Dropdown is active (#307)
nmanu1 Sep 22, 2022
b2e41f2
Address test-site dependency vulnerabilities (#308)
nmanu1 Sep 29, 2022
ae97885
Upgrade Jest to v29 (#309)
nmanu1 Sep 30, 2022
776086a
Run tests on react v18 (#310)
nmanu1 Oct 3, 2022
d8e76b9
Fix TS errors in `tests` directory (#314)
nmanu1 Oct 13, 2022
3b0ecbf
Fix React SSR hydration ID mismatch error (#315)
yen-tt Oct 17, 2022
5057f43
Address Snyk vulnerabilities (#320)
nmanu1 Oct 31, 2022
d531bd4
Export CSS bundle without Tailwind preflight (#322)
nmanu1 Nov 2, 2022
c24ae51
Create hotfix v1.0.1. (#325)
tatimblin Nov 3, 2022
99a9542
Expose styling of facet headers in FilterGroup (#321)
tatimblin Nov 7, 2022
1896473
Address Snyk vulnerabilities (#326)
nmanu1 Nov 8, 2022
b63e7f8
Merge branch 'develop' into dev/resolve-conflicts-v1.0.2
nmanu1 Nov 9, 2022
1166991
Merge main (v1.0.2) into develop (#330)
nmanu1 Nov 9, 2022
893368d
Add onSelect prop to FilterSearch (#323)
nmanu1 Nov 11, 2022
8422231
Mapbox component (#332)
yen-tt Nov 15, 2022
a2e8319
Update default FilterSearch behavior (#333)
nmanu1 Nov 15, 2022
a46128b
Update version to v1.1.0-beta.335 (#335)
nmanu1 Nov 15, 2022
5a67086
Fix wcag github action mapbox issues (#337)
yen-tt Nov 17, 2022
da4b74d
Fix visual coverage test in Github Actions (#339)
yen-tt Nov 18, 2022
f364882
Address Snyk vulnerabilities (#341)
nmanu1 Dec 2, 2022
fedd93e
FilterSearch updates for `builtin.location` (#343)
nmanu1 Dec 5, 2022
ae10af6
Remove Node 12 deprecation warnings (#345)
nmanu1 Dec 6, 2022
c224bcf
Update verison to v1.1.0.
tmeyer2115 Dec 15, 2022
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
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
test_script: npm run test
secrets:
caller_github_token: ${{ secrets.GITHUB_TOKEN }}
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}
individual_coverage_percentages:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/percy-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
percy_script: npx percy storybook ./storybook-static
secrets:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}
5 changes: 2 additions & 3 deletions .github/workflows/run-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Run Linter

on:
pull_request:
branches:
- main
branches: [main, develop, feature/*]

jobs:
linting:
uses: yext/slapshot-reusable-workflows/.github/workflows/run-linting.yml@v1
uses: yext/slapshot-reusable-workflows/.github/workflows/run-linting.yml@v1
16 changes: 15 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,29 @@ name: Run Tests
on: [push, pull_request]

jobs:
call_run_tests-react-18:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
build_script: |
npm i -D react@18 react-dom@18
npm run build
node_matrix: '["14.x", "16.x", "18.x"]'
secrets:
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}

call_run_tests-react-17:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
node_matrix: '["14.x", "16.x", "18.x"]'
secrets:
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}

call_run_tests-react-16:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
build_script: |
npm i -D react@16.14 react-dom@16.14
npm run build
node_matrix: '["14.x", "16.x", "18.x"]'
node_matrix: '["14.x", "16.x", "18.x"]'
secrets:
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}
17 changes: 10 additions & 7 deletions .github/workflows/sync-sites-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ on:
push:
branches:
- main

jobs:
sync-branches:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: mtanzi/action-automerge@v1
uses: actions/checkout@v3
- uses: devmasx/merge-branch@v1.4.0
with:
source: "${{ github.event.repository.default_branch }}"
target: "storybook-site"
type: now
from_branch: ${{ github.event.repository.default_branch }}
target_branch: storybook-site
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: mtanzi/action-automerge@v1
- uses: devmasx/merge-branch@v1.4.0
with:
source: "${{ github.event.repository.default_branch }}"
target: "test-site"
type: now
from_branch: ${{ github.event.repository.default_branch }}
target_branch: test-site
github_token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/sync_develop_and_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Create PR from main to develop

on:
push:
branches: main

jobs:
call_sync_develop_and_main:
uses: yext/slapshot-reusable-workflows/.github/workflows/sync_develop_and_main.yml@v1
secrets:
caller_github_token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/version_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Update package version for release & hotfix branches

on:
push:
branches: [release/*, hotfix/*]

jobs:
call_version_update:
uses: yext/slapshot-reusable-workflows/.github/workflows/version_update.yml@v1
secrets:
caller_github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/wcag_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: WCAG tests

on:
pull_request:
branches:
- main
branches: [main, develop, feature/*]

jobs:
call_wcag_test:
uses: yext/slapshot-reusable-workflows/.github/workflows/wcag_test.yml@v1
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}
with:
build_script: ./tests/scripts/start-storybook.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ lib/
# testing
/coverage
/storybook-static

.env
test-site/.env
10 changes: 9 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ module.exports = {
framework: '@storybook/react',
staticDirs: ['./public'],
webpackFinal: async (config) => {
//use commonjs entry point for "@reach" packages
config.resolve.alias['@reach/auto-id'] = require.resolve('@reach/auto-id');
config.resolve.alias['@reach/utils'] = require.resolve('@reach/utils');

config.resolve.alias['./SearchCore'] = require.resolve('../tests/__fixtures__/core/SearchCore.ts');
config.resolve.alias['../utils/location-operations'] = require.resolve('../tests/__fixtures__/utils/location-operations.ts');
return config;
}
},
env: (config) => ({
...config,
REACT_APP_MAPBOX_API_KEY: process.env.MAPBOX_API_KEY || process.env.REACT_APP_MAPBOX_API_KEY,
}),
};
4 changes: 3 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './index.css';
import 'mapbox-gl/dist/mapbox-gl.css';
import { SearchCoreDecorator } from '../tests/__fixtures__/core/SearchCore';
import { runOnly } from './wcagConfig';

Expand All @@ -22,6 +23,7 @@ export const parameters = {
'SearchBar',
'UniversalResults',
'VerticalResults',
'MapboxMap',
'DirectAnswer',
'FilterSearch',
'StaticFilters',
Expand All @@ -42,4 +44,4 @@ export const parameters = {
};

// Add the decorator to all stories
export const decorators = [SearchCoreDecorator];
export const decorators = [SearchCoreDecorator];
11 changes: 10 additions & 1 deletion .storybook/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ module.exports = {
...tailwindConfig,
content: [
'./src/**/*.{ts,tsx}'
]
],
theme: {
...tailwindConfig.theme,
extend: {
...tailwindConfig.theme.extend,
borderColor: {
DEFAULT: 'black'
}
}
}
};
34 changes: 21 additions & 13 deletions .storybook/test-runner.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
import { injectAxe, checkA11y } from 'axe-playwright';
import { Page } from 'playwright-core';
import { runOnly } from './wcagConfig';
import { TestContext, TestRunnerConfig } from '@storybook/test-runner';

/**
* See https://storybook.js.org/docs/react/writing-tests/test-runner#test-hook-api-experimental
* to learn more about the test-runner hooks API.
*/
const renderFunctions = {
const renderFunctions: TestRunnerConfig = {
async preRender(page: Page) {
await injectAxe(page);
},
async postRender(page: Page, context) {
await checkA11y(page, '#root', {
axeOptions: {
runOnly,
rules: {
'color-contrast': { enabled: context.name !== 'Loading' }
},
},
detailedReport: true,
detailedReportOptions: {
html: true,
async postRender(page: Page, context: TestContext) {
await checkA11y(
page,
{
include: ['#root'],
exclude: ['#root .mapboxgl-canvas-container'],
},
});
{
axeOptions: {
runOnly,
rules: {
'color-contrast': { enabled: context.name !== 'Loading' },
},
},
detailedReport: true,
detailedReportOptions: {
html: true,
},
}
);
},
};

Expand Down
Loading