Commit Graph

136 Commits

Author SHA1 Message Date
Andre Rocha
6df87a7cd7 Re-enable pa11y (#1456) 2019-05-13 10:08:06 -07:00
Kaelig Deloumeau-Prigent
ba0224a5ce PR generator script: remove ping to non-existent team (#1435) 2019-05-09 17:58:25 -07:00
Ben Scott
0edecb7697 Update to latest sewing-kit
Update a few dependencies that we want to keep in sync with sewing-kit

Use `sewing-kit optimize` to optimize svgs instead of maintaining our
own script which does the same thing.
2019-05-08 11:26:14 +02:00
Alex Page
46f549c4b7 parent 4d38d6c48d
author Alex Page <alex@alexpage.com.au> 1550690840 -0500
committer Alex Page <alex@alexpage.com.au> 1555444481 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEbs0GzULmz5C7WGf6hOEwlnZsvcIFAly2MwEACgkQhOEwlnZs
 vcI0MQ//XK+LDN5GvrxpRNUtiFT2R3afq+U+v0Dl8OZETJYeyIYFLHorOeI+NRQm
 I+/99E7eLjVdGcT0I4s/nCueYLPvNPqvRQNkFd4/Tt7RW20pOWEeqaLfeQsEeTRb
 cJIEsELEaWFVlV7hVQpdkOjpbrEW+WMtLEZf8aWjlas3K9oE1kpcfo9ap0MwUssV
 vNBQHay7fQxQmLKDDoi3A5A0Suoxr0pcXitrdAzjD3TaZ6rAPoA+sHwdrGPrwYdE
 kffhV3uSeZU3dPW8UDAS10/E4FWj+/wy1EZoCnsdiv5xcLtGpkes4mTiFckYJduO
 zbAPcy7qF69rk1bTzw0tPdMqjNXdRpbtI2Zw9FmiJDuNbjQB57r+ceFGxs+sZm81
 7ue2dfo6vWvUyg5rj/cbfxRfYdUqiumoStYoCObUtSN1ijzgI25bZ3/obe3LpeDl
 rIvr/90oZJRMQEGKLMsNuxBGET8Ns7fGkUq/D6bAaXSbC3bezwPKYTYtS655SPH8
 /DebF91ZUHrhfkJ2xb+EKdgf50qGfejuiR+7yMgk6Nw6UHkq/YpUSAl3tswn5qJ2
 5v39YBV2rtx6is8CtrjVdWoA5GiCbnrsL3hwBeYLFehp6YaVLS+baOeXZoQrQGNQ
 oGA9z8SXbV7X9osdbvWzP52gukKS13UqKy9zboQ/CUzFz5LfbVU=
 =TiVL
 -----END PGP SIGNATURE-----

parent 4d38d6c48d
author Alex Page <alex@alexpage.com.au> 1550690840 -0500
committer Alex Page <alex@alexpage.com.au> 1555444422 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEbs0GzULmz5C7WGf6hOEwlnZsvcIFAly2MsYACgkQhOEwlnZs
 vcJbTRAAnxDO5uicaWdN629PfXervItOlF3TBfFx4bhKtTvVL0v4vh2sAtpEO9FL
 SxqFEGy9lmdXxFkws7Mj9pEXWNo8KZBoEiWoRkOokmjgYoc8NOM3w/p2T2dNh01X
 TxticIGMS2KhDq9ThtLuz7zrYGNSrRxHm6uBcSJFe53V2u0UZqkq69aneEtBbESu
 1YsjiX9p/zl/Q0ZWALLaPt9vR4S4rx58ooRvItyIW2E8+VuOIo07oATZo5acM+hj
 W5dNoJLyq6mIjbs7yToWb/okyvZI77t9wRoUfxBp/l3IBHMP3e9UJm6h77xW9QRf
 uqOqw6+NB1amlUFsiIMgY6wzP7KkW/3dHXeuIhvWuHWDXEgq+9xvUbCg63mnVct8
 gweL7jlsOQ4Flw4an7F1mtnAJ2BleNwckHtR8hcMumLRjBqcUY1cZv8OA3YqrsTt
 bsM4Bd0xlDduhyjjbIxOV8vOb8gqDBvXovNhbhmcaRsZBDLeMkrMVurOxCHL0EYW
 ANjD/K3SS02jnpmGqeAzAJeB1lxIybYm0Vy+zeonin5GSS8isyt5tve/YBpAKjte
 8PlMs0GjlNAry8kV5yEN9jZlGkXFHB4VK/pARW1cLjo7HNHsyZpfQGf932ALik6v
 VX4R+FcbdqgJMjxhm9C8Z2l621kaBH7l9KokYmnGut0RleLtJOY=
 =hBLx
 -----END PGP SIGNATURE-----

parent 4d38d6c48d
author Alex Page <alex@alexpage.com.au> 1550690840 -0500
committer Alex Page <alex@alexpage.com.au> 1555443438 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEbs0GzULmz5C7WGf6hOEwlnZsvcIFAly2Lu4ACgkQhOEwlnZs
 vcIUAg//YCZ5sNjGYhUfc/7aQ+Iqc0hhUc1vtc7rulz0zypLg4UXoW3+ZpTd24Qw
 /rl47mGkkuHxp9lu0jx6Y+hHMqNrvwT6tMZF7m1y/DmjgEgULAJVhA0CSHljerbI
 iNR1eAeFtWs0Ha0xawPlSnD9oShUNCMW8SMKp5T5SAMPwEW2UCEPZ7CGTamURqqb
 WEFM2mGDkUEal/2m/aODNb95YljCIZL7/0HjjJQdmc6/r4yG9IavsaIuqBe4bSOS
 pOD3yQiv93HR3nrFgIowQb34rDIZnumQOJUgonkC2Vo6VmPdxsnrV0AYhHTUWiBA
 rsPAWNEZUZwMAGs6j/w58J9lyFE9J+UQ5E/387rU/3voMUZHkJldmLkIw9LMNVfk
 vDa0We9FBrupN9ZFtcq/Pr54C5VrdpUXDU0Po/Xhzw9TpZ66HYyG3oDXMwYt6HHJ
 QYRREyUTGowZlTbdJtDnuoJyYwHk5wXXuf9oUME1u5P3dkHKZJQP+zauVAYqYDBU
 b124tOnGLSz6coMhDXGb120l4NsyqGfnG2FGzrIpbEb8AYYMDf5MnQShBVM4mmWI
 AQf7i+PW/wBF2rQr2KcCEvlr3U/+FXKlVdUH6MVYlCGISpEfgC4YrQvwPZz4rz+5
 ppY1hL9K3y8YwIPE4qr3dTbNYNdz/tJCktjMJaG5xZ4e5uAmVJM=
 =uLQC
 -----END PGP SIGNATURE-----

parent 4d38d6c48d
author Alex Page <alex@alexpage.com.au> 1550690840 -0500
committer Alex Page <alex@alexpage.com.au> 1555443394 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEbs0GzULmz5C7WGf6hOEwlnZsvcIFAly2LsIACgkQhOEwlnZs
 vcLCqBAAs8L/c9rSgjlobuSkott5oZfk+p+y7rWPOzAwPHAEol0LtjMMo5Rqg552
 iBPaUi5I+sKXISw6FHl/DVP/nnLEBwfh5nx7ifn2WyOtXxRZQTIDJFPnJ6cPpYfX
 AxjGKNyBgLrXtHmElTTMH/P8X8rPSkSPUO12HR3MuvRrYUCTyeLz+KgfgvHZUU0j
 hFICyeIhvemOfU2Oiri0zdGRvc/f27eY83FAyABSTDR+yFwRXQwovrCY2W5DXd5/
 ZXuXPRFK4ecyyK3j/Va2mDfTxT9J93aJzHVpFERAr8ZAnDvm8zwNL6qY+pRzv472
 3dF/rFzUflNMgcuQfVqxtKdyNOMvcC/0uQy/tBlNSoOLtqJZVKbwipyG9xjRKd5f
 zV+rOhVFrbSVHqFP/9J7rjChlxtrgEYhhUByL/gKLgt3DnwZd5BF3USLqf4EmXO6
 qrng7HT4YhXmBjCyqobGMQzxQc+lfsBoMCAWR4HIZt1rUg4IJuPHvknrmvBfqMvD
 2/bverKmz9Aj6YFvhrakMB9Fhvn11pAOvkrQuTix7BE8L83/wJPXj2CWHZOkw3wQ
 XhhY2rT0pE2yfA6HS246FyzoMvuZ6+w6M3/TkCXu02r9GXA0qjiFY18oIveJ3FQ0
 u80BMpws4ipb8ZrkINixOZUhyQVgk7HGZRWvGgCFxgJUxlhxXi8=
 =2dWH
 -----END PGP SIGNATURE-----

parent 4d38d6c48d
author Alex Page <alex@alexpage.com.au> 1550690840 -0500
committer Alex Page <alex@alexpage.com.au> 1555442578 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEbs0GzULmz5C7WGf6hOEwlnZsvcIFAly2K5IACgkQhOEwlnZs
 vcLwHBAAuaD19q417bzLbmi6UaWfeIH4NQInc1man8pi4Fx3K4cr4CbUypFC4L5c
 aZW2LmbBw36Rt2gw8dX4tOgqTNZGFqK3ersbj1RddBF7Gqarln0NW8BP6gJsxY/i
 jiRHAwEEXX+VHzVMpZXIOFbPbs+6iFVrDjAMcgY46ZulhMxIW3z3+A533yoEE3Lu
 au4MU94xWY0cDalCSe5Zmy/zF5G0nHw+cWzhafvEVFSJ2m2QzHTJm3g4WkNzSCWF
 1G2lN+eQS8VMhq4ypeBYIkxxrMwpSeGR2ai9xVADQOXA2bOV7Yvxk+R+2wnwhOlz
 suzdWzhSKaeO/fcfC2C/NwAZ2hJV2vGd4LLiphK9MDDmaz1OCqwRMTo9Jny46SsU
 cJTL7KTOEvhdDF+z0DycgQwNJzDAGSMY6ggKOx10jtx2rtYzwsQXoImE4noHgZuV
 DIlNidBEQg4KUuTR1WcEm+7uN/WbtEUGFhVfr3g6QvuH/sOn1XaT8oS+nL+PMdTC
 i18qKeGyqmIHyHgE4pzQ7a4cxlHFYUwyNbvl4OrhDIoD07DZPfv/SXagJIDG9JKI
 m4qe5oSrt5M7CZ/Ybx9ld6xoWbWY1v01ixQWxuakfZYWdhhoTwAH/Dhz/bWX/EVh
 jlTn9fe8neIVjMl96O45qE74bMw47T7W6MhKFvOinsfzM3xeyg0=
 =qPJf
 -----END PGP SIGNATURE-----

Add a retry on failure of update version
2019-04-16 16:04:56 -04:00
Ben Scott
a304d23666 Storybook v5 (#1140) 2019-04-03 19:39:17 -07:00
Kaelig Deloumeau-Prigent
de299d52fa Fix capitalization 2019-02-14 10:00:53 -08:00
Kaelig Deloumeau-Prigent
35c8b22d6a Ping Ben when a PR is opened on the style guide 2019-02-14 10:00:20 -08:00
Ben Scott
296dc34bed Specify babel config in babel.config.js
Settings in babel.config.js are project-wide and used every time you
call babel. This saves us repeating ourselves in the various places we
trigger babel

Usually we want to compile targeting the web, however when running in
Jest we want to target a node environment
2019-01-23 12:11:38 -08:00
Kaelig Deloumeau-Prigent
597f76f19c Use the latest version of yarn to upgrade Polaris on the style guide (#856)
* Use the latest version of yarn to upgrade Polaris on the style guide

ShipIt comes with an old version of Yarn, that doesn't support integrity hashes. This means each polaris-styleguide PR coming from polaris-react deploys is deleting thousands of lines (hashes) from yarn.lock.

By leveraging the latest version of Yarn, we know those hashes will be kept in.

* Update UNRELEASED.md

* Use a strict version of Yarn

* Get the yarn version from dev.yml
2019-01-23 11:42:48 -08:00
Ben Scott
3db4d7f6ba Only optimize our svgs when building
Previously this tried to optimize svgs within the node_modules folder
too, all of which we never use.

This makes the optimize build step take about 250ms instead of 4300ms -
shaving about 4 seconds off our build time.
2019-01-22 12:34:42 -08:00
Ben Scott
1811ebebb4 Run rollup once, to generate both cjs and es-modules bundles
Previously we ran rollup for twice, but as the only thing that differs
is the output format that's not needed.

This reduces the build time by ~5.5 seconds (~15%)
2019-01-21 15:27:13 -08:00
Ben Scott
43398b789f Compile using Babel 7
babel-core "7.0.0-bridge.0" is needed for the moment as Jest 23 does not
support Babel 7 (support will be in Jest 24)
2019-01-08 17:51:48 -08:00
Ben Scott
4c560932e0 Remove all usages of babel-node
That extra transpile step means an extra dependency but doesn't add
any value
2019-01-08 15:58:13 -08:00
Ben Scott
083230365f Replace playground with Storybook
Ran with the same command (`yarn dev`) this contains all the
functionality you know and love - hot reloading, a playground, percy
snapshots just with a different veneer
2019-01-08 13:02:07 -08:00
Andre Rocha
6276abec89 Fix percy false positives (#704)
* Fix percy false positives by adding a 2s delay before taking the screenshot
2018-12-13 15:43:45 -02:00
Ben Scott
a1a8aaa7d4 Unify Tophat and Playground servers
Tophatting is now done through the playground server instead of being a
separate thing. Examples are now hot reloadable - modifications to
README files and components will be reflected in your browser without
needing to save due to markdown files being imported via webpack loader.

This makes the examples part of the build pipeline instead of something
that gets serialised into the page. This makes individual pages smaller
at the expense of a larger bundle (which is shared amongst pages).
2018-11-22 18:51:35 -08:00
Ben Scott
7f89ff4c47 Add comment to not-obvious things in sass-build 2018-11-19 16:39:59 -08:00
Dustin Masters
61f66fa858 Fix path replacement in sass-build on Windows
glob will return paths separated by forward slashes. However, on Windows, paths use backslashes by default. On line 49, a simple string replace is done to strip the path off of `srcFile`. On Windows, srcDir will contain backslashes, but srcFile will contain forward slashes, so the replace will silently replace nothing. A crash then occurs later since sassFile contains a full path instead of just a filename.

The fix is to convert backslashes in srcDir into forward slashes to make the string replace work across both Windows and non-Windows platforms.
2018-11-16 16:27:56 -08:00
Ben Scott
b472c40111 Make shrink-ray look at the tophat output
This is better than playground, because it uses most components, while
the playground has just the Page component. This allows us to get a
better feel for the size of the project as a whole.
2018-11-07 18:17:52 -08:00
Ben Scott
df89cae1ee Run shrink-ray on the base playground
The Playground and the shrink-ray sample page were borderline identical.
This lets us remove the shrink-ray-build folder

Simplify playground's compiled asset locations slightly - now all build
assets go in /playground/build rather than some in build, .cache and
assets. This allows us to gitignore a single folder rather than 3.
2018-11-06 13:46:01 -08:00
Ben Scott
bf6676cfc1 Add eslint-comments plugin to indentify unused disable comments 2018-11-01 16:58:28 -07:00
Ben Scott
495956884c Autofix linting issues
Fixes issues relating to import order and useless path segments
2018-11-01 16:58:27 -07:00
Ben Scott
da9344e15b Manually fix several linting issues
Prior to this version of eslint-plugin-shopify some rules were
inadvertently disabled due to ordering of plugins causing prior plugins
to be disabled. This has now been fixed so we can see errors for things
that were problematic.
2018-11-01 16:58:15 -07:00
Ben Scott
9e5196a850 Tidy up some eslint ignore lines
* Stop ignoring /tests and /playground as plugins no longer crash on
  those files
* Remove folder-specific eslint files as they don't do anything
* Use `eslint-ignore no-console` at the top of scripts to avoid having
 to add it to every line
* Add an override targeting the playground to avoid needing to include
the eslint-disable in the file (and thus in the PR template)
2018-10-23 13:21:21 -07:00
Tim Layton
dfdefc0b37 Merge branch 'open-development' into beta-and-open-dev 2018-10-21 13:17:54 -07:00
Tim Layton
828898e596 Shopify App Bridge 🌉🎉 (#2450)
* add appBridge to polaris context

* implement app bridge for loading and update tests

* add tests

* use appBridge in toast

* update tests

* update prop with default value, set to dismissable, and unmount safely

* render page components with app bridge

* add callback support, move to private methods

* add lifecycle handlers

* bump app-bridge version and update isDismissible option

* generate redirect callbacks based on url

* add target type to actions, remove logic to infer target

* add tests

* dev up

* [Modal] App Bridge (#2320)

* stop exporting embedded modal and export normal modal with modal props instead

* get a working app bridge modal

* better type for size and pull title

* get all props working, needs refactor with page

* easdk action is already part of the complex action type

* move modal app bridge transforms into shared utility

* refactor page to use shared transformers

* rebase off beta/app-bridge, respond to feedback, and fix modal typing

* add tests

* refactor transforms

* add transformer tests, refactor transformer to use overload, and subsequent refactors of page and modal and their tests

* add test for modal not opening on mount

* respond to feedback

* [Resource picker] App bridge (#2443)

* upgrade resource picker to use app bridge

* refactor toast and loading based on app bridge version bump

* change close callback to cancel callback, fix subscribed select action

* tweak docs

* set defaults to keep them in sync with our docs, add  showVariants

* add tests

* fix tests

* not true is also known as false

* cast action as Action.ADMIN_PATH to avoid casting as any

* use enum instead of string for argument to subscribe

* The EASDK is dead, long live the Shopify App Bridge

* fix tests

* replace type cast with overload function

* safe guard against calls to set unless something has changed

* add tests for safe guards to set

* support the danger button

* document all the changes

* ignore tophat examples if hidePlayground is true

* burn handle warning from Modal

* use default toast duration in tests

* stop typing as any in overloaded transformer function

* add note about shopOrigin to not have https://

* update history example

* dynamically generate types for target and modal size

* update prop docs for shopOrigin

* no no no
2018-10-19 11:22:02 -07:00
Tim Layton
9aebff99cd Merge branch 'master' into open-dev-merge-master 2018-10-06 00:10:16 -07:00
Dan Rosenthal
de58a8eed5 Merge branch 'master' of github.com:Shopify/polaris-react into master-into-src-build-beta-7 2018-09-19 09:26:28 -04:00
Gord Pearson
8c664b2bfe esnext contains individual assets for better treeshaking 2018-09-13 09:46:14 -04:00
amrocha
da3b708947 Temporarily disable failing states 2018-09-12 13:52:17 -07:00
amrocha
94e5c6b41d Disable contrast rule 2018-09-12 13:51:14 -07:00
amrocha
bab65e310d Improve error reporting 2018-09-12 13:32:15 -07:00
Tim Layton
7419083ffd Merge branch 'master' into open-development-merge-master 2018-09-09 17:43:23 -07:00
Kaelig Deloumeau-Prigent
a57d64b733 Widen reach of linting scripts and fix linting errors (#1970)
* Format various files

* Wider reaching lint/format

The autoformat tools should format the same files you should run into in
your editor. Previously we weren't catching js files, json files and any
ts files outside the src folder.

Update lint:js command to include the whole folder, not just src
Update format:prettier command to include json files.

Fix linting issues raised by checking more files.
2018-08-23 17:22:27 -07:00
Gord Pearson
2718d2e6ca Revert polaris-from-src 2018-08-21 13:35:18 -04:00
amrocha
4843ed602e Also fail when an item in the shitlist is not found in the tests 2018-08-20 17:20:29 -07:00
amrocha
bb2044f9c5 Add script to run pa11y on components, add shitlist, make it run in CI 2018-08-20 17:20:29 -07:00
Tim Layton
b18fcb61cd Merge pull request #1839 from Shopify/open-development-remove-duplicate-readmes
[open development] Remove duplicate readmes declaration
2018-08-01 13:32:51 -07:00
Kaelig Deloumeau-Prigent
4abad93645 Use the npm registry for faster propagation (#1840) 2018-07-31 17:10:29 -07:00
Kaelig
b3102486b7 Use the npm registry for faster propagation 2018-07-31 16:56:22 -07:00
Kaelig
80d5d87212 Remove duplicate readmes declaration 2018-07-31 16:21:53 -07:00
Kaelig
73cc189ecf Merge branch 'master' of https://github.com/Shopify/polaris-react into open-development 2018-07-31 16:15:16 -07:00
Kaelig Deloumeau-Prigent
8d1a76f3f2 Deploy script: ensure all @shopify/* packages are pulled from the public registry (#1818)
* Deploy script: ensure all @shopify/* packages are pulled from the public registry

Fixes an issue where `@shopify/react-html` versions above 1.0.0 wouldn't be found when running `yarn upgrade ...`, because yarn would attempt to fetch available versions from the internal npm registry where this package also exists, but not with the correct versions.

* Use single quotes
2018-07-30 11:27:37 -07:00
Gord Pearson
c506bf0d2b esnext contains individual assets for better treeshaking 2018-07-30 12:27:30 -04:00
Tim Layton
bf6e2c5f20 Ensure all @shopify/* packages are pulled from the public registry 2018-07-28 16:43:51 -04:00
Tim Layton
93b17a79d5 add tests for readme version updating 2018-07-26 14:48:03 -04:00
Tim Layton
53920bae35 change readme-update-version script to use regex for finding prev version
- clean up commands
- remove version-bump, hook into version command
- fix linting errors
2018-07-26 14:48:02 -04:00
Tim Layton
f0a00b1d23 modified scripts
* modified build script
* removed public repo deploy script
* moved the styleguide PR script to its own file
* added script to update the version number in readmes
* add `yarn bump <version>` command
2018-07-26 14:48:02 -04:00
Andre Rocha
acc0b6e0b7 Remove pr_id (#1763) 2018-07-17 15:40:55 -07:00
Daniel Leroux
01b1bac445 adding new line to optimize script 2018-07-03 13:35:25 -04:00