From d7259686bf63ac86b384738feaea23995477196f Mon Sep 17 00:00:00 2001 From: amrocha Date: Fri, 27 Sep 2019 14:41:30 -0700 Subject: [PATCH 1/9] Try out the workflow --- src/components/Avatar/Avatar.tsx | 2 +- src/components/DataTable/DataTable.scss | 2 +- src/components/DatePicker/DatePicker.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index f9e2ede2a8f..bdf1c29cf6a 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -120,7 +120,7 @@ export function Avatar({ ) { key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || - key === 'ArrowRight' + key === 'ArrowRighta' ) { event.preventDefault(); event.stopPropagation(); From 205b2e3326d02fb1303c7154a5c5bf8d9ed3ec35 Mon Sep 17 00:00:00 2001 From: Andre Rocha Date: Fri, 27 Sep 2019 14:45:04 -0700 Subject: [PATCH 2/9] Create discoverability.yml --- .github/workflows/discoverability.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/discoverability.yml diff --git a/.github/workflows/discoverability.yml b/.github/workflows/discoverability.yml new file mode 100644 index 00000000000..d3848d4683f --- /dev/null +++ b/.github/workflows/discoverability.yml @@ -0,0 +1,24 @@ +name: Discoverability + +on: + pull_request: + branches: + - test-splash-action + +jobs: + discoverability-action: + name: Discoverability action + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: yarn + run: | + yarn + + - name: Add a comment with known areas to test + uses: shopify/discoverability-action@master + with: + codebaseGlob: src/**/*.tsx + ignoreGlob: src/**/*.test.tsx + githubToken: ${{ secrets.GITHUB_TOKEN }} From 74e9e60ff023badd9c5d398b178ec7e5a96bdd47 Mon Sep 17 00:00:00 2001 From: Andre Rocha Date: Fri, 27 Sep 2019 14:47:36 -0700 Subject: [PATCH 3/9] Update discoverability.yml --- .github/workflows/discoverability.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/discoverability.yml b/.github/workflows/discoverability.yml index d3848d4683f..4fb26aaa67b 100644 --- a/.github/workflows/discoverability.yml +++ b/.github/workflows/discoverability.yml @@ -1,9 +1,6 @@ name: Discoverability -on: - pull_request: - branches: - - test-splash-action +on: pull_request jobs: discoverability-action: From ea237d877a2d57069a08596dedabdcb8b2dc10f1 Mon Sep 17 00:00:00 2001 From: amrocha Date: Mon, 30 Sep 2019 13:51:16 -0700 Subject: [PATCH 4/9] Undo test changes --- src/components/Avatar/Avatar.tsx | 2 +- src/components/DataTable/DataTable.scss | 2 +- src/components/DatePicker/DatePicker.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index bdf1c29cf6a..f9e2ede2a8f 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -120,7 +120,7 @@ export function Avatar({ ) { key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || - key === 'ArrowRighta' + key === 'ArrowRight' ) { event.preventDefault(); event.stopPropagation(); From 20a44fc58425ae934efdcb48f6b6358acbdc6500 Mon Sep 17 00:00:00 2001 From: Andre Rocha Date: Mon, 30 Sep 2019 13:52:19 -0700 Subject: [PATCH 5/9] Update discoverability.yml --- .github/workflows/discoverability.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/discoverability.yml b/.github/workflows/discoverability.yml index 4fb26aaa67b..7e6b197eb5a 100644 --- a/.github/workflows/discoverability.yml +++ b/.github/workflows/discoverability.yml @@ -10,8 +10,7 @@ jobs: - uses: actions/checkout@master - name: yarn - run: | - yarn + run: yarn - name: Add a comment with known areas to test uses: shopify/discoverability-action@master From ae55dbbcb33160e385e164795fb2d0a064da6430 Mon Sep 17 00:00:00 2001 From: amrocha Date: Mon, 30 Sep 2019 14:33:40 -0700 Subject: [PATCH 6/9] testaaaaaaaaaaaaa --- src/components/DataTable/DataTable.scss | 2 +- src/components/DatePicker/DatePicker.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DataTable/DataTable.scss b/src/components/DataTable/DataTable.scss index b83a3cf95f9..bf52f089339 100644 --- a/src/components/DataTable/DataTable.scss +++ b/src/components/DataTable/DataTable.scss @@ -1,6 +1,6 @@ @import '../../styles/common'; -$first-column-width: rem(145px); +$first-column-width: rem(195px); $breakpoint: 768px; .DataTable { diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx index becc2f4a613..c85a43e4b2e 100644 --- a/src/components/DatePicker/DatePicker.tsx +++ b/src/components/DatePicker/DatePicker.tsx @@ -267,7 +267,7 @@ function handleKeyDown(event: React.KeyboardEvent) { key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || - key === 'ArrowRight' + key === 'ArrowRights' ) { event.preventDefault(); event.stopPropagation(); From da8e099ebcf3e0a0286c6b009783ca7392123df9 Mon Sep 17 00:00:00 2001 From: Andre Rocha Date: Mon, 30 Sep 2019 15:34:33 -0700 Subject: [PATCH 7/9] Update discoverability.yml --- .github/workflows/discoverability.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/discoverability.yml b/.github/workflows/discoverability.yml index 7e6b197eb5a..20ac7c367ee 100644 --- a/.github/workflows/discoverability.yml +++ b/.github/workflows/discoverability.yml @@ -13,7 +13,7 @@ jobs: run: yarn - name: Add a comment with known areas to test - uses: shopify/discoverability-action@master + uses: shopify/discoverability-action@beta-1 with: codebaseGlob: src/**/*.tsx ignoreGlob: src/**/*.test.tsx From 04b98daa68dfedef25c7d61f5ca6f1c7cfb7271b Mon Sep 17 00:00:00 2001 From: amrocha Date: Mon, 30 Sep 2019 15:40:25 -0700 Subject: [PATCH 8/9] Undo test changes --- src/components/DataTable/DataTable.scss | 2 +- src/components/DatePicker/DatePicker.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DataTable/DataTable.scss b/src/components/DataTable/DataTable.scss index bf52f089339..b83a3cf95f9 100644 --- a/src/components/DataTable/DataTable.scss +++ b/src/components/DataTable/DataTable.scss @@ -1,6 +1,6 @@ @import '../../styles/common'; -$first-column-width: rem(195px); +$first-column-width: rem(145px); $breakpoint: 768px; .DataTable { diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx index c85a43e4b2e..becc2f4a613 100644 --- a/src/components/DatePicker/DatePicker.tsx +++ b/src/components/DatePicker/DatePicker.tsx @@ -267,7 +267,7 @@ function handleKeyDown(event: React.KeyboardEvent) { key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || - key === 'ArrowRights' + key === 'ArrowRight' ) { event.preventDefault(); event.stopPropagation(); From 5644e793041ea23f2a3dd16b784134f06edb0417 Mon Sep 17 00:00:00 2001 From: amrocha Date: Mon, 30 Sep 2019 15:43:35 -0700 Subject: [PATCH 9/9] Changelog --- UNRELEASED.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UNRELEASED.md b/UNRELEASED.md index 8bc863496dc..c2c510c2268 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -35,3 +35,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f - Added `MediaQueryProvider` to ease the use of media queries and reduce duplication ([#2117](https://github.com/Shopify/polaris-react/pull/2117)) ### Deprecations + +### Development workflow + +- Added a Github action, [discoverability-action](https://github.com/Shopify/discoverability-action), that runs `yarn splash` on PR diffs and leaves a comment with the output ([#2208](https://github.com/Shopify/polaris-react/pull/2208))