All notable changes to this project will be documented in this file.
The format is based on these versioning and changelog guidelines.
- Truncated long sort options in
ResourceList
(#2957 - Updated type restrictions for
Pagination
to allow itslabel
prop to acceptReact.ReactNode
instead ofstring
(#2972) - Added an
emptySearchState
prop toResourceList
to enable the customization of the empty search state (#2971)
- Added an outline on
Banner
for Windows high contrast mode (#2878) - Fixed Autocomplete / ComboBox focus (#1089)
- Fixed missing rounded corners on
Banner
(#2975) - Fixed typing for
EmptyState
action (#2977)
- Converted
ComboBox
to a functional component (#2918)
- Deprecated
styles/foundation.scss
andstyles/shared.scss
as entry points to the Polaris Sass public API. They have been replaced with a single filestyles/_public-api.scss
. By having a single entry point we make it a little easier for consuming applications to use our public API - you only need to import one file instead of two. Any references to these two files should be replaced with a reference to_public-api.scss
which lives in the same folder. Consuming applications using sewing-kit should replace references toesnext/styles/foundation.scss
andesnext/styles/shared.scss
with a single reference toesnext/styles/_public-api_.scss
. Note the API itself has not changed - only the mechanism by which you access it. (#2974)
- Added
additionalNavigation
prop toPage
(#2942)
- Fixed performance of
ResourceItem
due to inclusion ofchildren
in deep prop comparison withinshouldComponentUpdate
(#2936)
- Removed
max-height
property fromTooltip
(thanks to @thayannevls for the pull request) - Update
TopBar.Menu
to be properly themed in active, hover and focused state (#2928) - Added a centeredLayout prop to
EmptyState
(#2939)
- Fixed
Tag
submitting forms whenonClick
is set (#2895) - Fixed
DescriptionList
content overflowing whenterm
ordescription
have long unbroken words (#2880) - Fixed focusing bug on Filters where a newly opened filter would not initially focus the first input, and a newly opened filter would incorrectly focus after an input selection (#2871)
- Fixed automatic pull request generation for
web
andstyleguide
when updating Polaris (#2892) - Added an example to
Layout
that showcases how to space a banner (#2929)
- Updated
Filters
to only show the "More filters" button if necessary (#2856). - Updated
TopBar
component to showsecondaryMenu
on small screens (#2913) Badge
addscritical
status prop styling (#2902)
- Added
border-radius
to theMediaCard
container (#2919)
- Set
importsNotUsedAsValues
toerror
in TypeScript configuration to force us to be explicit when importing types (#2901)
- Added
MediaCard
andVideoThumbnail
(#2725) - Added
VideoThumbnail
(#2725)
- Added utilities for parsing video duration (https://polaris.shopify.com/components/images-and-icons/video-thumbnail) (#2725)
- Updated polaris-tokens to use new font stack (#2906)
TopBar
navigation icon to use thevar(--top-bar-color)
(#2898).
- Fixed two typos in the
Form
documentation (#2879)
- Don't use
export *
when exporting from type-only files as importing empty files causes webpack to produce unwanted boilerplate (#2897)
- Added
showFocusBorder
prop to theTopBar.SearchField
to allow users to add show a border on focus (#2886). - Added a theme prop for
frameOffset
(#2887) - Updated the font stack to put
Segoe UI
beforeRoboto
(#2891)
- Fixed right padding styling issue with the
Tag
component and remove right padding on a removableTag
(#2860). - Fixed secondary navigation spacing when no icon is present (#2874).
- Updated sewing-kit to v0.120.0, and typescript to 3.8.3 (#2873)
- Use
downlevel-dts
to produce compatible type definitions for consuming apps using older TypeScript versions (#2875)
- Made no noteworthy changes
- Fixed issue with passed to
ComboBox
component options prop was mutated (#2818) - Fixed an issue which caused
Popover
to close when clicking on a descendant SVG (#2827)
- Removed redundant null check in
TextField
(#2783)
- Updated shrink-ray to v2 (#2800)
- Reverted const context type to support older versions of typescript in consuming apps (e7c5e16)
- Fixed broken link in
ThemeProvider
docs (0ff672d)
- Added high contrast outline to
Popover
,Card
andIndicator
(#2792) - Removed
overflow: hidden
fromCard
(#2806) - Truncated long sort options in
ResourceList
(#2809
- Fixed incorrect used while importing from
polaris-tokens
(#2778) - Fixed
DropZone
not supporting new file selection whenallowMultiple
isfalse
(#2737) - Fixed
Pagination
sizing on small screens with tooltips (2747) - Fixed
Popover
setting atabindex
and other accessibility attributes on the activator wrapper when theactivator
is disabled (#2473) - Added a
verticalAlignment
prop toResourceItem
to support control of content alignment (#2743
- Added
check:custom-property
job in travis (#2778) - Exported missing OptionListProps (#2777)
- Omitted the Storybook
AppProvider
decorator for component examples which already contain anAppProvider
(#2807) - Added an
omitAppProvider
front matter concept to prevent automatic wrapping of component examples with anAppProvider
(#2815)
- Removed various type assertions and bumped test coverage (#2638)
- Added high contrast outline to
ActionList
(#2713) - Added high contrast border to
Button
(#2712) - Added styled placeholder image to
Avatar
when initials are blank (#2693) - Added a
preferInputActivator
prop toPopover
to allow better positioning of the overlay (#2754)
- Updated Polaris Tokens, which now builds modern tokens using TypeScript, fixing issues where Edge threw errors related to modern JavaScript features (#2763)
- Fixed
TrapFocus
stealing focus from otherTrapFocus
's (#2681) - Fixed focus state color on monochrome
Buttons
(#2684) - Fixed container's width on
Modal
(#2692) - Fixed the position property for the backdrop on
Select
from being overwritten by the focus ring (#2748) - Fixed
ResourceItem
Actions
visibility on mouse out (#2742) - Fixed initial server / client render mismatch in
Avatar
(#2751)
- Added first implementation of custom property validation (#2616)
- Refactored consumer build test (renamed to system integration test) (#2735)
- Added Storybook Knobs for customizing theme (#2674)
- Updated dependencies in example apps (#2722)
- Fixed
Tabs
tests that were preventingReact
updates (#2702) - Moved to Travis for CI (#2652)
- Fixed a Sass build error (#2453)
- Replaced customer avatar images (#2453)
- Added an optional
totalsName
prop toDataTable
to support custom headings in the totals row (#2660) - Added
cursor: pointer
toChoice
(#2491)
- Fixed
Uncaught TypeError: Cannot read property 'rightEdge' of undefined
inDataTable
(#2672) - Fixed excessive rendering in
DatePicker
(#2671) - Fixed plurality of
DataTable
totals row heading (#2660)
- Changed placeholder product names in
Card
code examples (#2677)
- Added a split variant to
Button
(#2329) - Allow DataTable headers to be React Elements (#2635)
- Added support for explicit order of items in
ActionMenu
(2057) - Made the
DataTable
horizontalNavigation
optional (#2647)
- Fixed
ReferenceError: React is not defined
inButton
for theesnext
build (#2657) - Fixed scrolling with scrollbar not working in Popover when content changes on scroll (#2627)
- Fixed side-effects from being create during
Modal
s render (#2644) - Work around a build crash when using create-react-app due to a bug in css parsing in
postcss-custom-properties
(#2643) - Removed the
visited
CSS styling for tabs using theurl
prop (#2639)
- Reworked the yarn splash Github comment and added average splash zone information (#2649)
- Re-enabled the web unit tests in the consumer build test (#2663)
- Converted
/tests/build.test.js
to TypeScript (#2617) - Use
export *
to rexport component content in component indexs and subcomponent listings (#2625) - Use
export *
to rexport utility content (#2636)
- Remove unstable telemetry API for icons (#2561)
- Added
hideTags
prop toFilters
(#2573) - Added
searchResultsOverlayVisible
prop toTopBar
which adds a translucent background to the search dismissal overlay when results are displayed (#2440)
-
Fixed a bug where
Navigation
callsonNavigationDismiss
on large screens when focused and the escape key is pressed (#2607) -
Fixed issue with
Filters
component displaying an undesired margin top and bottom on the button element on Safari (#2292) -
Fixed
RangeSlider
focus state style issues (#1926) -
Ensure passing
{key: undefined}
into i18n will throw a runtime error in the same way as not passing in the key at all (this was ensured through type-checking at the TypeScript level but people could force through with casting toany
) (#2598) -
Ensure the normalizedValue within
TextField
is a string (this was already ensured through type-checking at the TypeScript level, but people could force through with casting toany
, which caused problems) (#2598) -
Fixed an issue with the
Filters
component where thearia-expanded
attribute wasundefined
on mount (#2589) -
Fixed
TrapFocus
from tabbing out of the container (#2555) -
Fixed
PositionedOverlay
not correctly getting its position when aligned to the right of the activator (#2587) -
Search dismissal overlay now covers the entire screen (#2440)
-
Search results component will no longer unmount when hidden (#2440)
-
Search results will now match the width of the search field (#2440)
- Updated
Card
with custom footer actions example to be right-aligned (#2603) - Updated styleguide links in the docs (#2521)
- Updated
Subheading
documentation to be more consistent and accurate (#2591)
- Updated Storybook to v5.3.2 (#2618)
- Updated
@shopify/polaris-icons
to v3.9.0 (#2610)
- Converted
MenuGroup
into a functional component (#2536) - Converted
Layout
into a functional component (#2538) - Converted
FormLayout
into a functional component (#2539) - Converted
Stack
into a functional component (#2534) - Converted
BulkActionButton
into a functional component (#2542) - Converted
Focus
into a functional component (#2540) - Converted
Tabmeasurer
into a functional component (#2535) - Converted
Section
into a functional component (#2537) - Converted
Tooltip
into a functional component (#2543) - Converted
Option
into a functional component (#2541) - Avoided unneeded work in
TextField
if character count is not rendered (#2598)
- Fixed errors when consuming apps manage to pass
undefined
as a value into an translation replacements object (#2579)
- Fixed type-error in
TrapFocus
that causedquerySelector
to run on null (#2574)
- Refactored I18n class (#2562)
- Fixed
TextField
to no longer renderaria-invalid="false"
. Thank you to @alexcleduc for the contribution (#2339). - Fixed
TextField
to only rendermin
,max
andstep
attributes when explicitly passed. Thank you to @alexcleduc for the contribution (#2339). - Removed reference to
document
inDropZone
(#2560) - Fixed Firefox issue in in
DropZone
(#2568) - Fixed layout issue
DropZone
(#2568)
- Removed reference to
window
inDropZone
(#2532) - Fixed a regression in
TrapFocus
that prevented focus outside of aniframe
(#2530)
- Changed a link to the Polaris icons documentation so it would point to npm (a public resource) rather than the
Shopify/polaris-icons
repository (which is now private) (#2452)
- Added
external
prop toResourceList
(#2408) - Added
onMouseEnter
andonTouchStart
props toButton
(#2409) - Added
ariaHaspopup
prop toPopover
(#2248) - Moved
Button
styles from theButtongroup
CSS file to theButton
CSS file (#2441) - Added
footerActionAlignment
prop to control<Card>
footer action alignment, defaults to'right'
(#2407) - Improved contrast of
MessageIndicator
with a border (#2428) - Removed the need for z-indexes in
Icon
(#2207) - Added
features
prop toAppProvider
(#2204) - Added support for using
EmptyState
in a content context (#1570) Page
no longer renders navigation or actions in print mode (#2469)- Migrated
Dropzone
to a functional component and reduced its complexity (#2360) - Added
fluidContent
prop toPopover
(#2494)
- Prevented scrolling to
Popover
content in development (#2403) - Fixed an issue which caused HSL colors to not display in Edge (#2418)
- Fixed an issue where the
DropZone
component jumped from an extra-large layout to a layout based on the width of its container (#2412) - Fixed an issue which caused HSL colors to not display in Edge (#2418)
- Changed
Button
’sdisclosure
prop to beboolean | "up" | "down"
, allowing greater control over the direction the disclosure caret faces (#2431) - Added the top bar height to the
Topbar
inFrame
to ensure theSticky
components get the correct top position (#2415) - Stopped the
merge
utility function from mutating the objects passed as arguments (#2317) - Updated
Card
footer actions to be right aligned by default again (#2407) - Fixed the
EmptyState
styles conditional on theimageContained
prop not being applied (#2477) - Fixed
TrapFocus
to keep focus within the container when tabbing past the last element (#2397) - Fixed an accessibility issue where the
Form
implicit submit was still accessible via keyboard (#2447)
- Added a details page and kitchen sink example to Storybook (#2402)
- Combined the interface used by
Page
so the types can be parsed (#2358) - Updated the
PageActions
example (#2471) - Fixed spacing of the
Filters
data table example (#2477) - Fixed duplicate and unclear prop descriptions of
EmptyState
(#2477) - Added an example for a light
Tooltip
(#2434)
- Updated splash Github Action to the latest Docker beta version (#2474)
- Updated local splash script to use npm package @shopify/splash (#2474)
- Added
dev test:coverage
as an alias foryarn test:coverage
(#2496) - Added
dev open coverage
andyarn open:coverage
commands to open the coverage report (#2496) - Fixed
yarn test:coverage
so it generates a coverage report (#2496) - Updated
yarn test:coverage
so it automatically opens the coverage report when complete (#2496)
- Changed
TextField
to use a custom hook (#2464) - Changed
aria-labelledby
to always exist onTextField
(#2401) - Converted
ButtonGroup > Item
into a functional component (#2441) - Refactored
BulkActions
to make use ofButtonGroup
(#2441)
- Updated
Popover
to focus the correct element when closed (#2255) - Updated the type of the
title
prop inChoiceList
fromstring
toReactNode
(#2355) - Added
disabled
prop toFilters
component (#2389) - Added
helpText
prop toFilters
component (#2389)
- Fixed an issue where types were not generated for a JSON config file (#2361)
- Enabled maintainers running
yarn dev
to hideyarn splash
reports from the console by runningDISABLE_SPLASH=1 yarn dev
(#2372) - Updated to sewing-kit 0.112.0 and eslint 6 and updated vscode config to use the eslint plugin to format js/ts files (#2369)
- Migrated
Popover
to use hooks (#2386)
- Added unstable telemetry API to gather analytics about icon usage (#2368)
- Fixed an accessibility issue with
TextField
multiline
wherearia-multiline
would be set to an invalid typenumber
(#2351) - Revert #2231 as it breaks middle aligned popovers (#2237)
- Fixed alignement of disclosure icons on
ResourceItem
(#2370)
- Fixed a bug with
TextField
which caused infinite layout and high CPU load in Safari, related to WebKit Bug 194332 (#2379) - Fixed an accessibility issue with
TextField
multiline
wherearia-multiline
would be set to an invalid typenumber
(#2351) - Fixed alignment of disclosure icons on
ResourceItem
(#2370)
- Updated the
AppProvider
section in the Polaris v3 to v4 migration guide (#2312) - Updated the
Using translations
section in the AppProvider README (#2312)
- Removed the need to upload assets with each release (#2346)
- Migrated
FilterValueSelector
to use hooks instead of withAppProvider (#2156) - Added
useIsMountedRef
hook to use while building components (#2167)
- Fixed a bug with
Button
which caused infinite layout and high CPU load in Safari, related to WebKit Bug 194332 (#2350)
- Updated
OptionList
section title to matchActionList
section title (#2300) - Added
pressed
state toButton
(#2148) - Updated the type of the
label
prop inChoiceList
(nested prop ofchoices
) fromstring
toReactNode
(#2325).
- Fixed
actionGroups
to only renderMenuActions
when actions are provided in thePage
(#2266) - Fixed
PositionedOverlay
incorrectly calculatingTopbar.UserMenu
Popover
width (#2231) - Fixed
recolor-icon
Sass mixin to properly scope$secondary-color
to the childsvg
(#2298) - Fixed an issue with the
ResourceList
component where the plural resource name was not used fortotalItemsCount
(#2301) - Fixed Stack Item proportion when shrinking (#2319)
- Fixed animation of
Collapsible
with children having margins (#1980) - Added vertical adjustment to
OptionList
control items (#2313)
- Updated sewing-kit to v0.111.0 and storybook to v5.2.4 (#2326)
- Added CSS custom properties to
Portal
container (#2306)
- Fixed a regression with the positioning of the
Popover
component (#2305)
- Added a
totalItemsCount
prop to theResourceList
component (#2233) - Prevented the
Header
primary action label on thePage
component from wrapping when the title is too long (#2262)
- Fixed an issue with the
Stack
component where aStack.Item
was not getting a minimum width (#2273) - Fixed an issue with
Filters
applying inconsistent border styles to sibling filters when there is only one filter in the filter list (#2284) - Added
aria-disabled
to theSelect
component’s content when it is disabled (#2281)
- Added accessibility documentation for the
DropZone
component (#2243) - Improved accessibility documentation for the
Spinner
component (#2258)
- Added support for context customization in Storybook using addon-contexts (#2281)
- Migrated
DateSelector
to use hooks instead of withAppProvider (#2193) - Migrated
Toast
to use hooks (#2222) - Removed
link
,theme
andscrollLockManager
from the object returned bywithAppProvider
as nothing consumes them any more (#2277)
- Added
showTotalsInFooter
prop toDataTable
for control over placement of “Totals” row (#2200) - Removed the need for z-indexes in
Icon
(#2207) - Added
hasFocusableParent
toSpinner
(#2176)
- Fixed tabs that don’t wrap correctly on small screens in pre-iOS 13 Safari (#2232)
- Fixed
BulkActions
checkbox losing selection on focus (#2138) - Moved rendering of the portal component’s node within the node created by the theme provider component to enable theming through CSS Custom Properties (#2224)
- Fixed a bug which caused the
Popover
overlay to remain in the DOM if it was updated during exiting (#2246) - Fixed
Breadcrumbs
to useaccessibilityLabel
prop when passed in (#2254)
- Added accessibility documentation for the date picker component (#2242)
- Added accessibility documentation for the empty state component (#2244)
-
Improved code quality for the theme provider component (#2225):
- updated type for
theme
prop toThemeConfig
to distinguish from the typeTheme
which is shared over context. ATheme
contains only the logo properties, whileThemeConfig
can contain acolors
property. - converted
ThemeProvider
to use hooks - created symmetry in context between app provider and test provider
- added better tests for default topBar colors
- fixed an issue where
colorToHsla
returned HSLA strings instead of HSLA objects when given HSL or HSLA strings - fixed an issue with
colorToHsla
where RGB colors with no saturation could result in a divide by zero error - fixed an issue where
colorToHsla
inconsistently returned an alpha value - fixed an issue where
lightenColor
anddarkenColor
would lighten or darken absolute lightness values (0, 100)
- updated type for
- Fixed loss of focus on
TextField
when changing connectedRight/connectedLeft content while user is typing (#2170) - Fixed
type
for clearButton (#2060) - Prevented the
onSelect
prop ofTabs
from changing scroll position (#2196) - Fixed 200ms visual delay when activating
Popover
(#2209) - Removed the
ResourceList
Item
hover state whenItem
is deselected (#1952) - Fixed
Subheading
’sfont-weight
(#2218) - Fixed
fullWidth
CardSection
s when contained in a page with aNav
(#2227)
- Converted
SettingToggle
,Sheet
, andTabs
examples to functional components (#2134) - Converted
Form
,Frame
, andLoading
examples to functional components (#2130) - Replaced Latin abbreviations with English words in Text field content guidelines (#2192)
- Converted
SettingToggle
,Sheet
, andTabs
examples to functional components (#2134) - Converted
DatePicker
,DropZone
, andFilters
examples to functional components (#2129)
- Added
MediaQueryProvider
to ease the use of media queries and reduce duplication (#2117) - Migrated
Tab
to use hooks instead ofwithAppProvider
(#2123)
- Added a GitHub action, discoverability-action, that runs
yarn splash
on PR diffs and leaves a comment with the output (#2208)
- Added new label prop to
Pagination
which is used to insert contextual info between navigation buttons (#2098) - Updated
trigger
to useact
(#2141) - Changed border color of
Drop zone
to have better contrast from the background and to be lighter when disabled (#2119) - Adjusted search results overlay to take up 100% height of the screen on small screens and to match the width of the search bar on large screens. (#2103)
- Added skipToContentTarget prop to Frame component (#2080)
- Updated
Card
footer actions to be left aligned instead of right by default (#2075) - Fixed vertical alignment of Tabs disclosure activator (#2087)
- Fixed
Modal
setting an invalidid
onaria-labelledby
when notitle
is set (#2115) - Fixed error warnings in
Card
andRollupActions
tests (#2125) - Fixed modal border not being visible in Windows high contrast mode (#2114)
- Added default accessibility label from
ResourceItem
(#2097) - Reverted
Page.primaryAction
forcingprimary
to betrue
(#2137) - Removed
React.Children.only
fromAppProvider
andThemeProvider
(#2121) - Fixed visual bug where button width changed in Filters component. Thank you to @alexieyizhe for the contribution (#2003).
- Changed
text-rendering
toauto
inSelect
to prevent Safari 13 from crashing (#2179)
- Converted
Autocomplete
,Banner
, andChoiceList
examples to functional components (#2127) - Converted
Collapsible
,ColorPicker
, andDataTable
examples to functional components (#2128) - Converted
Modal
,OptionList
, andPopover
examples to functional components (#2131) - Converted
RadioButton
,RangeSlider
, andResourceItem
examples to functional components (#2132) - Converted
ResourceList
,ResourcePicker
, andSelect
examples to functional components (#2133) - Converted
TextField
,Toast
, andTopBar
examples to functional components (#2135) - Updated the
withContext
section in the v3 to v4 migration guide (#2124) - Clarified when to use the
external
prop on theLink
component (#2153) - Updated documentation examples to include disclosure on
Popover
activators (#2171)
- Added
yarn splash
(beta), a command-line interface to observe the splash zone of a change across the component library (#2113) - Updated Storybook – v5.2 release notes (#2157)
- Added
useLazyRef
hook to use while building components (#2166) - Migrated
FilterCreator
to use hooks instead of withAppProvider (#2156) - Created a custom error for lack of context providers (#2136)
- Migrated
ContextualSaveBar
to use hooks instead ofwithAppProvider
. Thank you to @sijad for the contribution (#2091). - Migrated
RangeSlider
,ScrollLock
andTopBar.SearchField
to use hooks instead of withAppProvider (#2083) - Updated
ResourceItem
to no longer rely on withAppProvider (#2094) - Migrated
TextField
andResizer
to use hooks (#1997) - Migrated
Avatar
to use hooks instead of withAppProvider (#2067) - Updated
Day
andDatePicker
to use hooks (#2089)
- Fixed TypeScript not generating correct types for functional components that have subcomponents (#2111)
- Added support for min/max dates in
TextField
by setting a string onmin
andmax
props (#1991) - Made the
title
prop onPage
optional, supporting continued use ofPage
for structure in apps using the App Bridge ReactTitleBar
(#2082)
- Fixed inconsistent padding of sections in
Modal
(#2072) - Fixed animation for Modal when being rendered asynchronously (#2076)
- Fixed item content from overflowing past the container in
Stack
(#2071) - Fixed
Dropzone
hover, disabled, and focus states (#1994) - Added
name
prop toResourceItem
to fix accessibility labels (#2077) - Fixed misalignment of
ResourceItem
actions (#2051)
- Added Android/iOS images for Plain destructive button (#2081)
- Removed mobile mention from right-aligned text component guidelines (#2081)
- Added mobile example images error state of Single Choice List (#2007)
- Updated Prettier to v1.18.2 (#2070)
- Added a displayName to the function generated by the
withAppProvider
HoC for a better devtools experience (#2093)
- Migrated
ActionMenu.RollupAction
,Autocomplete
,Card
,EmptySearchResult
,Form
,SkeletonPage
andTopBar
to use hooks instead of withAppProvider (#2065) - Added
useUniqueId
hook that can be used to get a unique id that remains consistent between rerenders and updated components to use it where appropriate (#2079)
- Moved
ResourceItem
to its own component (#1774) - Updated
ResourceList
sort to show an inline label (#1774) - Removed the
tap-highlight-color
forButtons
(#1545)
- Removed
Tooltip
on disabledPagination
buttons (#1963) - Fixed accessibility labels on
ResourceList.Item
persistent action disclosure icon (#1973) - Fixed accessibility issue with
Autocomplete
where keyboard navigation of options was laggy and skipped options (#1887) - Fixed bug where
Autocomplete
was bubbling up theEnter
key event unexpectedly (#1887) - Fixed
ContextualSaveBar
actions overflowing on small screens (#1967) - Fixed
Tabs
rollup automatically opening from keyboard navigation of tab list (#1933)
- Updated example section to include new examples and remove old ones (#1979)
- Updated example for the
ResourceList.Item
persistent actions accessibility labels (#1973) - Removed
FilterControl
documentation and case studies fromResourceList
documentation (#1774) - Updated
ResourceList
examples to useFilters
(#1774) - Added an example to
Filters
showing the use ofchildren
(#1774) - Added guidance for making animated gifs in PRs and issues more accessibility-friendly (#1998)
- Added
RadioButton
guidance to make one option selected by default (#2005)
- Update subcomponents to use named exports for components and better names props exports (#2058)
- Removed mocks in various tests suites that are now redundant (#1978)
- Deprecated
FilterControl
. UseFilters
instead (#1774)
For instructions on updating from v3 to v4, see our migration guide.
- Removed
groups
prop onSelect
. Pass groups to theoptions
prop instead. (#1831) - Removed
Autocomplete.ComboBox.TextField
andAutocomplete.ComboBox.OptionList
. You should use theAutocomplete.TextField
andOptionList
components instead. (#1830) - Removed
secondaryFooterAction
prop onCard
. Pass an array of secondary actions to thesecondaryFooterActions
prop instead. (#1831) - Removed
iconBody
prop onNavigation.Item
. Pass a string to theicon
prop instead. (#1831) - Removed the
WithContext
component, as it was an undocumented part of the public API meant for internal use only (#1641) - Removed the
WithRef
component, as it was an undocumented part of the public API meant for internal use only (#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) - 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) - Removed support for passing a React Element into
<Icon source>
. You must pass in a React Component that returns an SVG element instead. (#1604) - Removed support for
<Icon untrusted>
. Passing a string intosource
will now always load an untrusted icon, you don’t need that additional property. (#1604). - Removed
Navigation.UserMenu
. UseTopBar.UserMenu
instead. (#1599) - Made
title
a required prop onChoiceList
to improve accessibility. It can be hidden withtitleHidden
. (#1575) - Made
i18n
a required prop onAppProvider
. Usage instructions are included in theAppProvider
docs. (#1530) - Upgraded
react
andreact-dom
peer-dependencies to 16.8.6 to enable the use of hooks (#1525) - Changed the import method for React to use default imports. Applications consuming Polaris using TypeScript must enable
esModuleInterop
intsconfig.json
. (#1523) - Removed
LinkLikeComponent
type export. UseAppProviderProps['linkComponent']
instead. (#1864) - Removed the
Modal.Dialog
andTabs.Panel
subcomponents as they were undocumented parts of our public API meant for internal use only (#1899).
- Added a new
create-react-app
example in TypeScript demonstrating use of Polaris withreact-testing
(#1937) - Exported
AppliedFilterInterface
andFilterInterface
fromFilters
(#1924) - Improved color contrast of links inside
Banner
(#1651) - Add underline to Links and Plain button on hover, so it doesn’t rely on color alone for accessibility (#1885)
- Add
onQueryFocus
callback prop to theFilters
component (#1948)
- Fixed types merge of
ActionMenu
MenuAction
andMenuGroup.actions
(#1895) - Fixed the activator buttons of
Page
actionGroups
not toggling thePopover
active
state on click #1905 - Fixed Windows high contrast support of
Badge
progress
(#1928) - Fixed
BulkActionButton
from throwing an error incomponentDidMount
(#1913) - Fixed
ToastManager
from not working correctly inReact.StrictMode
(#1741) - Updated translation.yml with the new locales path (#1649)
- Fixed accessibility issue with
Tabs
list item presentation role (#1958) - Fixed cross-origin error being thrown in
Modal
when loading an external app (#1992) - Fixed regression in
PopoverOverlay
causingonClose
to be fired when Popover is opening and trigger was not the activator (#2000) - Fixed issue with
ContextualSaveBar
blocking search when hidden (#2044)
- Updated
AppProvider
app bridge example to use ourAppBridgeContext
(#1877)
- Added support for React hooks in Storybook (#1665)
- Created
toBeDisabled
,mountWithContext
and added custom testing matchers (#1596) - Added
PolarisTestProvider
helper to ease configuration of required Polaris contexts in tests, see polaris examples for usage (#1810) - Enabled strict mode in TypeScript (#1883)
- Moved to
unpkg.com
for our CDN CSS assets, instead of usingsdks.shopifycdn.com
. Existing URLs will continue to work but new versions will only be available atunpkg.com
. (#1960) - Added ChromaUI integration for previewing Storybook builds, to potentially replace our self-hosted Heroku instance (#1975)
- Updated
@shopify/polaris
in all examples to 4.0.0-rc.2 (#1937) - Added
@material-ui/react-transition-group
and removedreact-transition-group
to supportReact.StrictMode
(#1759) - Added
@shopify/react-testing
(#1596) - Removed
@shopify/css-utilities
(#1586) - Removed
@types/prop-types
andprop-types
(#1505) - Updated
react
to 16.8.6 andenzyme
to 3.9.1 (#1392)
- Bumped test coverage in
Collapsible
(#1929) - Bumped test coverage in
DropZone
,Frame
,Icon
, andLoading
(#1927) - Removed unused type definitions (#1862)
- Ignored deprecation warnings related to Shopify App Bridge in tests (#1852)
- Updated
withAppProvider
to use a functional component rather than a class component (#1813) - Updated
Link
to useuseI18n
rather thanwithAppProvider
(#1806) - Updated several components to use hooks instead of
withAppProvider
(#1797) - Removed
CSSTransition
fromPopoverOverlay
(#1756) - Updated exports in
src/utilities
andsrc/test-utilities
to named exports (#1717) - Removed test errors and non-deprecation warnings (#1715)
- Enabled
React.StrictMode
in test components and Storybook (#1709) - Removed all uses of
ReactDOM.findDOMNode
(#1696) - Enabled
react/no-unsafe
ESLint rule withcheckAliases
(#1695) - Alphabetized component export order and kebab-case files (#1674)
- Updated
Collapsible
to no longer usecomponentWillReceiveProps
(#1670) - Restructured context structure to be more modular (#1664)
- Updated
PositionedOverlay
to no longer usecomponentWillReceiveProps
(#1621) - Simplified
WithinContentContainer
context type (#1602) - Updated
OptionList
to no longer usecomponentWillReceiveProps
(#1557) - Refactored
RangeSlider
DualThumb
tests (#1548) - Converted
Sheet
to a functional component (#1548) - Removed
withContext
fromResourceList.Item
(#1503) - Removed
withContext
fromNavigation.Item
(#1502) - Removed
withRef
fromUnstyledLink
(#1501) - Removed
withContext
fromResourceList.FilterControl
(#1500) - Removed
withContext
fromScrollable.ScrollTo
and added a test to boost coverage (#1499) - Removed
withContext
fromLoading
(#1497) - Removed
withContext
andwithAppProvider
fromContextualSaveBar
(#1498) - Removed
withContext
fromToast
(#1494) - Removed
withRef
andwithContext
fromDropZone.FileUpload
(#1491) - Created
useAppBridge
hook (#1482) - Removed testID warning in tests (#1447)
- Updated
AppProvider
to use the new context API and refactored other instances to follow a new pattern and refactor test utilities (#1424) - Updated all context files to export react context rather than a provider and consumer (#1424)
- Deleted
withSticky
(#1424) - Upgraded the
Autocomplete
component from legacy context API to use createContext (#1403) - Upgraded the
Navigation
component from legacy context API to use createContext (#1402) - Updated
ThemeProvider
to use the new context API (#1396) - Updated
AppProvider
to no longer usecomponentWillReceiveProps
(#1255) - Removed unused context from
Scrollable
(#1253) - Updated
ThemeProvider
to no longer usecomponentWillReceiveProps
(#1254) - Removed context from
Collapsible
(#1114) - Refactored
Frame
and its subcomponents to use thecreateContext
API instead of legacy context (#803) - Upgraded the
Banner
,Card
, andModal
components from legacy context API to usecreateContext
(#786)
- Renamed
singleColumn
onPage
tonarrowWidth
(#1606)
- Added
onQueryFocus
callback prop to theFilters
component (#1948)
- Added a
subtitle
andthumbnail
prop toPage
(#1880)
- Fixed accessibility issue with ChoiceList errors not being correctly connected to the inputs (#1824)
- Fixed
Tab
aria-controls
pointing to a non-existentPanel
id
(#1869) - Fixed
Toast
accessibility issue by movingaria-live
prop toToastManager
(#1873)
- Use
@shopify/typescript-configs
as the base oftsconfig.json
for the project (#1829)
- Added a
verticalAlign
prop toDataTable
(#1790) - Improved focus and hover states for
Navigation
(#1822)
- Fixed the
SearchInput
clear button which was overflowing the search bar in Firefox 65+ (#1795) - Fixed a bug preventing the display of
Tooltip
when cursor enters from a disabled element (#1783) - Fixed React imports in the
Filters
component to useimport * as React
for projects that don’t useesModuleInterop
(#1820) - Fixed
tabIndex
onmain
element causing event delegation issues (#1821) - Fixed icon color for destructive ActionList items (#1836)
- Fixed not being able to explictly set
autoComplete
prop onAutocomplete.TextField
(#1839)
- Added links to App Bridge React component documentation in deprecation notices for embedded components (#1765)
- Improved link text for App Bridge deprecation notices #1802
- Use explicit imports for our base Sass mixins instead of having them implictly defined at build-time. This simplifes our build config and other tooling that wants to build us from source [#1680]
Filters
: Use to filter the items of a list or table (#1718)
- Added the rollover and Windows high contrast mode to
Disclosure
button onTabs
(#1755) - Added support for disabling all choices in
ChoiceList
(#1758) - Components in our Sass build (the
styles
folder) are now precompiled to avoid the chance of accidentally overwriting any of our global variables, mixins and functions (#1764) - Changed
Skip to content
to render an anchor instead of a button to meet accessiblity level A guidelines (#1785)
- Fixed a regression introduced in #1247, where icons inside of
Link
would always be recolored to match the text color (#1729) - Fixed the
DiscardConfirmationModal
not closing when the discard button is clicked (#1784) - Fixed
Navigation.Item
secondaryAction
wrapping when content wraps (#1678)
- Added links to App Bridge React component documentation in deprecation notices for embedded components (#1765)
- Renamed
yarn run ts
toyarn run type-check
to match most other Shopify projects (#1745) - Fixed deprecation notice in build (#1754)
- Simplified our rollup plugin for Sass compilation while retaining identical behaviour (#1753)
ActionMenu
: Use for display of actions and action groups within the context of a header (#1653)
- Added the
stopAnnouncements
prop toBanner
, which disables screen reader announcements when content changes (#1719) - Add
selectable
prop toResourceList
component (thanks to @vict-shevchenko for the pull request) - Allow
Link
andButton
interactions when rendered asprefix/suffix
within<TextField />
(#1394) - Improve
TextField
so that character count is only announced on focus. (#1720) ActionList
can now pass a uniqueaccessibilityLabel
to eachItem
(#1653)- Greatly reduced complexity of
Page > Header
(#1653) - Long
Page > Header
breadcrumb labels will now truncate instead of breaking layout (#1653) - Improves performance of
TabMeasure
component (#1544) - Added
secondaryFooterActions
prop toCard
which adds an action list of secondary actions to the footer #1625
- Fixes
monochrome
variant ofLink
andButton
components to support multi-line link text (#1686) - Fixed the first column of
DataTable
not rendering in iOS Safari (#1605) - Fixed paint loss on scroll of
TextField
Spinner
(#1740)
- Mentioned that the Contextual Save Bar is now available for embedded apps through App Bridge directly #1721
- Mentioned Polaris icons in the Icon component documentation (#1693)
- Added an example to
Card
for custom action layout with a secondary action and a plain button (thanks to @sharoonthomas for the pull request)
- Updated Storybook to
v5.1.9
(#1728)
- Updated
PositionedOverlay
to no longer usecomponentWillReceiveProps
(#1621)
Card
secondaryFooterAction
is now deprecated. Set an array of secondary actions on thesecondaryFooterActions
prop instead #1625
- Deprecated passing a string representing a "bundled icon" into
<Icon source>
Pass in an svg component imported from@shopify/polaris-icons
instead (#1534). - Deprecated all usage of the Shopify App Bridge in Polaris React (#1573)
- Made the
action
prop optional onEmptyState
(#1583) - Prevented Firefox from showing an extra dotted border on focused buttons (#1409)
- Added
resolveItemId
prop toResourceList
which is used in the new multiselect feature (#1261) - Added
actions
prop to<Card.Section>
to allow you to easily define header actions in a card section (#1598) - Added
<Card.Subsection>
to allow you to further subdivide<Card.Section>
in a consistent manner (#1611) - Removed transition on tag button hover state #1337
- Added
textAlign
prop to Button (#1576) - Made
Button
red when given both theplain
anddestructive
props (#1603) - Added support for disabled, destructive, and loading actions in
Card
andCard.Section
(#1622)
- Removed unnecessary border-radius from
Modal
body (#1584) - Fixed accessibility issues in
DropZone
,Form
,Modal
,Section
,Page
,Tabs
,TextField
andTopBar
(#1565,#1582). - Fixed inconsistent width depending on your browser/version in
Sheet
(#1569) - Fixed text and other elements from being selected in Safari when dragging the color picker (#1562)
- Fixed
Banner
title
overflowing when set to a single long word (#1553) - Remove export of
CombinedProps
and unneccessary export for Class based components (#1592) - Fixed improper spacing and coloring on a
TextField
prefix (#1132) - Fixed
ResourcePicker
not updating function references foronSelection
andonCancel
callbacks #1451 - Fixed
TextField
label
being set as the value of thelabel
node, as well as thearia-label
aria-labelledby
attributes, when only one method will suffice (#1615) - Fixed accessibility issues for Windows High Contrast mode on
Tabs
andPopover
(#1629)
- Updated icon documentation to use imports from polaris-icons (#1561)
- Fixed an accessibility issue in the
Collapsible
component example (#1591) - Added accessibility documentation for the
RangeSlider
component (#1630) - Added accessibility documentation for the
Collapsible
component (#1631) - Added accessibility documentation for the
DescriptionList
component (#1634) - Added accessibility documentation for the
Form
component (#1636) - Added accessibility documentation for the
ExceptionList
component (#1635) - Added accessibility documentation for the
KeyboardKey
component (#1640) - Added accessibility documentation for the
Tag
component (#1647) - Added accessibility documentation for the
Modal
component (#1648)
- Made the a11y test that runs in CI fail if it finds any issues (#1564)
- Updated Storybook to
v5.1.0-rc.4
(#1616) - Fixed a visual regression testing issue with the Card component (#1618)
- Updated to sewing-kit v0.85.5 (#1633)
- Upgraded TypeScript dependency to
3.5.1
(#1650)
- Enabled the color contrast test in pa11y (#1645)
- Combined jsdocs in
Icon
for theuntrusted
prop (#1607)
- Added support for dual values to
RangeSlider
component (#1436) - Updated type restrictions for
AnnotatedSection
to allow itstitle
prop to acceptReact.ReactNode
instead ofstring
(#1431)
- Fixed an issue where the JavaScript breakpoints incorrectly set the navigation bar collapsed breakpoint (#1475)
- Added a border to
Toast
messages to make them more visible in Windows high contrast mode (#1469) - Added
box-shadow
to theBanner
to make it more visible in Windows high contrast mode (#1481) - Added
box-shadow
to theCard
to make it more visible in Windows high contrast mode (#1524) - Fixed UI regressions in
Navigation
component hover and active states (#1551)
- Updated Storybook to
v5.1.0-alpha.39
, improving component searchability in the sidebar (#1488)
- Removed runtime dependency on
@shopify/images
as we never needed it at runtime (#1474) - Removed
@shopify/react-utilities
and replaced some of the functionality with@shopify/css-utilities
or by moving the utilities into Polaris itself (#1473)
This release fixes an issue introduced in v3.14.0
that caused the esnext
build not to succeed resulting in build errors for consumers (#1466)
- Enhanced
NavigationItem
’s color accessibility foractive
,focus
,hover
andSelected
states (1304) - Added
align
prop toTextField
(#1428) - Added
clearButton
prop toTextField
(#1226)
- Fixed
Checkbox
from improperly toggling when disabled (#1467) - Fixed
Popover
fade-in flutter on iOS by switching Transition component for CSSTransition (#1400) - Improved the visibility of focus styles for the
Link
component. (#1425)
- Updated accessibility testing documentation (#1449)
- Added guidelines for tertiary actions in modals to
Modal
component documentation (#1336)
- Updated the a11y shitlist and re-enabled the pa11y job in CI. The job always passes for now, as a way for us to judge whether it is stable and can be made a required check. (#1456)
- Simplified logic in Checkbox component (#1453)
- Added the
Sheet
component (#1250)
- Added translations for all supported locales (#1358)
- Improved the performance of
ResourceList
(#1313) - Added
withinContentContainer
context toNavigation
(#1393) - Added support for
Tooltip
content to wrap nonbreaking strings #1395
- Removed
window
call onserver
executed code #1427 - Fixed
onClick
from firing three times when using the enter key on aResourceList
item (#1188) - Resolved console
[Intervention]
errors for touch interactions onColorPicker
(#1414) - Fixed page scrolling while interacting with the color slider (#1414)
- Applied
font-family
tobutton
elements which were being overridden by User Agent Stylesheet (#1397) - Fixed
Checkbox
being toggled when disabled (#1369) - Fixed
DropZone.FileUpload
from incorrectly displaying action hint and title when the default is used and removed (#1233) - Fixed
ResourceList.Item
interaction states from being incorrectly applied (#1312 - Fixed selected state for date picker in Windows high contrast mode (#1342)
- Fixed accessibility of skeleton components for Windows high contrast mode (#1341)
- Fixed
Loading
visibility in Windows high contrast mode (#1389) - Fixed the position calculation of the
PositionedOverlay
component after scroll (#1382) - Fixed styling issue for
Pagination
when used withTooltip
(#1277) - Fixed certain children of a
TextContainer
having no top margin (#1357) - Added border to
Tooltip
in Windows high contrast mode (#1405) - Fixed
Navigation.Section
rollup collapsing whenNavigation.Item
subNavigationItems
expand (#1417)
- Updated
Link
accessibility documentation for theexternal
prop to reflect new behavior (#1347) - Added accessibility documentation for
VisuallyHidden
(#1348) - Added accessibility documentation for
TextStyle
(#1350) - Added accessibility guidance for
Heading
andSubheading
(#1351) - Added accessibility documentation for
List
andStack
(#1353) - Added accessibility guidance for
DisplayText
(#1354) - Added guidance for updating component documentation and tophatting style guide changes (#1362)
- Added accessibility documentation and guidance for
ActionList
andOptionList
(#1365) - Added accessibility documentation for
Card
andCalloutCard
(#1366) - Added accessibility documentation for
Badge
(#1364) - Added accessibility documentation for
Icon
(#1404) - Added accessibility documentation for
Popover
(#1408) - Fixed content example for
ContextualSaveBar
guidelines (#1423)
- Updated most
devDependencies
(#1327) - Bumped
@shopify/react-utilites
to remove a transitive dependency oncore-js
(#1343) - Updated App Bridge to version 1.3.0 (#1349)
- Updated
typescript
to 3.2.4 (#1388) - Updated
sewing-kit
to 0.83.1 and babel-preset-shopify to ^18.1.0 (#1344)
- Updated
Dropzone.FileUpload
to no longer usecomponentWillReceiveProps
andcomponentWillMount
(#1233) - Removed a
window.open
implementation error inResourceList.Item
(#1294)
- Deprecated Navigation
Item
’siconBody
prop. Pass a string into theicon
prop instead. (#1299)
- Added an
onChange
handler toCheckableButton
(#1326) Labelled
now wraps its content, no longer causing alabel + action
to get unreasonably squished (#1309)- Updated
polaris-tokens
from2.3.0
to2.5.0
and converted all use ofduration
values (#1268) - More consistent use of
text-breakword
mixin (#1306) - Added an icon and screen reader hint when
Link
opens a new tab (#1247) - Updated the pull request creation to create multiple pull requests and update
polaris-react
across multiple repos (#1069) - Updated the pull request creation to retry when it fails (#1069)
- Exported overlay and layer data attributes for use in consumer components (#1266)
- Added new
frame-with-nav-max-width
variable and matchingframe-with-nav-when-not-max-width
mixin (#1311) - Updated
Resizer
to schedulehandleHeightCheck
to run in next animation frame (#1301)
- Fixed
ResourceList
actions from show at incorrect breakpoints or while in select mode (#1333) - Fixed Search overlay stretching below the viewport (#1260)
- Added
onChange
andvalue
to selectAppProvider
examples to remove console errors (#1320) - Fixed promoted bulk actions in
ResourceList
not properly disabling (#1317) (thanks @jineshshah36 for the issue report) - Fixed
ResourceList
header from displaying whenEmptySearchResult
exists (#1286) - Stopped passing the
polaris
context into the div rendered byScrollable
(#1271) - Fixed clickable area on sortable column headers on
DataTable
(#1273)
Upgraded Storybook to v5 (#1140)
- Migrated the refs in
DropZone
to use the new createRef API (#1063) - Updated
ResourceList
to no longer usecomponentWillReceiveProps
(#1235) - Updated
Tabs
to no longer usecomponentWillReceiveProps
(#1221) - Removed an unneeded media query from Modal’s
Header
component (#1272) - Replaced all instances where we pass a string representing a bundled icon into
Button
. Prefer passing in the React Component from@shopify/polaris-icons
(#1297)
- Added a public
focus
method onBanner
(#1219) - Added an
onScrollToBottom
prop toPopover.Pane
(#1248) - Added a
placeholder
prop toFilterControl
(#1257) - Added support for setting string values on the
TextField
autoComplete
prop (#1259)
- Fixed disabled states while loading for
ResourceList
(#1237) - Fixed
Checkbox
from losing focus and not receiving some modified events(#1112) - Added translation for the cancel button on the
ResourceList
BulkActions
(#1243) - Fixed the
Autocomplete
onLoadMoreResults
prop not being called on scrolling to the end of the option list (#1249)
- Removed
button group joined to the bottom of a component
example (#1267)
- Updated
Navigation
badge prop to accept a react node (#1142) - Changed max width on
Search
to 694px so that it is perfectly centered in the top bar (#1107) - Added
action
prop toToast
(#919) - Remove all usage of
@shopify/javascript-utilities/decorators
, namelyautobind
,debounce
, andmemoize
(#1148) - Added
Empty State
footerContent prop (#1200) - Added viewport condition to
TopBar
to enlarge thecontextControl
wrapper on wider screens (#1231)
- Fixed selectMode on
ResourceList
not toggling when items are selected programmatically (#1224) - Fixed unnecessary height on
TextField
due to unhandled carriage returns (#901) - Ensured server side rendering matches client side rendering for embedded app components (#976)
- Fixed rendering of the spinner on
TextField
when setting to readOnly (#1118) - Fixed webpack example that does not compile (#1189)
- Added accessibility documentation for
Checkbox
,RadioButton
, andChoiceList
(#1145)
- Regenerated the yarn.lock file in the browserify example to resolve security vulnerabilities (#1202)
- Updated browserify example dependencies and dev dependencies (#1191)
- Updated webpack example dependencies and dev dependencies (#1189)
- Replaced all occurrences of
_.merge
with a custommerge
function (#1018) - Replaced all occurrences of
_.pick
with a custom pick function (#1020) - Deleted the icons index file that would re-export icons, and replaced it with direct imports (#1195)
- Replaces all instances where we pass a string representing a bundled icon into
Icon
. Prefer passing in the React Component from@shopify/polaris-icons
(#1196)
- Added Polaris version information tracking in App Bridge actions (#1087)
- Re-added the navigation’s border-right (#1096)
- Added
onScrolledToBottom
prop toModal
(#1117) - Updated
Navigation.Item
to useIcon
wheniconBody
prop is passed in. Renders these icons in animg
tag now. (#1094) - Added focus state outlines to be visible when using Windows High Contrast Mode for
Button
(#1101)
- Reverted a change that constrained
DropZone
height based on inherited wrapper height #1129 - Fixed missing rounded corners on
Tag
button states (#1078) - Removed reference to
window.Polaris
, which in some cases could be undefined (#1104) - Added padding and margin to
subdued
sections for proper spacing between the header and footer (#1082) - Removed left margin from vertical
Stack
to prevent overflow (#1024) - Fixed the size differences between
SkeletonThumbnail
andThumbnail
(#1141) (thanks @mbaumbach for the issue report) - Refactored
ComboBox
tests that were not running (#1137)
- Updated related component documentation for
Page
,PageActions
, andPagination
(#1103) - Improved
Modal
documentation for properties only available in a stand-alone app context (#1065) - Added accessibility documentation about
Banner
(#1071) - Added accessibility documentation for
InlineError
(#1073) - Added accessibility documentation for
Loading
(#1075) - Fixed documentation about the
ariaPressed
prop forButton
(#1097) - Fixed examples using the
selected
prop forAutocomplete
(#1053)
- Added viewport meta tag to Storybook frame (#1026)
- Removed lodash decorators and replace all occurrences of
_.throttle
withdebounce
(#1009) - Removed all occurrences of
_.replace
(#1012) - Added lodash to
create-react-app
example (#1010) - Updated
create-react-app
example dependencies (#1010) - Replaced all occurrences of
_.capitalize
with a customcapitalize
function (#1015) - Replaced all occurrences of
_.isObject
with a customisObject
function (#1011) - Replaced all occurrences of
_.get
with a customget
function (#1013) - Moved icons specific to
Banner
,DropZone
, andResourceList
to @shopify/polaris-icons (#1042) - Updated spinner component to use the
Image
component instead of an SVG tag to render (#1042)
- Deprecated passing a React Element into the
Icon
component in favor of passing a React Component (#1042) - Deprecated the untrusted prop in the
Icon
component (#1042)
- Used
base-tight
spacing
value instead ofrem(12px)
(#1044)
- Fixed the
focused
prop onTextField
so it sets the focus state (#990) - Resolved an unsupported
React.Fragment
syntax (#1080) - Constrained
DropZone
height based on inherited wrapper height #908 - Reverted a change that adjusted padding in the
Card
component introduced in (#962)
SkeletonThumbnail
for representing thumbnails in loading state
- Updates
TopBar.UserMenu
interaction states styling (#1006) - Added
download
prop toButton
andUnstyledLink
components that enables setting the download attribute (#1027) - Added support for internationalization of month and week names to
DatePicker
(#1005) - Added
untrusted
prop toIcon
to render SVG strings in an img tag (#926) - Added a
data-href
toResourceList.Item
s that have aurl
prop (#1054)
- Fixed
type="number"
TextField
to prevent conditions where press-and-hold could increment or decrement infinitely (#1029) - Fixed the top border of
DataTable
overlapping its container’s border (#975) - Fixed the
DataTable
sort direction not reversing on second sort of the initially sorted column (#918) (thanks @tabrez96 for the issue report) - Changed the offset from 5px to 4px in
Tooltip
between activator and message to be consistent withPopover
(#1019) - Fixed
Card
header not showing whentitle
empty or not set (#1031) - Fixed an issue on Chrome when you use a
TextField
insideCollapsible
which is inside a scrollable element, the text disappeared if you focused a fully hiddenTextField
(#1047)
- Added accessibility documentation for the button and link components (#924)
- Added accessibility recommendations for the text field and autocomplete components (#968)
- Added a test that builds Polaris for web and polaris-styleguide. This test takes ~20 minutes to run so it’s only configured to run for master (931)
- Enabled
no-vague-titles eslint
rule (#1051)
- Moved character counter to bottom of multiline text input (#992)
- Aligned
TopBar
search input and results with page content (#1008)
- Added all props example of
ResourceList
in the style guide (#978)
- Removed
TopBar
logo background (#957) - Updated
TopBar
search results width to adapt to search input and added a minimum width (#969) - Updated
Card.Section
to acceptReact.ReactNode
astitle
(#781) - Added
contextControl
prop toTopBar
andNavigation
(#966)
- Fixed
Collapsible
to useoverflow: visible;
once fully open (#951) - Fixed the
DataTable
sort direction not reversing on second sort of the initially sorted column (#918) (thanks @tabrez96 for the issue report) - Fixed
TextField
when passingnull
tovalue
(#964) (thanks @mbaumbach for the original issue) - Changed the default value for
showHidden
prop onResourcePicker
for backward compatibility with legacy EASDK (#981) - Adjusted top and bottom padding to the header, footer and sections in
Card
to add space between action buttons in the header and footer and the card sections. (#962)
- Added accessibility documentation for the account connection and setting toggle components (#970)
- Added accessibility documentation for the avatar component (#973)
- Updated docs about App Bridge usage in AppProvider (#945)
- Added all props example to
DataTable
in the style guide (#1003)
- Fixed links to Polaris component pages in story descriptions (#933)
- Upgraded to
@shopify/polaris-icons
v2.0.0 (#982)
- Updated
import styles from './foo.scss';
from non-standardimport * as styles from './foo.scss';
when importing scss files (#929) - Removed internal ellipsis icon as it is deprecated, and horizontalDots should be used instead (#974)
- Updated
TextField
to accept ashowCharacterCount
prop enabling the display of character count (#709)
- Fixed vertical misalignment in
Banner.Header
(#870) - Removed a duplicate
activatorWrapper
inPopover
when destructuring props (#916) - Fixed
Banner
secondaryAction content wrapping in Firefox (#719) - Added
onKeyPress
,onKeyDown
, andonKeyUp
toButton
(#860) - Added
monochrome
prop toButton
andLink
component (#821) - Updated
Frame
layout and madeTopBar.UserMenu
visible on mobile (#852) - Added a
forceRender
prop toPage
to not delegate to the app bridge TitleBar action (#695) - Changed
Tabs
example to contain children so thePanel
renders for accessibility (#893) - Fixed timezone not being accounted for in
ResourceList
date filter control (#710) - Removed unnecessary tooltip text in the
TopBar
component (#859)
- Added
Stack.Item
properties and description to style guide’s (#772) - Added accessibility documentation to the resource list and data table components (#927)
- Added accessibility recommendations for the caption component (#928)
- Improved build speed by adjusting our rollup workflow (#912) and not optimizing svgs in the node_modules folder (#920)
- Fixed an issue where deployments would use an old version of Yarn, and open a pull request to polaris-styleguide with thousands of deleted integrity hashes in
yarn.lock
(#856)
- Updated App Bridge to version 1.0.3 (#844)
- Deprecated
Navigation.UserMenu
in favor ofTopBar.UserMenu
(#849) - Deprecated
Navigation
’suserMenu
prop (#930)
- Update build toolchain to use Babel v7, PostCSS v7 and Rollup v1. Updated our build targets match our supported browsers, leading to a reduction in bundle size (#837)
- Ensured disabled
Button
components with aurl
prop output valid HTML (#773) - Fixed
DropZone
which was unable to add a duplicate file back to back or add a file again once removed #782. Thank you @jzsplk for the contribution #425 and @vladucu for the clear example. - Added a fallback to the
safeAreaFor
Sass mixin to handle browsers that don’t supportenv
andconstant
(#881)
- Added deprecation guidelines (#853)
- Replaced our home-grown playground with Storybook (still accessed through
yarn dev
) (#768) - Removed our usage of babel-node for build scripts - use plain node instead (#836)
- Ensured CSS builds are reproducible (#869)
- Moved icons to a separate npm package (#686)
- Added
oneHalf
andoneThird
props toLayout
component (#724) - Added
helpText
prop toActionList
items (#777) - Updated
Page
header layout so actions take up less room on small screens (#707) - Added
alternateTool
prop toResourceList
component (#812) - Updated color of warning status
ExceptionList
items from dark orange to dark yellow for better differentiation from critical status items (#813)
- Fixed
TextField
not showing the correct color while it has focus and an error (#806) - Fixed
ResourceList
not renderingBulkActions
on initial load when items were selected (#746) - Fixed the new variant of the
Badge
component so that it is simpler and easier to read (#751) - Reverted a change that set the
autocomplete
property onTextField
tonope
when it wasfalse
(#761) - Added dismiss button for
CalloutCard
(#353) - Removed an extra tab stop from
ResourceList.Item
and make it unactionable while loading (#745) - Fixed
Checkbox
from losing focus when quickly toggled (#717) - Fixed the console error in the
PositionedOverlay
test environment (#758) - Fixed
ResourceList
not rendering a header after initial load (thanks to @andrewpye for the original issue) - Fixed
TextField
not passingstep
to the input (#829) - Renamed
Option
andGroup
types inSelect
to work around typedoc oddness (#830)
- Modified image paths to fit the style guide’s new Markdown parsing rules (#753)
- Added a slight delay to the Percy screenshot script to give time for components to render fully (#704)
- Refactored to remove cyclical type imports (#759, #754, and #767)
- Upgraded
@shopify/polaris-tokens
to v2.1.1 (#813)
- Added support for
ResourceList.Item
opening a URL in new tab if command or control keys are pressed during click (#690) - Added
primaryAction
prop toSkeletonPage
(#488) - Added support for press-and-hold to increment and decrement value in a
type="number"
TextField
(#573) (thanks to @andrewpye for the original issue) - Forced
Avatar
to fall back toinitials
when the image fails to load (#712)
- Fixed
Popover
not opening in a smallScrollable
container (#658) - Fixed
Page
header component to only render actions wrapper when actions are present (#732) - Fixed
ContextualSaveBarProps
type not being exported (#734) - Fixed
Avatar
proportions when image is not square (#740)
- Upgraded to TypeScript 3.1.6 (#700)
- Moved some inconsistent prop types around for compatibility with the style guide’s Props Explorer (#727)
- Fixed
ToastProps
type not being exported (#722) - Fixed Shopify App Bridge import issues in
AppProvider
andenzyme
test utilities (#720)
- Updated
TextField
to no longer usecomponentWillReceiveProps
(#628) - Updated
EventListener
to no longer usecomponentWillUpdate
(#628) - Allowed
Icon
to accept a React Node as a source (#635) (thanks to @mbriggs for the original issue) - Added
alignContentFlush
prop to ContextualSaveBar (#654)
- Fixed
Pagination
from callingonNext
andonPrevious
whilehasNext
andhasPrevious
are false for key press events (#643) - Removed min-width from
FormLayout
Items
and applying it only toItems
used inside aFormLayout.Group
(#650) - Removed added space in
ChoiceList
when choice has children on selection but is not selected (#665) - Fixed
errorOverlayText
onDropzone
(#671) - Updated the
InlineError
text color, the error border-color on form fields and the errorIcon
color to be the same red. (#676) - Fixed
AppProvider
server side rendering support (#696) (thanks @sbstnmsch for the original issue) - Fixed
TextField
autocomplete disabling by setting autocomplete="nope" whenautoComplete
prop isfalse
(#708)
- Updated documentation links to match the new style guide link structure (#478)
yarn run tophat
has been removed and its functionality has been moved into theyarn run dev
server. Example editing now supports hot-reloading so you don’t need restart the server anymore.
- Bumped
@shopify/polaris-tokens
to v2.0.0. This is a breaking change for consumers of color design tokens in languages such as JavaScript and Sass (full release notes)
- Fixed selector import in
DataTable
andCell
(#638)
- Improved
Avatar
so it falls back toinitials
when the image fails to load (#557) - Added
onScrolledToBottom
prop toScrollable
(#568)
- Fixed
Action
’s selector inPage
’sHeader
component (#523) - Fixed
Card
spacing in small devices (#608) - Fixed
ResourceList
BulkActions
that were remaining in fixed position outside theboundingElement
(#627) - Improved readability of
Badge
withsize
small andstatus
new for navigation (#633)
- Fixed
Datepicker
ranges whenstart
andend
dates are similar but have different references (#601) - Fixed
DataTable
column visibility calculation in production environments by using adata-polaris-header-cell
attribute instead of class-based targeting (#615) - Fixed
Navigation.Item
not callingonClick
on small screens whenonNavigationDismiss
is undefined (#603) - Fixed
Autocomplete
empty state example Markdown not parsing correctly (#592) - Fixed
TopBar
’sUserMenu
alignment to be right-aligned whenTopBar
isn’t passed asearchField
prop (#597) - Removed erroneous SCSS file import that rendered Polaris unable to be used in typescript projects without scss support (#609)
- Fixed
Popover
inconsistent border-radius values (#605) TextStyle
strong variant now uses a span tag instead of b (#606)- Fixed non-blocking context errors when using
Toast
orLoading
in an embedded app (#613)
- Added padding top and bottom on
Card.Section
when set to full width - Fixed
Portal
rendering by usingcomponentDidMount
lifecycle hook as opposed tocomponentWillMount
- Fixed an issue where clicking a
Link
without aurl
in a form would implicitly submit the form.Link
can no longer submit forms. Use<Button submit>
instead. - Renamed the
Keys
enum to align with Shopify naming standards. It is now singular and the properties are in PascalCase. Replaceimport {Keys} from '@shopify/polaris'
withimport {Key} from '@shopify/polaris'
and change the casing of the properties, e.g. replaceKeys.DOWN_ARROW
withKey.DownArrow
. - Added !important to
display: none
in@print-hidden
mixin
- Use the Shopify App Bridge in favor of the EASDK. The EASDK has been removed.
- Added Shopify App Bridge support to new components
Toast
andLoading
- Added
target
prop to all actions which get passed to the Shopify App Bridge - Added new
size
andmessage
props toModal
which aligns with the Shopify App Bridge API - Added new
resourceType
,initialQuery
, andshowVariants
props toResourcePicker
which aligns with the Shopify App Bridge API - Moved embedded
ResourcePicker
,Modal
, andPage
to the main bundle and removed the embedded bundle. Imports from'@shopify/polaris/embedded'
will no longer work, use'@shopify/polaris'
instead. - Made the
shopOrigin
prop onAppProvider
optional. It’s now provided by default. If you do provide ashopOrigin
it now needs to be given without the'https://'
per the Shopify App Bridge API. - Updated
onSelection
prop onResourcePicker
. The shape of theselectPayload
data has changed and the productid
is now agid
. For example,/9019381572
is nowgid://shopify/Product/9019381572
. We offer @shopify/admin-graphql-api-utilities to help compose and parsegid
from Shopify admin. - Updated default values for
ResourcePicker
props to align with the Shopify App Bridge. Set the propsshowHidden
,allowMultiple={false}
, andshowVariants={false}
to get the previous default behavior. - Updated
target
prop type related to embedded apps, use'APP'
,'ADMIN_PATH'
, or'REMOTE'
- Removed
icon
prop fromPage
. Upload your app’s icon in the Shopify Partners dashboard “App setup” section instead. - Removed
title
prop fromResourcePicker
as setting a title is no longer supported by the Shopify App Bridge - Removed
products
prop fromResourcePicker
, useresourceType="Product"
instead - Removed
collections
prop fromResourcePicker
, useresourceType="Collection"
instead - Removed
width
andheight
props fromModal
, usesize
instead - Removed
debug
prop fromAppProvider
, use Redux DevTools instead. Redux DevTools also has browser extensions. - Removed the
Alert
component, useModal
withmessage
prop instead - Replaced
easdk
on React context withappBridge
. Access it viathis.context.polaris.appBridge
. - Removed
this.context.easdk.startLoading()
andthis.context.easdk.stopLoading()
, use theLoading
component instead - Removed
this.context.easdk.showFlashNotice()
, use theToast
component instead - Removed
this.context.easdk.pushState()
, use the Shopify App BridgeHistory
action instead. TheHistory
action requires passing theappBridge
instance which is accessible viathis.context.polaris.appBridge
. - Removed
this.context.easdk.redirect()
, use the Shopify App BridgeRedirect
action instead. TheRedirect
action requires passing theappBridge
instance which is accessible viathis.context.polaris.appBridge
.
- Updated the license from MIT to a custom license based on MIT. The new license restricts Polaris usage to applications that integrate or interoperate with Shopify software or services, with additional restrictions for external, stand-alone applications.
We’ve released a suite of new components that, when combined, form the application frame of a stand-alone (or non-embedded) Polaris app.
The frame component, while not visible in the user interface itself, provides the structure for any non-embedded application. It wraps the main elements and houses the following components:
- primary navigation
- top bar
- toast
- loading
- contextual save bar
The navigation component is used to display the primary navigation in the sidebar of the frame of any non-embedded application. Navigation includes a list of links that merchants use to move between sections of the application.
The top bar component is always visible at the top of a non-embedded application. Its logo and color can be customized using the app provider component to reflect an application’s brand. Merchants can use it to search an application, access menus, and navigate by clicking on the logo.
The toast component is a non-disruptive message that appears at the bottom of the interface to provide quick, at-a-glance feedback on the outcome of an action.
The loading component is used to indicate to merchants that a page is loading or an upload is processing.
The contextual save bar tells merchants their options once they have made changes to a form on the page. This component is also shown while creating a new object like a product or customer. Merchants can use this component to save or discard their work.
The autocomplete component is an input field that provides selectable suggestions as a merchant types into it. It allows merchants to quickly search through and select from large collections of options.
- Changed
Form
to default themethod
topost
in order to prevent accidental leaking of form details - Added support for boolean type on Choice error prop
- Changed the esnext folder to contain individual, minimally transpiled JavaScript component files, as well as raw style and image assets
- Added
onPortalCreated
prop toPortal
- Improved consistency of
Badge
styling - Explicitly specifying
list-style
onList
- Fixed console error and used new ref syntax in
DataTable
(thanks to @duythien0912 for the original issue) - Fixed the ability to upload multiple files even when
allowedMultiple
prop is false - Fixed
Datatable
so it resizes with new content (thanks @andrewpye for the original issue) - Fixed
RangeSlider
linear-gradient so it doesn’t break the css build (thanks @Ankitjasoliya and @nerfologist for the original issue) - Fixed issue in
Page
, where styling wasn’t being applied correctly to Page Actions - Removed unnecessary bindings on the
Modal
’sonClose
prop - Rearranged
primaryFooterAction
andsecondaryFooterAction
inCard
(thanks @sivakumar-kailasam for the original issue)
- Updated banner guidelines to make it clearer when success banners should be used vs success toasts.
- Added examples for iOS and Android section header
- Added examples for iOS and Android thumbnail
- Added examples for iOS and Android empty state
- Added examples for iOS and Android text field
- Added examples for iOS and Android select
- Added examples for iOS and Android keyboard accessories
- Added examples for iOS and Android collapsible
- Added examples for iOS and Android list
- Clarified placement and usage of
Banner
- Added an explanation to
Modal
about why it can’t be closed by clicking outside the modal and should only be closed by clickingX
orCancel
- Moved sub-sub-components within
ResourceList
into components folders - Removed empty state from
ResourceList
if there are no items andloading
is true - Move to use sewing-kit for test running, updating to Jest 23 in the process. This gives us working sourcemaps for code coverage
- Improved accessibility testing checklist
- Updated development node environment to 10.13.0
- Added shopify/jest plugin to eslint config
- Added contribution guidelines
- Added tophatting documentation
- Updated the project README
- Moved active development to the public repository
- Fixes type imports in the build
- Removed tip from
Popover
- Increased speed of
Popover
transition from 500ms to 100ms - Improved text contrast in
Badge
. - Added named
medium
size to Button that renders the same as omiting the size attribute
- Fixed typo in
Collapsible
example - Fixed padding and margins on
SkeletonPage
to matchPage
- Fixed spacing between
Page
title and metadata
- Made
ActionList
,OptionList
andPopover
examples active by default so previews are visible without interacting - Improved the manual accessibility checklist
- Batched Percy snapshots per component
Tab.Item
with aurl
prop now renders anUnstyledLink
instead of aButton
when displayed inPopover
and you can now keyboard navigate the disclosure inTabs
- Refs can be placed on
DropZone.FileUpload
- Use the new context API in
ResourceList
- Use the new context API in
DropZone
- Update example description in
ExceptionList
documentation - Move Modal CloseButton into its own subcomponent, instead of being part of the Header subcomponent. This is an internal implementation detail if you are using the React component. If you are using (s)css and are defining class names manually you will need to update references to
Polaris-Modal-Header__CloseButton
andPolaris-Modal-Header--withoutTitle
toPolaris-Modal-CloseButton
andPolaris-Modal-CloseButton--withoutTitle
respectively.
- Added
d.ts
files to test coverage ignore Page
is no longer self-closing in the playground
- Fixed
Button
alignment issue caused by unnecessary icon markup rendering ([#2339](Fixing button alignment #2339)) (thanks to (@mbaumbach) for the (original issue)) - Fixed console error and used new ref syntax in
DataTable
(thanks to @duythien0912 for the original issue) - Fixed margin of
InlineError
text to align with theChoiceList
labels - Replaced hardcoded
rem
values with globally scalable ones onDataTable
’s collapsed shadow, andTextStyle
code blocks - Fixed spacing of numbered
List
for double digits (#121) - Fixed
ProgressBar
not showing up in Windows high contrast mode (#1708) - Top aligned all cells in
DataTable
- Fixed stacking order of loading overlay in
ResourceList
- Fixed form inputs in
Popover
that were disappearing instead of top aligning thanks to @mbaumbach for the original issue - Removed a redundant class on
OptionList
list items
- Made
Modal
examples show the modal dialog by default - Changed fitted
Tabs
to have equal width when enough space is present (#2314)
Use withContext
to pass consumer context to a component.
Use withRef
with compose
to forwardRefs to a component.
- Updated
Button
to accept aReact.ReactNode
for itsicon
prop
- Refined accessibility checklist
- Added truncation to
Tag
- Updated date filter labels in resource list
- Changed
placeholder
prop inSelect
to be the default selection - Added a
loading
prop toResourceList
that places a spinner overtop items and disables bulk actions
- Clarified when and how to use icons in the banner component
- Updated footer help component guidelines to include content instructions for app developers
- Fixed resource list component to correctly handle inclusive filter keys
- Fixed date field in DateSelector to not render an error when date is added by the date picker and field is blurred
- Fixed pagination from firing keypress events while focus is inside inputs or contenteditables
- Fixed
EmptyState
horizontally scrolling when fully condensed - Fixed the bottom margin of elements inside
Page
being ignored in some browsers - Added required
url
prop tobreadcrumbs
inPage
component examples - Fixed
ActionList
wrapping text within aPopover
- Fixed
Banner
spacing when inside of a section - Fixed
Stack
so it doesn’t add extra spacing between items in Safari
- Reverted a change that caused the built embedded.js bundle to be way larger than it should be due to broad imports
- Added support for boolean type on Choice error prop
- Updated banner guidelines to make it clearer when success banners should be used vs success toasts.
- Updated display text documentation to have a separate example for medium and large display
- Reverted a change that caused items in a
Popover
component not to be clickable
- Fixed paths to images in the “Attention badge” example
- Fixed the
Page
component’sprimaryAction
to supportLoadableAction
s andDisableableAction
s
- Adjusted spacing for
ChoiceChildren
inChoiceList
for readability - Made
Card.Header
a separate publicly accessible component - Added support for complex operators in
ResourceList
component - Updated the
Page
component’sprimaryAction
to supportButton
props. - Added validation for non-numeric input in a type="number"
TextField
- Added circle information icon
- Updated
Banner
guidelines to make it clearer when success banners should be used vs success toasts
- Moved
pa11y
andobject-hash
from dependencies to devDependencies
- Fixed inconsistent
DropZone
error styling
- Added a
test:coverage
script to gather and display test coverage results - Added Codecov test coverage checks to pull requests
- Added automated a11y testing to CI
- Added support for
titleMetadata
inPage
component - Added support for
FilterType.DateSelector
inResourceList
component - Added
code
as an acceptedvariation
of theTextStyle
component to provide support for accessible markup and styling of inline code snippets and code-like text - Added new
border-width
SCSS function - Added support for
fullWidth
andconnectedTop
props onButtonGroup
- Added
label
prop toDropZone
for better accessibility - Added support for
RadioButton
to accept a block as alabel
- Added a
singleColumn
prop to theSkeletonPage
component - Updated the transition on large
Modal
to match the default transition - Added
nextKeys
,previousKeys
,nextTooltip
, andpreviousTooltip
props to thePagination
component to support keypress handling andTooltip
in pagination buttons. - Added examples to the
Layout
component documentation for two and three column grid layouts - Added an export for the
Progress
type to support downstream typechecking of theBadge
componentprogress
prop - Added an
iFrameName
prop to theModal
component to support named iframe children - Added a
ScrollTo
subcomponent to theScrollable
component to support scrolling to a child node programmatically - Added support for the
Button
component to accept an array of strings as children - Changed the primary focus target of an activated
Popover
from the first focusable child to thePopover
itself - Added an improved error message when the child of an embedded
Alert
component is not a string (thanks @superwhykz for the original issue) - Added a minimum width to tab items to improve touch target sizing and account for smaller tab titles
- Added support for additional accessibility attributes to the
TextField
andOptionList
components - Added support for
OptionList
withAvatar
,Icon
, andThumbnail
whenoptions
descriptors have amedia
property - Added support for destructive
ActionList
items - Added support for
OptionList
options
descriptors to accept a block for thelabel
property - Added
$page-max-width
variable to capture page calculatedmax-width
value andpage-when-not-max-width
mixin to trigger when page is resized horizontally - Added support for select error messages to be optional
- Updated the
Breadcrumbs
component to support theCallbackAction
type as a prop (thanks @dylan for the current issue and everyone who identified this.) - Added support for
TextField
error messages to be optional - Added a
disabled
prop to theChoice
component.Checkbox
andRadioButton
labels are now styled to reflect their disabled state - Added support for Windows High Contrast mode in the
Select
,Checkbox
andRadioButton
components
- Fixed
TextField
resizer rendering whenmultiline
was false - Fixed
Modal
header condensing - Fixed
Tooltip
so active prop activates on initial render - Fixed
Popover
border radius and left and right alignment - Fixed visibility of the hidden implicit submit button in
Form
(thanks @cgenevier for the original issue) - Fixed alignment of wrapped empty state actions
- Swapped the import and export icons
- Fixed incorrect
DataTable
column count and content skipping in assistive technologies - Fixed unintended form submittal by action list items enclosed in a
form
(thanks @andrewpye for the original issue) - Fixed text alignment of multiline
OptionList
option text - Fixed an issue where the
Stack
component would render incorrectly nested items - Fixed spacing above annotated sections on smaller screens
- Fixed an issue that caused problems for some build tools
- Fixed the word-break of long text in
Label
andBanner
on small screens
- Added examples for iOS and Android
RadioButton
- Added examples for iOS and Android
Banner
- Added
Toast
component - Added examples for iOS and Android
Button
- Added examples for iOS and Android
ButtonGroup
- Added examples for iOS and Android
Badge
- Added examples for iOS and Android
Avatar
- Added
Stepper
component
Use inline errors to describe custom form inputs or form groups when invalid.
- Updated sub component structure
- Added
weekStartsOn
prop toDatePicker
- Remove
stickyManager
fromAppProviderProps
interface - Fixed a bug where
Layout.AnnotatedSection
would output a wrapper div for adescription
even when its contents were empty - Remove extra padding from annotated section
- Added iOS and Android examples to the
Card
component - Added iOS and Android examples to the
ChoiceList
component
- Renamed
yarn start:vrt
toyarn tophat
and updated the folder name to match - Improved
yarn tophat
’s design, and added a/all-components
route
- Added
weekStartsOn
prop toDatePicker
- Changed
Form
to submit a form by default when the enter key is pressed, and added the propimplicitSubmit
to disable this default
- Fixed
TextField
padding when aprefix
orsuffix
is included
- Removed the min-width of 320px from
ResourceList
- Resolve issue with
RangeSlider
component not accepting0
as amax
value - Slightly reduced spacing for
prefix
andsuffix
on theRangeSlider
component - Fixed spacing for
prefix
andsuffix
on theTextField
component - Fixed height of cells in
DataTable
that are rendered after initial page load (for example: in aTab
or aPopover
) (thanks @flewid for the original issue) - Fixed
DatePicker
month styling for previous years
Use OptionList
to present a group of selectable items outside of the context of a Form
.
- Fixed
Form
examples
- Added
prefix
andsuffix
props toRangeSlider
for better layout control - Added testing documentation and examples in
AppProvider
- Performance: optimized avatar SVG files
- Updated
yarn run optimize
to add new line at the end of SVG files - Added a more compact variant of
Select
, with the form label appearing inside the control)
- Adjusted padding on
TextField
to work with Chrome’s autofill - Fixed a regression where the version of Polaris wasn’t globally available anymore
- Updated the interaction state visuals for
ActionList
- Fixed z-index on
ResourceList
header with sorting options (thanks @janklimo for the original issue) - Fixed an issue where
RadioButton
was not focusable in Safari - Fixed spacing for annotated section descriptions
- Fixed a bug in EASDK action transforms that prevented external urls in embedded apps from opening (thanks @dansundy for the original issue)
- Updated
@shopify/polaris-tokens
, the single source of truth for colors
Use RangeSlider
to select a number value between a min and max range.
- Added a fixed prop to
Popover
allowing for a fixed position - Added badge prop to the
ItemDescriptor
type and action group - Added
text-breakword
mixin for easier word breaking when dealing with long unspaced strings
- Fixed unexpected form submission when switching tabs in a
Tabs
component wrapped in aForm
- Added missing
'Shopify.API.setWindowLocation'
message handler to the EASDK
- Added support for
Card
to accept a block for a title - Added an intermediate prop typing for
Link
to allow redefinition of prop definitions
- Fixed an issue where
ResourceList
filters lost padding (thanks @BarryCarlyon for the original issue) - Fixed unexpected focus jumps when
DatePicker
props are updated - Fixed the spacing and text wrapping of
ExceptionList
title and description
- Fixed
DropZone
to prevent it from kicking into small size too soon
- Various content and markdown fixes
Use Exception lists to draw the merchant’s attention to important information that adds extra context to a task.
- Added an
ellipsis
prop toActionList.Item
allowing for an ellipsis suffix after the content - Added a
preferredAlignment
prop toPopover
allowing it to be aligned to the left, center, or right of its activator - Updated styling for
Banner
that appear in aCard
or aModal
- Added new size to
DropZone
component - Exposed Group interface from the
Select
component - Renamed
plain-list
mixin tounstyled-list
- Removed padding from
DropZone
and applied it toFileUpload
instead
- Fixed unexpected window scroll on rendering
DataTable
(thanks @mfurniss for the original issue) - Fixed focused inner interaction state on
ResourceList.Item
for reverse tabbing - Fixed border radius on
Card
to match the padding onPage
- Added
target
to thebreadcrumb
prop onPage
(thanks @sdn90 for the original issue) - Fixed visual representation of disabled bulk action buttons in
ResourceList
- Fixed margins of a
fullWidth
Popover
that appears above its activator - Fixed rendering of
Popover
when activator rerenders (thanks @nerfologist for the original issue) - Fixed
z-index
calculation forPositionOverlay
andDialog
- Fixed an issue where selecting a date in
DatePicker
would submit its enclosing form - Fixed
ResourceList
reverse tabbing focus interaction on action buttons - Fixed padding in the case where a
ResourceList
had no filters
Summary: this is the first major version of Polaris React since launch. Included in this release are:
- Several new components, including
DataTable
,DropZone
,AppProvider
, andModal
- Improvements to existing components, such as
ResourceList
,ChoiceList
, andCard
- A few breaking API changes
We’re removing support for React 15 in order to make full use of some of the new features in React 16, such as fragments, error boundaries, and improved server-side rendering.
Upgrade your app to the latest version of React.
The AppProvider
component is now required in your app for Polaris components to function properly.
Wrap your app in the AppProvider
component.
Collapsible component requires an id
prop
For accessibility reasons, the id
prop is now required on the Collapsible
component.
Pass a unique value as an id
to all Collapsible
components. For example, <Collapsible id="my-unique-id">
.
The EmbeddedApp
component has been removed. The AppProvider
component now accepts the configuration needed to initialize an embedded app.
Use the AppProvider
component with the apiKey
and shopOrigin
props.
Shopify is organized around objects that represent a merchant’s business, such as customers, products, and orders. Each individual order, for example, is given a dedicated page that can be linked to. In Shopify, we call these types of objects resources.
The resource list component functions as:
- A content format, presenting a set of individual resources in a compact form
- A system for taking action on one or more individual resources
- A way to navigate to the details page of an individual resource
Our current resource list component gave you some nice defaults out of the box, but didn’t take you much further than that. We recognized that each of these lists is unique and contains different information that is important to the merchant.
Our new resource list allow you to build custom items in the list, with their own layout, content, and styling. This gives you a powerful way to build these sorts of lists going forward.
We’ve also included in depth documentation and a tutorial on how to build your own custom resource list items.
To be more consistent with our other component APIs, the Tabs
component now uses content
instead of title
.
Change all instances of title
to be content
instead.
Because we require you to manage state for your inputs, we decided to make onChange
required for TextField
to avoid confusion.
Add an onChange
callback to each use of TextField
that is not disabled or readonly.
The CSS for Icon
will no longer apply a color to icons by default. You must use the color
prop on the Icon
component to specify the color.
Use color
prop on all instances of Icon
component.
To avoid conflicts with other styling or frameworks, we’re removing the styling we globally applied to all a
elements.
Use the Link
component instead.
This change only impacts users of the Sass version of Polaris, more specifically the color()
function. The color($hue, $value: base, $for-background: null)
function in Sass now accepts strings for $hue
and $value
as advertised in the color function documentation.
If you’re using VS Code, here are the exact search / replace instructions to follow (toggle “Use Regular Expression”):
- replace
\bcolor\(([a-z-]+)\)
withcolor('$1')
- replace
\bcolor\(([a-z-]+), ([a-z-]+)\)
withcolor('$1', '$2')
- replace
\bcolor\(([a-z-]+), ([a-z-]+), (.*)\)
withcolor('$1', '$2', $3)
Since launching Polaris components, we’ve had many people ask why we didn’t include tables. While we have been moving away from using tables for comparisons that aren’t tabular data (resource lists, for example), we recognize that there are still cases to use them.
The data table component is our answer to those cases. While data visualizations represents part of a data set, data tables are used to organize and display all the information from a data set, allowing merchants view details from the entire set. This helps merchants compare and analyze all the data in a unified way.
Currently we have several different interfaces for uploading files across Shopify, which leads to a lack of consistency and some missing features and capabilities. To solve this problem, we’re releasing a new drop zone component.
This new component allows merchants to upload files by dragging and dropping them into an area on a page. The component handles file type validation, dropping onto the window, and more, meaning more ease of use for merchants.
In the original Polaris React, the modal component was only available to embedded apps. No longer. Our new modal component is universal in that it can be used in either stand-alone or embedded apps, and will handle the correct behavior for you.
The app provider is a required component that enables sharing global app config with the components in Polaris. This is used for the internationalization of strings in Polaris components, as well as set other configuration such as a custom link component that all the Polaris components will use. This unlocks new ways for us to share configuration at an app level and have the components react to that configuration.
- Added
error
prop toChoiceList
TextField
,Select
, andCheckbox
now accept the typesstring
orReactElement
for theerror
prop- Added optional
id
props to more components, and restructured the prop definitions to allow projects to makeid
props mandatory - Added
fullWidth
prop toCard.Section
- Added
fullHeight
prop toPopover
to override max-height - Added
allowRange
as a property forDatePicker
- Added the
external
option to thesecondaryAction.action
prop on theBanner
component. Thank you to (Andrew Cargill) for the issue (#236)
- Enforced subdued description
TextStyle
inAnnotatedSection
- Fixed overflow of
TextField
that caused the border to be cut off - Allowed specific props in the
TextField
component to pass through properties to the input child - Fixed
ActionList
component to provide section dividers when atitle
was not provided - Fixed an issue in the
Select
component where placeholder didn’t properly appear on Firefox and appeared disabled on all browsers
This will be the last v1.x release outside of critical security fixes.
- Add margin-left spacing to disclosure icon within
Button
component - Remove margins on segmented
ButtonGroup
- Fixed text alignment of
Link
so that it inherits from its parent node
- Fixing an error with the release process
- Changed
term
inDescriptionList
component to acceptReact.ReactNode
to allow for more than juststring
type
- Added missing
publishConfig.access
setting inpackage.json
, in accordance with the new Shipit requirements for public npm packages
- Added an
id
prop to Collapsible to be referenced by thearia-controls
attribute of the component triggering the collapse
- Fixed external prop not working within
ActionList
component - Fixed a syntax error in one of the
Card
component examples (thanks @meecrobe for the original issue)
- Enhanced
Avatar
to work better when provided non-square images - Move documentation file so it’s picked up by the style guide
- Fixed disclosure centering on the
Tabs
component - Fixed an issue where a style void would appear between breakpoints at high text zoom levels
- Removed purpose section from component READMEs
- Added
EmbeddedPage
under the Embedded section - Added “Using embedded components” section
- Added screenshots to the embedded components
- Clarified usage of
Card
header andFooterActions
- Moving property descriptions out of READMEs and into source files
- Fixed server-side environments
- Updated component examples that use state to use an es6 class
- Fixed
TextField
overflow issues when insideScrollable
- Fixed
Select
focus state bug occuring in Firefox - Fixed vertical alignment of text within full width variant of the button component
- Changed
Checkbox
label to allow string or React.ReactNode - Update
TextField
type with currency - Added
ariaControls
,ariaExpanded
prop toButton
- Updated the base red color to improve contrast
- Added a notification icon to the bundled icons available to use in the icon component’s source prop
- Exposed Status from the
Banner
component - Added
titleHidden
prop toPage
- Clarified intended usage for
EmptyState
- Added version number to source
- Changed Action to Disableable Action in Card
- Added
renderChildren
prop toChoiceList
component
- Fixed an issue with
FooterHelp
links not expanding to full-width on mobile devices (#759) - Added breadcrumbs to
SkeletonPage
- Added max-width and auto margin to
EmptyState
- Fixed outline
Button
disabled state styles - Fixed
Tag
so theonRemove
function is not improperly called (thanks @chaddjohnson for the original issue) - Fixed border on inputs disabled state
- Fixed an issue in
TextInput
, when you increment or decrement with a float value, and the digits after the decimal point where wrong (thanks @cgidzinski for the original issue) - Added top alignment to FormLayout.Group
- Fixed capitalization of prop names in
Pagination
component’s documentation (thanks @donnguyen for the original issue) - Exposed Option from the
Select
component
- Fixed the public repository’s build (which was missing the new CircleCI configuration files)
- Fixed CSS-only
Checkbox
(thanks @daddy88 for the original issue)
-
Restored the correct
latest
version to the CDN -
Fixed rgbToHsb function when red is the largest number and added tests (thanks @emcmanus for the original issue)
-
Fixed an issue where a hard-coded path would cause the build to fail on Windows (thanks @Invader444 for the original issue and pull request)
-
Added
onClick
toUnstyledLink
-
Added tests to
Link
-
Added tests for
ColorPicker
color utilities
- Ammending changelog
- Added
onActionAnyItem
prop to action list and used to closePage
actionGroups
on click or keypress of any item - Added
content
prop toTabs
and deprecated use oftitle
- Added
TextContainer
component - Added
idForItem
prop to resource list - Added
fullWidth
prop to layout section - Added
indeterminate
as option for checkboxchecked
prop value - Added
singleColumn
prop to page - Added
focused
prop toTextField
- Fixed positioned overlay not responding to
Scrollable
container events - Fixed first focusable item focus in
Popover
- Fixed typos in the select component documentation (thanks @mattchidley for the original issue)
- Moved react-transition-group from a dev dependency to a dependency
- Fixed
Stack
not returning children
- Added missing yarn config file which was causing the build to fail
- Updated README to consistently use contractions (thanks @stefanmiodrag for the original pull request)
- Improved example description for
Layout
component - Updated
Spinner
documentation - Improved component purpose documentation across components
- Improved documentation for
TextStyle
component
- Added support for React 16
- Added an option to show or hide unpublished products from the
ResourcePicker
- Changed
Popover
component to usereact-transition-group
instead of our deprecated custom version in@shopify/react-utilities
- Added new
ProgressBar
component - Changed today’s date to be tabbable and clearly indicated in
DatePicker
- Added support for disabled choices in
ChoiceList
component - Added support for disabled secondary
Page
actions - Changed
TextField
andSelect
to now focus on clicking only within the area from the input to the end of its label text
- Fixed
Layout
component example description - Fixed
SkeletonPage
header appearing in embedded apps (thanks @rkbhochalya for the original issue)) - Fixed border-radius on
ActionList
component in Chrome
- Added
SkeletonPage
,SkeletonBodyText
andSkeletonDisplayText
components - Added
Spinner
component - Added hint prop to
Scrollable
and use inPopover
- Updated
Button
component to use newSpinner
component - Added external link support for
Page
secondaryActions
- Enabled the
primaryAction
ofPageActions
to be loading Stack
now supports non-wrapping layouts on small screens- Updated
TextField
min and max documentation - Breadcrumbs now accept a callback through onAction (thanks @arypbatista for the original issue)
- Fixed issue with embedded app breadcrumb linking to Shopify settings page (thanks @cargix1 for the original issue)
- Fixed
Avatar
to display image and initials simultaneously - Fixed various links to embedded components
- Fixed left and right ends of
TextField
not responding to clicks RadioButton
&Checkbox
now focus on clicking only within the area from the input to the end of its label text- Fixed plain and
fullWidth
Button
alignment - Add a minor delay to
Tooltip
display
- Documented disabled prop for
Checkbox
andRadioButton
(thanks @LeoAref for the original issue) - Documented progress prop for
Badge
(thanks @sp4cecat for the original issue) - Added loading prop to
Button
(thanks @bakura10 for the original issue) - Documented complex
Select
option (thanks @sp4cecat for the original issue) - Documented
TextStyle
component - Improved
Avatar
typography spacing - Added subtract icon
- Improved acessibility for
Pagination
- Fixed failed dependency installation for unauthenticated GitHub users (thanks @mikeyhew for the original issue)
- Fixed
Page
header spacing - Fixed
TextField
focus ring transition - Fixed
Popover
not resizing on content updates
- Fixes alignment of
PageAction
links
- Fixed disabled
Button
when using local class names - Fixed
Scrollable
resize listener not autobinding
- Updated
Scrollable
component to remember scroll position on re-render - Added checkmark icon to the
Icon
component - Added an example for a disabled
TextField
- Fixed typo in
Icon
code example
Various documentation fixes.
- Updated import, export, and view icons
- Improved documentation of various components
- Improved how
ActionList
handles images and groups - Exposed PopoverCloseSource from
Popover
component
- Fixed
PageActions
spacing in IE11 - Fixed ID inconsistency on
TextField
- Fixed spacing on
Page
component with no header (thanks @bakura10 for the original issue) - Fixed disabled state on primary and destructive
Button
- Upgraded javascript-utilities to the latest version
- Fixed classnames in built *.scss files
- Fixed broken link in description list README
- Added an
esnext
build (allows production builds to perform class/method tree shaking) - Changed KeyboardKey component to use
kbd
tag - Added publishing
docs
folder to npm package - Added
fullWidth
option toPopover
component
- Updated Static HTML page examples to correct markup (thanks @bartcoppens for the original issue)
- Hide increment and decrement buttons on number input when disabled (thanks @kguller for the original issue)
- Fixed link to product content documentation
- Fixed documented type for error prop on
Checkbox
component - Fixed
Popover
reopening when clicking around during transition - Fixed
Popover
resizing on content updates - Fixed vertical alignment of
Button
content
- Added Sketch color palette file
- Fixed a repo issue that caused the public repo release not to happen
- Added helpText to
ChoiceList
choices (thanks @cgenevier for the original issue) - Added save icon
- Added
accessibilityLabel
toTabs
- Updated icons for
Banner
- Improved
Page
component by fixing up spacing, addin a prop to show a separator below the page title, and changing the secondary actions to roll up into a dropdown menu on small screens - Improved default stacking behavior for Tooltip and
Popover
(thanks @Taphood for the original issue) - Added extraTight spacing option to Stack
- Use default subheading type styles for
ActionList
- Improved large
Button
styles - Updated font-weight for text emphasis (thanks @bakura10 for the original issue)
- Removed the focus state for
Banner
on click - Fixed disabled
Pagination
button looking active - Fixed alignment on
Button
- Fixed min-width on
TextField
(thanks @asacarter for the original issue) - Removed the border-top on
EmptyState
) (thanks @alexdover for the original issue - Fixed
Select
placeholder value warnings (thanks @cgenevier for the original issue) - Fixed disabled text on iOS
- Fixed type for
onChange
event (thanks @bakura10 for the original issue)
- Added color palette page to “Getting started”
Button
typography updated. More changes to come soon.- Changed typeface from
San Francisco UI
toSan Francisco Pro
. You will need to download the updated typeface here. https://developer.apple.com/fonts/ - Updated to Sketch version 45.2
- Updated layer styles and fonts styles to take advantage of Sketch’s new organizational features.
- Fixed disabled
Button
documentation (thanks @michaelsunglee for the original issue) - Fixed project URL in CircleCI badge
- Fixed Stack documentation (thanks @nerfologist for the original issue)
- Added embedded Alert documentation and updated other embedded documentation
- Updated React TypeScript definitions
- Updated EASDK metadata structure for generic interfaces
- Removed postinstall hook
- Fixed a repo issue that caused the public repo release not to happen
- Added automatic inference of the
target
property of EASDK buttons inPage
primaryAction
andsecondaryAction
based on their URL (thanks @jimmyn for the original issue) - Added automatic inference of the
target
property of EASDK breadcrumbs inPage
breadcrumbs
prop based on the URL Select
option descriptors now accept adisabled
attribute to disable the generatedoption
(thanks @sogko for the original issue)easdk.showFlashNotice
now accepts an optional options object as its second parameter. Passing{error: true}
will cause the flash to appear as an error, matching the behaviour ofShopifyApp.flashError
Checkbox
,RadioButton
,ChoiceList
,Select
, andTextField
now pass the ID of the changed input as the second argument to theironChange
callback (thanks @milep for the original issue)Popover
now respects thez-index
of the activator if it exists- When putting content as children of
Tabs
, the default panel that is generated now respects thepanelID
of the selected tab, and uses a sensible default based on the tab’sid
if nopanelID
exists - When selecting a tab in
Tabs
, the matching panel is now focused by default easdk
methods are bound to the object so they can be freely passed as callbacks
Avatar
now renders as aspan
instead of adiv
- Fixed contents in
Layout.AnnotatedSection
breaking out of their container (thanks @cargix1 for the original issue) - Fixed spacing above a
primaryAction
inCalloutCard
when there is nosecondaryAction
- Aria attributes are now on the actionable elements of
Tabs
instead of in the list items - Exposed
Panel
asTabs.Panel
instead ofTabs.panel
- Fixed the alignment of
prefix
andsuffix
content ofTextField
(thanks @bdillon3 for the original issue) - Fixed the disabled text color in
TextField
Checkbox
andRadioButton
no longer generate invalid HTML in their labels (thanks @ernestogutierrez for the original issue)Tabs
no longer steal focus from contained elements (thanks @alexdover for the original issue)
- Reduced horizontal padding on
Breadcrumbs
- Updated icon and internal padding of
FooterHelp
- Updated the
EmptyState
layout and typographic styles
- Fixed the code examples on the
EmbeddedApp
documentation - Added a simple
EmbeddedApp
example - Renamed the “Tables and lists” category to “Lists”
- A variety of other documentation updates (thanks @sebnun, @asacarter, and @resistorsoftware for raising issues)
- Updated all dependencies
- Added a script to automatically match the published version number to the one referenced in the README
- Added the correct viewport tag to the Playground
- Hid deprecation errors during tests
- Fixed an issue where the embedded components would not reload the page within the Shopify admin (thanks @buggy for the original issue)
- Fixed the
spacing="none"
variation onStack
not working correctly, and added the missingextraLarge
enum value forspacing
- Fixed
Banner
’sonDismiss
callback not being called when the dismiss button was clicked (76ce13f) (thanks @tlwirtz for the original issue)
- Updated
Badge
text colors - Updated line height for the small
DisplayText
variation - Updated the default icon for error
Banner
(thanks @heyneff for the original issue)
- Added app examples (thanks @lukepxu for the original issue)
- Removed references to the Graphik typeface (thanks @adamnel for the original issue)
- Left-aligned button text for better resizing
- Added Messenger link to navigation to better communicate that the channel nav collapses after 3 items
- Fixed alignment of table headers
- Minor updates to Dataviz and Reports examples
- Added indicators to Home notifications
- Synchronized component documentation with the style guide (1e89559)
- Fixed an issue that prevented the public CHANGELOG from being generated correctly
- Added a hot-reloading Playground to easily try out different components
- Removed the references to Babel presets from
package.json
(thanks @macs91 for digging into this with us) - Removed the
@import
statements at the top of source Sass files - Updated TSLint and related linting dependencies
- Fixed an issue where subcomponents with variations would use a single
-
instead of--
(thanks @johnsonab for the original issue) - Fixed a missing typing dependency and a missing
embedded
types entry point that were causing issues using this package with TypeScript (thanks @buggy for the original issues) - Fixed an issue where the anchor tag for
ResourceList.Item
would not span the full width of the item (0c11498) (thanks @sdn90 for the original issue)
- Started using the
prop-types
package instead of gettingPropTypes
fromreact
, as the latter is deprecated as of React 15.5.0
- Corrected the name of
documentation/Embeddded apps.md
todocumentation/Embedded apps.md
(thanks @chrispappas for the original issue) - Fixed the
ColorPicker
documentation to show valid values forsaturation
,brightness
, andalpha
(thanks @allanarmstrong for the original issue)
- Added a description to
package.json
- Added license to
package.json
and to the root of the repo (thanks @d2s for the original issue) - Fixed an issue where the Webpack example would complain about a missing dependency (thanks @rafaedez for the original issue)
- Switch repo to public access
- Initial release