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

Version 4.0.0 #902

Merged
merged 263 commits into from
Aug 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
263 commits
Select commit Hold shift + click to select a range
9107319
Merge pull request #1236 from Shopify/update-master-190321
AndrewMusgrave Mar 26, 2019
3e5efd0
Remove componentWillReceiveProps
AndrewMusgrave Mar 11, 2019
2d48a38
changelog
AndrewMusgrave Mar 27, 2019
bc98fd8
Merge pull request #1255 from Shopify/ap-rm-cwrp
AndrewMusgrave Apr 16, 2019
23e4624
Remove componentWillReceiveProps
AndrewMusgrave Mar 8, 2019
4e388dd
changelog and add test
AndrewMusgrave Mar 27, 2019
55bde16
Merge pull request #1254 from Shopify/tp-rm-cwrp
AndrewMusgrave Apr 18, 2019
296a276
Add new context to navigation
AndrewMusgrave Apr 30, 2019
ecb113d
Add new context to combobox
AndrewMusgrave Apr 30, 2019
c31ec57
changelog
AndrewMusgrave May 2, 2019
cce8a8b
Update context api
AndrewMusgrave Mar 26, 2019
78f400d
changelog
AndrewMusgrave Mar 27, 2019
560c70e
Merge pull request #1253 from Shopify/u-scrollable-c
AndrewMusgrave May 6, 2019
9146cca
changelog
AndrewMusgrave May 2, 2019
9d3985d
Merge pull request #1403 from Shopify/combobox-new-context
AndrewMusgrave May 6, 2019
dc0377d
Merge pull request #1402 from Shopify/nav-new-context
AndrewMusgrave May 6, 2019
a486782
Update React 🎊
AndrewMusgrave Apr 30, 2019
2610f6b
changelog
AndrewMusgrave May 1, 2019
c0774bb
Add onChange for select in ConnectedFieldsExample
May 1, 2019
8d4061a
onChange for SeparateValidationErrorExample error logs
May 1, 2019
c12b271
Use the new context api in ThemeProvider
AndrewMusgrave May 1, 2019
e29287c
changelog
AndrewMusgrave May 1, 2019
862a709
Add withAppProvider test
AndrewMusgrave May 1, 2019
cce1d1c
remove-testid-warning
AndrewMusgrave May 9, 2019
d49f30e
changelog
AndrewMusgrave May 9, 2019
6ee408c
Add new context to appprovider
AndrewMusgrave May 7, 2019
16035d1
Convert dropzone
AndrewMusgrave May 9, 2019
f1565a7
Merge pull request #1462 from Shopify/new-context-style-new-branch
AndrewMusgrave May 14, 2019
b05b1fe
Add hooks
AndrewMusgrave May 14, 2019
a176047
Merge pull request #1482 from Shopify/create-polaris-hooks
AndrewMusgrave May 15, 2019
f8ade61
Merge pull request #1424 from Shopify/appprovider-new-context
AndrewMusgrave May 15, 2019
623cd1f
Merge pull request #1447 from Shopify/remove-testid-warning
AndrewMusgrave May 15, 2019
7464cae
Remove withContext and withRef from fileupload
AndrewMusgrave May 15, 2019
eae1a19
Removed withContext from Toast
AndrewMusgrave May 15, 2019
cb8a3f7
Merge pull request #1392 from Shopify/update-react
AndrewMusgrave May 15, 2019
83981b9
changelog
AndrewMusgrave May 15, 2019
663a399
changelog & memo
AndrewMusgrave May 15, 2019
3941237
Removed withContext from loading
AndrewMusgrave May 15, 2019
5c8d18a
Removed withContext from ScrollTo
AndrewMusgrave May 15, 2019
76de68f
Remove prop-types
AndrewMusgrave May 15, 2019
805d070
changelog
AndrewMusgrave May 15, 2019
e90362f
Merge pull request #1505 from Shopify/remove-prop-types
AndrewMusgrave May 16, 2019
a28c09a
Merge pull request #1494 from Shopify/ts-dec-hoc
AndrewMusgrave May 16, 2019
f7447f6
Merge pull request #1497 from Shopify/ld-dep-hoc
AndrewMusgrave May 16, 2019
7ad4572
Merge pull request #1499 from Shopify/st-dep-hoc
AndrewMusgrave May 16, 2019
800895b
Remove withRef from UnstyledLink
AndrewMusgrave May 15, 2019
badd914
Merge pull request #1501 from Shopify/usl-dep-hoc
AndrewMusgrave May 16, 2019
a8b8f61
Increase react and react-dom peer dependencies to 16.8.6
BPScott May 17, 2019
9d8fe69
Update UNRELEASED-V4.md
BPScott May 17, 2019
744ddaf
Merge pull request #1525 from Shopify/bump-peerdeps
BPScott May 20, 2019
9c86d68
Merge pull request #1491 from Shopify/fu-dep-hoc
AndrewMusgrave May 21, 2019
72e8f70
Merge branch 'master' into 19-05-21-master-to-v4
AndrewMusgrave May 21, 2019
52b9970
Fix errors and failures after merge
AndrewMusgrave May 21, 2019
14ced1c
Convert sheet to functional component and fix tests
AndrewMusgrave May 21, 2019
970508e
Fix Dualthumb tests and linter
AndrewMusgrave May 21, 2019
bc0c85c
Add missing braces
AndrewMusgrave May 21, 2019
d3bddb2
Merge pull request #1548 from Shopify/19-05-21-master-to-v4
AndrewMusgrave May 23, 2019
ae9f083
Remove componentWillReceiveProps from optionlist
AndrewMusgrave May 22, 2019
02fe093
changelog
AndrewMusgrave May 22, 2019
323ee60
Merge pull request #1557 from Shopify/ol-rm-cwrp
AndrewMusgrave May 23, 2019
6c81f78
Replace `import * as React from 'react'` with default import
BPScott May 17, 2019
a8390c9
Use named import instead of `import * as ReactDOM`
BPScott May 17, 2019
7675fc5
Changlog
BPScott May 17, 2019
677b484
Use named exports for hooks
BPScott May 17, 2019
ddd9cc1
Merge pull request #1523 from Shopify/default-react
BPScott May 24, 2019
672059f
Remove react-utilities
BPScott May 24, 2019
58e043e
Fix navigation withincontentcontext regression
AndrewMusgrave May 24, 2019
befc469
Make choicelist title required (#1575)
May 27, 2019
5974a3b
Merge pull request #1571 from Shopify/nav-withincontentcontext-fix
AndrewMusgrave May 28, 2019
b116548
Removed withContext from FilterControl
AndrewMusgrave May 15, 2019
f2bd068
changelog & useCallback
AndrewMusgrave May 15, 2019
47510c0
Merge pull request #1500 from Shopify/fc-dep-hoc
AndrewMusgrave May 28, 2019
8c478cf
Removed withContext from ResourceList.Item
AndrewMusgrave May 15, 2019
c2eb6b1
Merge pull request #1503 from Shopify/rli-dep-hoc
AndrewMusgrave May 28, 2019
d4667f9
Removed withContext from Navigation.Item
AndrewMusgrave May 15, 2019
f7251e2
changelog & useCallback
AndrewMusgrave May 15, 2019
5f03863
Merge pull request #1502 from Shopify/ni-dep-hoc
AndrewMusgrave May 28, 2019
7252d38
Removed withContext from ContextualSaveBar
AndrewMusgrave May 15, 2019
26f3ac2
changelog & memo & tests
AndrewMusgrave May 15, 2019
3b3b133
Merge pull request #1498 from Shopify/csr-dep-hoc
AndrewMusgrave May 29, 2019
dd5f05b
Merge branch 'master' into 19-05-30-master-to-v4
AndrewMusgrave May 30, 2019
00cbc2b
Merge pull request #1600 from Shopify/19-05-30-master-to-v4
AndrewMusgrave May 30, 2019
e83de3f
Remove WithRef component and react-compose utility
BPScott May 31, 2019
7d2bbe8
Merge pull request #1610 from Shopify/kill-withref
BPScott May 31, 2019
2db0b7b
Use a functional component for Playground
BPScott May 31, 2019
9432459
Remove deprecated functionality in Icon
BPScott May 30, 2019
5048233
Merge pull request #1604 from Shopify/deprecate-icon-styles
BPScott Jun 4, 2019
bedf5ad
Remove componentWillReceiveProps
AndrewMusgrave Jun 3, 2019
36208e8
changelog
AndrewMusgrave Jun 4, 2019
52c42a7
Simplify withinContentContext
AndrewMusgrave May 30, 2019
2b22627
changelog & simplify type
AndrewMusgrave May 30, 2019
dcaffda
Export WithinContentContext
AndrewMusgrave Jun 5, 2019
6294dc4
Merge pull request #1602 from Shopify/simplify-withincontentcontext
AndrewMusgrave Jun 5, 2019
561b3fb
Add react testing and custom matchers
AndrewMusgrave May 28, 2019
abd5e27
Merge pull request #1628 from Shopify/export-within-content-context
AndrewMusgrave Jun 5, 2019
909ec3d
Merge pull request #1596 from Shopify/testing-exp
AndrewMusgrave Jun 5, 2019
0ca39e6
Remove css utilities
AndrewMusgrave May 28, 2019
f39c5a4
Deprecate singleColumn
AndrewMusgrave May 30, 2019
01ff254
Make i18n required
AndrewMusgrave May 17, 2019
6e47f14
Remove Navigation.UserMenu
AndrewMusgrave May 29, 2019
520c75a
Merge pull request #1599 from Shopify/rm-nav-um
AndrewMusgrave Jun 6, 2019
9436508
Remove withContext
AndrewMusgrave Jun 6, 2019
d042b2e
changelog
AndrewMusgrave Jun 6, 2019
08c2a25
Merge pull request #1641 from Shopify/rm-with-context
AndrewMusgrave Jun 6, 2019
4837131
Merge pull request #1586 from Shopify/rm-css-util
AndrewMusgrave Jun 6, 2019
b30061f
Merge pull request #1530 from Shopify/i18n-mandatory
AndrewMusgrave Jun 6, 2019
923ad73
Merge pull request #1606 from Shopify/narrow-width-page
AndrewMusgrave Jun 6, 2019
755a4be
Update locale path
AndrewMusgrave Jun 7, 2019
68c059d
changelog
AndrewMusgrave Jun 7, 2019
fabf08e
Merge pull request #1649 from Shopify/update-locales-path
AndrewMusgrave Jun 10, 2019
2b8941c
Don’t try to size html to 10px
ry5n May 28, 2019
7f5ee22
adds support for hooks and function component syntax (#1665)
kvendrik Jun 12, 2019
388f676
Remove componentWillReceiveProp from Collapsible
AndrewMusgrave Jun 12, 2019
e7831f6
Remove API for more accurate em conversions
ry5n Jun 11, 2019
02a0aaf
Follow strict naming convertion and alphabetise component exports
AndrewMusgrave Jun 12, 2019
30e9c87
changelog
AndrewMusgrave Jun 12, 2019
d14af6a
Fix TextField examples
AndrewMusgrave Jun 12, 2019
74a87f5
changelog
AndrewMusgrave Jun 12, 2019
2d0c6e9
Merge pull request #1672 from Shopify/fix-textfield-examples
AndrewMusgrave Jun 12, 2019
523854c
Merge pull request #1674 from Shopify/naming-pattern-and-alpha
AndrewMusgrave Jun 12, 2019
a11de0d
Merge pull request #1590 from Shopify/consistent-rem
ry5n Jun 13, 2019
9e2fc15
Merge pull request #1621 from Shopify/po-rm-cwrp
AndrewMusgrave Jun 14, 2019
3939f62
changelog
AndrewMusgrave Jun 12, 2019
7a916de
Merge pull request #1670 from Shopify/col-rm-cwrp
AndrewMusgrave Jun 17, 2019
6bcdf00
Enable no-unsafe with checkAliases
AndrewMusgrave Jun 17, 2019
39e24f8
changelog
AndrewMusgrave Jun 17, 2019
e492f06
Render monochromatic link if passed as children to Banner context
Jun 12, 2019
a45533a
Merge pull request #1651 from Shopify/banner-link-a11y
francinen Jun 18, 2019
ca2cfa3
Merge pull request #1695 from Shopify/update-no-unsafe
AndrewMusgrave Jun 18, 2019
4be0fa4
Removed all useage of findDOMNode
AndrewMusgrave Jun 17, 2019
9f979a6
changelog
AndrewMusgrave Jun 18, 2019
827510e
Merge pull request #1696 from Shopify/remove-finddomnode
AndrewMusgrave Jun 18, 2019
2b330a2
Removed test errors
AndrewMusgrave Jun 19, 2019
db6c3b6
changelog
AndrewMusgrave Jun 19, 2019
6963ae9
Removed default exports from utils
AndrewMusgrave Jun 20, 2019
cb7a5a6
changelog
AndrewMusgrave Jun 20, 2019
76ae4e0
Merge pull request #1717 from Shopify/remove-default-util-exports
AndrewMusgrave Jun 20, 2019
455cbcd
Merge pull request #1715 from Shopify/remove-test-errors
AndrewMusgrave Jun 24, 2019
b315b8e
Enabled strict mode
AndrewMusgrave Jun 18, 2019
6fb4a77
Merge pull request #1709 from Shopify/enable-strict-mode
AndrewMusgrave Jun 24, 2019
0de35f7
Merge branch 'master' into 19-07-24-master-to-v4
AndrewMusgrave Jun 24, 2019
dec9666
Fixed errors after resolving conflicts
AndrewMusgrave Jun 24, 2019
646a4c3
Fixed toast manager
AndrewMusgrave Jun 26, 2019
bc446fc
Removed css transition from popover overlay
AndrewMusgrave Jun 28, 2019
ba19989
Merge pull request #1726 from Shopify/19-07-24-master-to-v4
AndrewMusgrave Jul 4, 2019
18758ce
changelog & addition render fix
AndrewMusgrave Jun 26, 2019
fce0219
changelog & remove raf
AndrewMusgrave Jun 28, 2019
cf91828
Merge pull request #1741 from Shopify/fix-toast-manager
AndrewMusgrave Jul 8, 2019
66f01ba
Merge pull request #1756 from Shopify/rm-css-transition-pool
AndrewMusgrave Jul 8, 2019
e631e55
New app structure
AndrewMusgrave Jun 10, 2019
e0ebffd
Merge pull request #1664 from Shopify/new-util-struct
AndrewMusgrave Jul 8, 2019
2568f47
Merge branch 'master' into 080719-master-to-v4
AndrewMusgrave Jul 8, 2019
0130e7f
Use mui react transition group
AndrewMusgrave Jun 28, 2019
3d3212a
changelog
AndrewMusgrave Jul 2, 2019
57dc2dc
Merge pull request #1759 from Shopify/mui-rtg
AndrewMusgrave Jul 9, 2019
7f83531
Fix errors after conflicts
AndrewMusgrave Jul 9, 2019
9c2d9ad
Use hooks instead of withAppProvider where it's easy
BPScott Jul 9, 2019
88c8045
Merge branch 'version-4.0.0' into 080719-master-to-v4
AndrewMusgrave Jul 9, 2019
a5d3f78
Merge pull request #1797 from Shopify/easy-hooks
BPScott Jul 9, 2019
ea9b113
Merge branch 'version-4.0.0' into 080719-master-to-v4
AndrewMusgrave Jul 9, 2019
719e3e3
Change tests to use strings rather than translations
AndrewMusgrave Jul 9, 2019
ed4a39e
Fix popover overlay positioning
AndrewMusgrave Jul 9, 2019
fb7cf7a
v4.0.0-alpha.0
AndrewMusgrave Jul 9, 2019
ee7281d
Merge branch 'version-4.0.0' into 080719-master-to-v4
AndrewMusgrave Jul 9, 2019
9cd3228
Run sewing-kit format
AndrewMusgrave Jul 9, 2019
b147f04
Merge pull request #1796 from Shopify/080719-master-to-v4
AndrewMusgrave Jul 10, 2019
17d8200
Export TestProvider with defaults and fix typescript react issue
AndrewMusgrave Jul 10, 2019
d53e248
Split apart TestProvider from react-testing and remove react-testing …
AndrewMusgrave Jul 11, 2019
58c59c4
Update Link to use useI18n() instead of withAppProvider (#1806)
BPScott Jul 12, 2019
ce80ea8
Hooky withAppProvider (#1813)
BPScott Jul 12, 2019
c62c6df
Refactor legacy tests
AndrewMusgrave Jul 12, 2019
a18b90d
Merge pull request #1810 from Shopify/export-test-provider-fix-types
AndrewMusgrave Jul 15, 2019
2b49bf5
[v4] Stop repeating typedefs and use undefined as default values for …
BPScott Jul 15, 2019
20ff67e
Simplify args of mountWithAppProvider in legacy tests
BPScott Jul 15, 2019
0789d82
Stop exporting the Theme context type from utilities/them
BPScott Jul 15, 2019
79a0a01
Rename ThemeProviderContext to ThemeContext
BPScott Jul 15, 2019
9bc0f67
Hide collapsible content when exited
AndrewMusgrave Jul 15, 2019
d1d4d8a
Make legacy withAppProvider use the modern types
BPScott Jul 15, 2019
8667cf7
Move custom matchers into tests directory (#1823)
BPScott Jul 15, 2019
a5c0bf1
Move collapsible duration to sass
AndrewMusgrave Jul 16, 2019
9ed4996
Merge pull request #1838 from Shopify/col-always-render-content
AndrewMusgrave Jul 16, 2019
4d03f53
v4.0.0-beta.0
AndrewMusgrave Jul 16, 2019
8a42353
Remove unwanted subcomponent aliases in Autocomplete Combobox (#1830)
BPScott Jul 16, 2019
94fd65b
Remove deprecated functionality (#1831)
BPScott Jul 16, 2019
eb74b68
Merge pull request #1841 from Shopify/further-test-tidying
BPScott Jul 16, 2019
6767a62
Ignore noisy deprecation warnings in tests (#1852)
BPScott Jul 17, 2019
c5c5b81
Revert consistent-rem
AndrewMusgrave Jul 17, 2019
43ef51d
Merge pull request #1857 from Shopify/revert-consistent-rem
AndrewMusgrave Jul 17, 2019
fb1bd88
v4.0.0-beta.1
AndrewMusgrave Jul 17, 2019
a0a667c
Remove deprecation message regarding Page Header icon (#1859)
BPScott Jul 17, 2019
1215796
Fix "Function components do not support contextType" error in tests (…
BPScott Jul 17, 2019
7e794f3
Removed extra type definitions
AndrewMusgrave Jul 17, 2019
56329a5
changelog
AndrewMusgrave Jul 17, 2019
0f53047
Merge branch 'master' into july-22-master-to-v4
AndrewMusgrave Jul 22, 2019
d29a0e5
Create isObjectsEqual to replace _.isEqual
AndrewMusgrave May 27, 2019
5665c27
Fix lint errors
AndrewMusgrave Jul 22, 2019
039826f
changelog & fix paths
AndrewMusgrave May 27, 2019
377f2b0
Merge pull request #1808 from Shopify/fix-popover-overlay-positioning
AndrewMusgrave Jul 22, 2019
dfd661c
Merge pull request #1862 from Shopify/rm-extra-type-defs
AndrewMusgrave Jul 22, 2019
1813f8c
Merge pull request #1580 from Shopify/ld-iq
AndrewMusgrave Jul 22, 2019
4572da8
Merge pull request #1868 from Shopify/july-22-master-to-v4
AndrewMusgrave Jul 22, 2019
d1c28ea
Update changelog
AndrewMusgrave Jul 17, 2019
eaf00b0
Merge pull request #1861 from Shopify/update-changelog
AndrewMusgrave Jul 22, 2019
20bd93d
v4.0.0-beta.2
AndrewMusgrave Jul 22, 2019
75766fb
Add overflow visible
AndrewMusgrave Jul 23, 2019
f562f1e
Merge pull request #1875 from Shopify/fix-collapsible-regression
AndrewMusgrave Jul 23, 2019
540a1ed
Check if app contexts have been provided within hooks
BPScott Jul 17, 2019
a265bb5
Remove Link holder class
BPScott Jul 17, 2019
d69cc04
Merge pull request #1864 from Shopify/hook-improvements
BPScott Jul 23, 2019
79c5dcf
v4.0.0-rc.0
AndrewMusgrave Jul 24, 2019
03ac95e
Merge branch 'master' into version-4.0.0
BPScott Jul 25, 2019
f61a604
Updated appbridge example to use new context
AndrewMusgrave Jul 23, 2019
63e8d0e
Fix missing dep in yarn.lock
BPScott Jul 25, 2019
4d892fa
Rename mountWithContext to mountWithApp in modern test utils
BPScott Jul 23, 2019
812ad4b
PolarisTestProvider should provide its own default values
BPScott Jul 24, 2019
7a61de6
Merge pull request #1879 from Shopify/test-changes
BPScott Jul 25, 2019
2736d1e
Improve tsconfig (#1883)
BPScott Jul 25, 2019
6f53c71
Add empty implementation for window.scroll in test setup
BPScott Jul 25, 2019
673f08e
Merge pull request #1877 from Shopify/update-ab-example
AndrewMusgrave Jul 30, 2019
a660dd9
Use act in Navigation Item test to fix warning (#1900)
BPScott Jul 31, 2019
14816b6
Remove Modal.Dialog and Tabs.Panel public subcomponents (#1899)
BPScott Jul 31, 2019
f4d581e
Merge branch 'master' into 190731-master-to-v4
AndrewMusgrave Jul 31, 2019
c79d24a
Fix imports after merging master into v4
AndrewMusgrave Jul 31, 2019
e927570
Merge pull request #1907 from Shopify/190731-master-to-v4
AndrewMusgrave Jul 31, 2019
06685a8
v4.0.0-rc.1
AndrewMusgrave Jul 31, 2019
fe12a7c
Move polaris test provider into components
AndrewMusgrave Aug 1, 2019
05a4a40
Add existance check for ref
AndrewMusgrave Aug 2, 2019
73047ba
Remove typecast
AndrewMusgrave Aug 2, 2019
995da79
changelog
AndrewMusgrave Aug 2, 2019
6e1968e
Fix import
AndrewMusgrave Aug 2, 2019
0ff7a65
Merge pull request #1911 from Shopify/move-polaris-test-provider
AndrewMusgrave Aug 2, 2019
29290b5
v4.0.0-rc.2
AndrewMusgrave Aug 2, 2019
6d12c46
[v4] Override StickyManager context in Scrollable (#1908)
BPScott Aug 2, 2019
fdc5ae8
Use named exports for contexts and utilities (#1909)
BPScott Aug 2, 2019
3a6bde6
Styles build: combine all components into one file (#1912)
BPScott Aug 2, 2019
f7532ac
Merge pull request #1913 from Shopify/rl-ba-ref-check
AndrewMusgrave Aug 2, 2019
1eb9093
Remove frame dependency from useEffect in Loading
AndrewMusgrave Jul 31, 2019
3a1b1f4
Merge pull request #1906 from Shopify/rm-frame-effect-dep-loading
AndrewMusgrave Aug 6, 2019
895cbfb
Bump test coverage
AndrewMusgrave Aug 6, 2019
52291c1
changelog
AndrewMusgrave Aug 6, 2019
ee7988b
Merge pull request #1927 from Shopify/bump-test-coverage-v4
AndrewMusgrave Aug 6, 2019
4f2b410
Improved Collapsible test coverage and fixed resize bug
AndrewMusgrave Aug 6, 2019
925c892
changelog
AndrewMusgrave Aug 6, 2019
9ec0419
Merge pull request #1929 from Shopify/coll-rs-tc
AndrewMusgrave Aug 6, 2019
1fb147a
Merge branch 'master' into 190806-master-to-v4
AndrewMusgrave Aug 6, 2019
cff3457
Fixed type error after merging master into v4
AndrewMusgrave Aug 6, 2019
6d5f138
Remove error log in test by ddd _ref prop and forwardRef (#1934)
Aug 7, 2019
7b161a1
Merge pull request #1930 from Shopify/190806-master-to-v4
AndrewMusgrave Aug 7, 2019
d8725c4
Remove unsed spread opterator
AndrewMusgrave Aug 7, 2019
979fe8b
Merge pull request #1936 from Shopify/rerun-percy
AndrewMusgrave Aug 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"react/button-has-type": "off",
"react/no-array-index-key": "off",
"react/jsx-fragments": ["error", "element"],
"react/no-unsafe": ["error", {"checkAliases": true}],
"shopify/jsx-no-complex-expressions": "off",
"shopify/jsx-prefer-fragment-wrappers": "off",
"shopify/no-ancestor-directory-import": "error",
Expand Down
23 changes: 10 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,17 @@ Fixes #0000 <!-- link to issue if one exists -->
<summary>Copy-paste this code in <code>playground/Playground.tsx</code>:</summary>

```jsx
import * as React from 'react';
import {Page} from '@shopify/polaris';

interface State {}

export default class Playground extends React.Component<never, State> {
render() {
return (
<Page title="Playground">
{/* Add the code you want to test here */}
</Page>
);
}
import React from 'react';
import {Page} from '../src';

export default function Playground() {
return (
<Page title="Playground">
{/* Add the code you want to test in here */}
</Page>
);
}

```

</details>
Expand Down
8 changes: 7 additions & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {configure, addParameters} from '@storybook/react';
import React from 'react';
import {configure, addParameters, addDecorator} from '@storybook/react';
import {setConsoleOptions} from '@storybook/addon-console';
import {create} from '@storybook/theming';
import tokens from '@shopify/polaris-tokens';
Expand Down Expand Up @@ -35,6 +36,11 @@ addParameters({
},
});

const StrictModeDecorator = (story) => (
<React.StrictMode>{story()}</React.StrictMode>
);
addDecorator(StrictModeDecorator);

// addon-console
setConsoleOptions((opts) => {
// When transpiling TS using isolatedModules, the compiler doesn't strip
Expand Down
17 changes: 13 additions & 4 deletions .storybook/polaris-readme-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
const chalk = require('chalk');
const grayMatter = require('gray-matter');
const MdParser = require('./md-parser');
const React = require('react');

const HOOK_PREFIX = 'use';

/**
* A Webpack loader, that expects a Polaris README file, and returns metadata,
Expand Down Expand Up @@ -68,8 +71,12 @@ module.exports = function loader(source) {
return eval(`(${fnString})`).apply(null, Object.values(scope));
};

const hooks = Object.keys(React)
.filter((key) => key.startsWith(HOOK_PREFIX))
.join(', ');

return `
import React from 'react';
import React, {${hooks}} from 'react';
import * as Polaris from '@shopify/polaris';
import {
PlusMinor,
Expand Down Expand Up @@ -278,13 +285,15 @@ function filterMarkdownForPlatform(markdown, platform) {

function wrapExample(code) {
const classPattern = /class (\w+) extends React.Component/g;
const classMatch = classPattern.exec(code);
const functionPattern = /^function (\w+)/g;
const fullComponentDefinitionMatch =
classPattern.exec(code) || functionPattern.exec(code);

let wrappedCode = '';

if (classMatch) {
if (fullComponentDefinitionMatch) {
wrappedCode = `${code}
return ${classMatch[1]};
return ${fullComponentDefinitionMatch[1]};
`;
} else {
wrappedCode = `return function() {
Expand Down
5 changes: 3 additions & 2 deletions .storybook/stories-from-readme.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import * as React from 'react';
import React from 'react';
import {AppProvider, Heading} from '../src';
import {withA11y} from '@storybook/addon-a11y';
import {storiesOf} from '@storybook/react';
import Playground from '../playground/Playground';
import en from '../locales/en.json';

/**
* In most cases we want to test an "All Examples" page as fewer snapshots
Expand Down Expand Up @@ -65,7 +66,7 @@ export function addPlaygroundStory(playgroundModule) {
function AppProviderDecorator(story) {
return (
<div style={{padding: '8px'}}>
<AppProvider>{story()}</AppProvider>
<AppProvider i18n={en}>{story()}</AppProvider>
</div>
);
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ yarn add @shopify/polaris
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.21.0/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/4.0.0-rc.2/polaris.min.css"
/>
```

Expand All @@ -53,7 +53,7 @@ import {AppProvider, Page, Card, Button} from '@shopify/polaris';

```javascript
ReactDOM.render(
<AppProvider>
<AppProvider i18n={{}}>
<Page title="Example app">
<Card sectioned>
<Button onClick={() => alert('Button clicked!')}>Example button</Button>
Expand Down Expand Up @@ -81,7 +81,7 @@ If React doesn’t make sense for your application, you can use a CSS-only versi
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.21.0/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/4.0.0-rc.2/polaris.min.css"
/>
```

Expand Down
111 changes: 111 additions & 0 deletions UNRELEASED-V4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Unreleased changes for version 4.0.0

Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to format new entries. 💜

---

### Breaking changes

- Removed `groups` prop on `Select`. Pass groups to the `options` prop instead. ([#1831](https://github.com/Shopify/polaris-react/pull/1831))
- Removed `Autocomplete.ComboBox.TextField` and `Autocomplete.ComboBox.OptionList`. You should use the `Autocomplete.TextField` and `OptionList` components instead. ([#1830](https://github.com/Shopify/polaris-react/pull/1830))
- Removed `secondaryFooterAction` prop on `Card`. Pass an array of secondary actions to the `secondaryFooterActions` prop instead. ([#1831](https://github.com/Shopify/polaris-react/pull/1831))
- Removed `iconBody` prop on `Navigation`. Pass a string to the `icon` prop instead. ([#1831](https://github.com/Shopify/polaris-react/pull/1831))
- Removed the `WithContext` component, as it was an undocumented part of the public API meant for internal use only ([#1641](https://github.com/Shopify/polaris-react/pull/1641))
- Removed the `WithRef` component, as it was an undocumented part of the public API meant for internal use only ([#1610](https://github.com/Shopify/polaris-react/pull/1610))
- Removed support for passing a string into `<Icon source>` to load a bundled icon. You must load the required icon directly from `@shopify/polaris-icons` instead ([#1604](https://github.com/Shopify/polaris-react/pull/1604)).
- Removed support for passing an `SvgSource` shaped object into `<Icon source>` to load an icon imported using Shopify’s legacy icon loader. You must update sewing-kit to at least v0.82.0 which replaced the legacy loader with using SVGR ([#1604](https://github.com/Shopify/polaris-react/pull/1604)).
- Removed support for passing a React Element into `<Icon source>`. You must pass in a React Component that returns an SVG element instead. ([#1604](https://github.com/Shopify/polaris-react/pull/1604)).
- Removed support for `<Icon untrusted>`. Passing a string into `source` will now always load an untrusted icon, you don't need that additional property. ([#1604](https://github.com/Shopify/polaris-react/pull/1604)).
- Removed `Navigation.UserMenu`. Use `TopBar.UserMenu` instead ([#1599](https://github.com/Shopify/polaris-react/pull/1599))
- Made `ChoiceList`’s `title` prop required to improve accessibility. It can be hidden with `titleHidden`. ([#1575](https://github.com/Shopify/polaris-react/pull/1575))
- Made `AppProvider`’s `i18n` prop required. [Usage instructions](https://polaris.shopify.com/components/structure/app-provider#using-translations) are included in the `AppProvider` docs ([#1530](https://github.com/Shopify/polaris-react/pull/1530))
- Increased peer-dependencies on `react` and `react-dom` to 16.8.6 to enable the use of hooks ([#1525](https://github.com/Shopify/polaris-react/pull/1525))
- Changed the import method for React to use default imports. Applications consuming Polaris using TypeScript must enable [`esModuleInterop`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-from-commonjs-modules-with---esmoduleinterop) in `tsconfig.json`. ([#1523](https://github.com/Shopify/polaris-react/pull/1523))
- Removed `LinkLikeComponent` type export. Use `AppProviderProps['linkComponent']` instead. ([#1864](https://github.com/Shopify/polaris-react/pull/1864))
- Removed the `Modal.Dialog` and `Tabs.Panel` subcomponents as they were undocumented parts of our public API meant for internal use only. ([#1899](https://github.com/Shopify/polaris-react/pull/1899)).

### New components

- `PolarisTestProvider`: Use for Polaris context in tests, see [polaris examples](https://github.com/Shopify/polaris-react/tree/master/examples) for usage ([#1810](https://github.com/Shopify/polaris-react/pull/1810))

### Enhancements

- Improved color contrast of links inside `Banner` ([#1651](https://github.com/Shopify/polaris-react/pull/1651))

### Design updates

### Bug fixes

- Fixed `BulkActionButton` from throwing an error in `componentDidMount` ([#1913](https://github.com/Shopify/polaris-react/pull/1913))
- Fixed `ToastManager` from not working correctly in `React.StrictMode` ([#1741](https://github.com/Shopify/polaris-react/pull/1741))
- Updated translation.yml with the new locales path ([#1649](https://github.com/Shopify/polaris-react/pull/1649))

### Documentation

- Updated `AppProvider` app bridge example to use our `AppBridgeContext`([#1877](https://github.com/Shopify/polaris-react/pull/1877))

### Development workflow

- Added support for React hooks in Storybook ([#1665](https://github.com/Shopify/polaris-react/pull/1665))
- Created `toBeDisabled`, `mountWithContext` and added custom testing matchers ([#1596](https://github.com/Shopify/polaris-react/pull/1596))
- Enabled strict mode in TypeScript ([#1883](https://github.com/Shopify/polaris-react/pull/1883))

### Dependency upgrades

- Added `@material-ui/react-transition-group` and removed `react-transition-group` to support `React.StrictMode` ([#1759](https://github.com/Shopify/polaris-react/pull/1759))
- Added `@shopify/react-testing` ([#1596](https://github.com/Shopify/polaris-react/pull/1596))
- Removed`@shopify/css-utilities` ([#1586](https://github.com/Shopify/polaris-react/pull/1586))
- Removed `@types/prop-types` and `prop-types` ([#1505](https://github.com/Shopify/polaris-react/pull/1505))
- Updated`react` to 16.8.6 and `enzyme` to 3.9.1 ([#1392](https://github.com/Shopify/polaris-react/pull/1392))

### Code quality

- Bumped test coverage in `Collapsible` ([#1929](https://github.com/Shopify/polaris-react/pull/1929))
- Bumped test coverage in `DropZone`, `Frame`, `Icon`, and `Loading` ([#1927](https://github.com/Shopify/polaris-react/pull/1927))
- Removed unused type definitions ([#1862](https://github.com/Shopify/polaris-react/pull/1862))
- Ignored deprecation warnings related to Shopify App Bridge in tests ([#1852](https://github.com/Shopify/polaris-react/pull/1852))
- Updated `withAppProvider` to use a functional component rather than a class component ([#1813](https://github.com/Shopify/polaris-react/pull/1813))
- Updated `Link` to use `useI18n` rather than `withAppProvider` ([#1806](https://github.com/Shopify/polaris-react/pull/1806))
- Updated several components to use hooks instead of `withAppProvider` ([#1797](https://github.com/Shopify/polaris-react/pull/1797))
- Removed `CSSTransition` from `PopoverOverlay` ([#1756](https://github.com/Shopify/polaris-react/pull/1756))
- Updated exports in `src/utilities` and `src/test-utilities` to named exports ([#1717](https://github.com/Shopify/polaris-react/pull/1717))
- Removed test errors and non-deprecation warnings ([#1715](https://github.com/Shopify/polaris-react/pull/1715))
- Enabled `React.StrictMode` in test components and Storybook ([#1709](https://github.com/Shopify/polaris-react/pull/1709))
- Removed all uses of `ReactDOM.findDOMNode` ([#1696](https://github.com/Shopify/polaris-react/pull/1696))
- Enabled `react/no-unsafe` ESLint rule with `checkAliases` ([#1695](https://github.com/Shopify/polaris-react/pull/1695))
- Alphabetized component export order and kebab-case files ([#1674](https://github.com/Shopify/polaris-react/pull/1674))
- Updated `Collapsible` to no longer use `componentWillReceiveProps`([#1670](https://github.com/Shopify/polaris-react/pull/1670))
- Restructured context structure to be more modular ([#1664](https://github.com/Shopify/polaris-react/pull/1664))
- Updated `PositionedOverlay` to no longer use `componentWillReceiveProps`([#1621](https://github.com/Shopify/polaris-react/pull/1621))
- Simplified `WithinContentContainer` context type ([#1602](https://github.com/Shopify/polaris-react/pull/1602))
- Replaced all occurrences of `_.isEqual` with a custom isObjectsEqual function ([#1580](https://github.com/Shopify/polaris-react/pull/1580))
- Updated `OptionList` to no longer use `componentWillReceiveProps`([#1557](https://github.com/Shopify/polaris-react/pull/1557))
- Refactored `DualThumb` tests ([#1548](https://github.com/Shopify/polaris-react/pull/1548))
- Converted `Sheet` to a functional component ([#1548](https://github.com/Shopify/polaris-react/pull/1548))
- Removed `withContext` from `ResourceList.Item` ([#1503](https://github.com/Shopify/polaris-react/pull/1503))
- Removed `withContext` from `Navigation.Item` ([#1502](https://github.com/Shopify/polaris-react/pull/1502))
- Removed `withRef` from `UnstyledLink` ([#1501](https://github.com/Shopify/polaris-react/pull/1501))
- Removed `withContext` from `ResourceList.FilterControl` ([#1500](https://github.com/Shopify/polaris-react/pull/1500))
- Removed `withContext` from `Scrollable.ScrollTo` and added a test to boost coverage ([#1499](https://github.com/Shopify/polaris-react/pull/1499))
- Removed `withContext` from `Loading` ([#1497](https://github.com/Shopify/polaris-react/pull/1497))
- Removed `withContext` and `withAppProvider` from `ContextualSaveBar` ([#1498](https://github.com/Shopify/polaris-react/pull/1498))
- Removed `withContext` from `Toast` ([#1494](https://github.com/Shopify/polaris-react/pull/1494))
- Removed `withRef` and `withContext` from `DropZone.FileUpload` ([#1491](https://github.com/Shopify/polaris-react/pull/1491))
- Created `useAppBridge` hook ([#1482](https://github.com/Shopify/polaris-react/pull/1482))
- Removed testID warning in tests ([#1447](https://github.com/Shopify/polaris-react/pull/1447))
- Updated `AppProvider` to use the new context API and refactored other instances to follow a new pattern and refactor test utilities ([#1424](https://github.com/Shopify/polaris-react/pull/1424))
- Updated all context files to export react context rather than a provider and consumer ([#1424](https://github.com/Shopify/polaris-react/pull/1424))
- Deleted `withSticky` ([#1424](https://github.com/Shopify/polaris-react/pull/1424))
- Upgraded the `Autocomplete` component from legacy context API to use createContext ([#1403](https://github.com/Shopify/polaris-react/pull/1403))
- Upgraded the `Navigation` component from legacy context API to use createContext ([#1402](https://github.com/Shopify/polaris-react/pull/1402))
- Updated `ThemeProvider` to use the new context api ([#1396](https://github.com/Shopify/polaris-react/pull/1396))
- Updated `AppProvider` to no longer use `componentWillReceiveProps`([#1255](https://github.com/Shopify/polaris-react/pull/1255))
- Removed unused context from `Scrollable` ([#1253](https://github.com/Shopify/polaris-react/pull/1253))
- Updated `ThemeProvider` to no longer use `componentWillReceiveProps` ([#1254](https://github.com/Shopify/polaris-react/pull/1254))
- Removed context from `Collapsible` ([#1114](https://github.com/Shopify/polaris-react/pull/1114))
- Refactored `Frame` and its subcomponents to use the `createContext` API instead of legacy context ([#803](https://github.com/Shopify/polaris-react/pull/803))
- Upgraded the `Banner`, `Card`, and `Modal` components from legacy context API to use `createContext` ([#786](https://github.com/Shopify/polaris-react/pull/786))

### Deprecations

- Renamed `singleColumn`on`Page`to`narrowWidth` ([#1606](https://github.com/Shopify/polaris-react/pull/1606)).
2 changes: 1 addition & 1 deletion a11y_shitlist.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"all-components-app-provider--with-i18n-object": [
"all-components-app-provider--with-i18n": [
{
"code": "WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.A.NoContent",
"context": "<a aria-describedby=\"341\" class=\"Item-Link_2-raD\" tabindex=\"0\" id=\"ResourceListItemOverlay1\" href=\"customers/341\" data-polaris-unstyled=\"true\"></a>",
Expand Down
30 changes: 11 additions & 19 deletions config/rollup/plugins/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,35 +170,26 @@ async function generateSass(inputFolder, outputFolder, cssByFile) {
}),
);

// For each file that was referenced in the build, create a copy of the compiled
// ouput
const componentsCssFilenames = [];
cssByFile.forEach(async (compiledCss, filename) => {
const writeStylesFolderFilesPromises = [];
const componentFilesContent = [];
cssByFile.forEach((compiledCss, filename) => {
// Promises to copy the files referenced that live in the styles folder
if (filename.startsWith(`${inputFolder}/styles`)) {
await outputFile(
filename.replace(inputFolder, outputFolder),
compiledCss,
writeStylesFolderFilesPromises.push(
outputFile(filename.replace(inputFolder, outputFolder), compiledCss),
);
}

// For every referenced file that lives in the components folder:
// - copy it into the `styles/components` folder
// - make a note of the filename to use as an import
// - make a note of the contents to use in styles/components.scss
if (filename.startsWith(`${inputFolder}/components`)) {
componentsCssFilenames.push(filename.replace(inputFolder, '.'));

await outputFile(
filename.replace(inputFolder, `${outputFolder}/styles`),
compiledCss,
);
componentFilesContent.push(compiledCss);
}
});

// Generate styles/components.scss
// Contains imports for all the individual components that we collected above
const componentsScssContents = componentsCssFilenames
.map((filename) => `@import "${filename.replace(/\.scss$/, '')}";`)
.join('\n');
// Contains contents for all the individual components that we collected above
const componentsScssContents = componentFilesContent.join('\n\n');

// Generate polaris.scss
const polarisScssContent = `@import 'styles/foundation';
Expand All @@ -208,6 +199,7 @@ async function generateSass(inputFolder, outputFolder, cssByFile) {
`;

await Promise.all([
...writeStylesFolderFilesPromises,
outputFile(
`${outputFolder}/styles/components.scss`,
componentsScssContents,
Expand Down
21 changes: 21 additions & 0 deletions config/typescript/react-transition-group.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
declare module '@material-ui/react-transition-group' {
import {Component} from 'react';

import CSSTransitionNameSpace = require('react-transition-group/CSSTransition');
import {TransitionProps} from 'react-transition-group/Transition';

type FindDOMNode = () => HTMLElement | null;
interface CombinedTransitionProps extends TransitionProps {
findDOMNode: FindDOMNode;
}
type CombinedCSSTransitionProps = CSSTransitionNameSpace.CSSTransitionProps &
CombinedTransitionProps;

// eslint-disable-next-line react/prefer-stateless-function
class Transition extends Component<CombinedTransitionProps> {}
// eslint-disable-next-line react/prefer-stateless-function
class CSSTransition extends Component<CombinedCSSTransitionProps> {}
import TransitionGroup = require('react-transition-group/TransitionGroup');

export {CSSTransition, Transition, TransitionGroup};
}
2 changes: 1 addition & 1 deletion config/typescript/react.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';

declare module 'react' {
interface Attributes {
Expand Down
5 changes: 0 additions & 5 deletions src/locales/de.json → locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@
"iFrameTitle": "Text-Markup",
"modalWarning": "Diese erforderlichen Eigenschaften fehlen im Modus: {missingProps}"
},
"Page": {
"Header": {
"iconWarningMessage": "Das Symbol-Prop wurde von der Seite entfernt. Laden Sie stattdessen ein Anwendungssymbol im Abschnitt \"App-Setup\" Partners Dashboard von Shopify hoch."
}
},
"Pagination": {
"previous": "Zurück",
"next": "Nächste",
Expand Down
6 changes: 0 additions & 6 deletions src/locales/en.json → locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@
"modalWarning": "These required properties are missing from Modal: {missingProps}"
},

"Page": {
"Header": {
"iconWarningMessage": "The icon prop has been removed from Page. Upload an application icon in the Shopify Partners Dashboard 'App setup' section instead."
}
},

"Pagination": {
"previous": "Previous",
"next": "Next",
Expand Down