Releases: Shopify/polaris-react
v3.4.0
Enhancements
- 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)
Bug fixes
- 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)
Documentation
- Modified image paths to fit the style guide’s new Markdown parsing rules (#753)
Development workflow
- Added a slight delay to the Percy screenshot script to give time for components to render fully (#704)
- Refactors to remove cyclical type imports (#759, #754, and #767)
Dependency upgrades
- Upgraded
@shopify/polaris-tokens
to v2.1.1 (#813)
v3.3.0
Enhancements
- 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)
Bug fixes
- 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)
Development workflow
v3.2.1
v3.2.0
Enhancements
- 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)
Bug fixes
- 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)
Documentation
- Updated documentation links to match the new style guide link structure (#478)
Development workflow
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.
Dependency upgrades
- 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)
v3.1.1
v3.1.0
3.0.1
Bug fixes
- 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)
v3.0.0
Breaking changes
- 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
Embedded apps
- 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
.
License
- 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.
New components
We’ve released a suite of new components that, when combined, form the application frame of a stand-alone (or non-embedded) Polaris app.
Frame
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
Navigation
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.
TopBar
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.
Toast
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.
Loading
The loading component is used to indicate to merchants that a page is loading or an upload is processing.
ContextualSaveBar
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.
Autocomplete
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.
Enhancements
- 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
Bug fixes
- 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)
Documentation
- 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
Development workflow
- 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
Open development
- Added contribution guidelines
- Added [tophatting documentation](https://github.com/Shopify/polaris...
2.12.1
2.12.0
2.12.0 - 2018-10-11
Enhancements
- 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
Bug fixes
- Fixed typo in
Collapsible
example - Fixed padding and margins on
SkeletonPage
to matchPage
- Fixed spacing between
Page
title and metadata
Documentation
- Made ActionList, OptionList and Popover examples active by default so previews are visible without interacting
- Improved the manual accessibility checklist
Development workflow
- Batched Percy snapshots per component