Releases: Shopify/polaris-react
v3.4.0
Enhancements
- Moved icons to a separate npm package (#686)
- Added
oneHalfandoneThirdprops toLayoutcomponent (#724) - Added
helpTextprop toActionListitems (#777) - Updated
Pageheader layout so actions take up less room on small screens (#707) - Added
alternateToolprop toResourceListcomponent (#812) - Updated color of warning status
ExceptionListitems from dark orange to dark yellow for better differentiation from critical status items (#813)
Bug fixes
- Fixed
TextFieldnot showing the correct color while it has focus and an error (#806) - Fixed
ResourceListnot renderingBulkActionson initial load when items were selected (#746) - Fixed the new variant of the
Badgecomponent so that it is simpler and easier to read (#751) - Reverted a change that set the
autocompleteproperty onTextFieldtonopewhen it wasfalse(#761) - Added dismiss button for
CalloutCard(#353) - Removed an extra tab stop from
ResourceList.Itemand make it unactionable while loading (#745) - Fixed
Checkboxfrom losing focus when quickly toggled (#717) - Fixed the console error in the
PositionedOverlaytest environment (#758) - Fixed
ResourceListnot rendering a header after initial load (thanks to @andrewpye for the original issue) - Fixed
TextFieldnot passingstepto the input (#829) - Renamed
OptionandGrouptypes inSelectto 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-tokensto v2.1.1 (#813)
v3.3.0
Enhancements
- Added support for
ResourceList.Itemopening a URL in new tab if command or control keys are pressed during click (#690) - Added
primaryActionprop 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
Avatarto fall back toinitialswhen the image fails to load (#712)
Bug fixes
- Fixed
Popovernot opening in a smallScrollablecontainer (#658) - Fixed
Pageheader component to only render actions wrapper when actions are present (#732) - Fixed
ContextualSaveBarPropstype not being exported (#734) - Fixed
Avatarproportions when image is not square (#740)
Development workflow
v3.2.1
v3.2.0
Enhancements
- Updated
TextFieldto no longer usecomponentWillReceiveProps(#628) - Updated
EventListenerto no longer usecomponentWillUpdate(#628) - Allowed
Iconto accept a React Node as a source (#635) (thanks to @mbriggs for the original issue) - Added
alignContentFlushprop to ContextualSaveBar (#654)
Bug fixes
- Fixed
Paginationfrom callingonNextandonPreviouswhilehasNextandhasPreviousare false for key press events (#643) - Removed min-width from
FormLayoutItemsand applying it only toItemsused inside aFormLayout.Group(#650) - Removed added space in
ChoiceListwhen choice has children on selection but is not selected (#665) - Fixed
errorOverlayTextonDropzone(#671) - Updated the
InlineErrortext color, the error border-color on form fields and the errorIconcolor to be the same red. (#676) - Fixed
AppProviderserver side rendering support (#696) (thanks @sbstnmsch for the original issue) - Fixed
TextFieldautocomplete disabling by setting autocomplete="nope" whenautoCompleteprop isfalse(#708)
Documentation
- Updated documentation links to match the new style guide link structure (#478)
Development workflow
yarn run tophathas been removed and its functionality has been moved into theyarn run devserver. Example editing now supports hot-reloading so you don’t need restart the server anymore.
Dependency upgrades
- Bumped
@shopify/polaris-tokensto 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
Datepickerranges whenstartandenddates are similar but have different references (#601) - Fixed
DataTablecolumn visibility calculation in production environments by using adata-polaris-header-cellattribute instead of class-based targeting (#615) - Fixed
Navigation.Itemnot callingonClickon small screens whenonNavigationDismissis undefined (#603) - Fixed
Autocompleteempty state example Markdown not parsing correctly (#592) - Fixed
TopBar’sUserMenualignment to be right-aligned whenTopBarisn't passed asearchFieldprop (#597) - Removed erroneous SCSS file import that rendered Polaris unable to be used in typescript projects without scss support (#609)
- Fixed
Popoverinconsistent border-radius values (#605) TextStylestrong variant now uses a span tag instead of b (#606)- Fixed non-blocking context errors when using
ToastorLoadingin an embedded app (#613)
v3.0.0
Breaking changes
- Added padding top and bottom on
Card.Sectionwhen set to full width - Fixed
Portalrendering by usingcomponentDidMountlifecycle hook as opposed tocomponentWillMount - Fixed an issue where clicking a
Linkwithout aurlin a form would implicitly submit the form.Linkcan no longer submit forms. Use<Button submit>instead. - Renamed the
Keysenum 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_ARROWwithKey.DownArrow. - Added !important to
display: nonein@print-hiddenmixin
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
ToastandLoading - Added
targetprop to all actions which get passed to the Shopify App Bridge - Added new
sizeandmessageprops toModalwhich aligns with the Shopify App Bridge API - Added new
resourceType,initialQuery, andshowVariantsprops toResourcePickerwhich aligns with the Shopify App Bridge API - Moved embedded
ResourcePicker,Modal, andPageto the main bundle and removed the embedded bundle. Imports from'@shopify/polaris/embedded'will no longer work, use'@shopify/polaris'instead. - Made the
shopOriginprop onAppProvideroptional. It’s now provided by default. If you do provide ashopOriginit now needs to be given without the'https://'per the Shopify App Bridge API. - Updated
onSelectionprop onResourcePicker. The shape of theselectPayloaddata has changed and the productidis now agid. For example,/9019381572is nowgid://shopify/Product/9019381572. We offer @shopify/admin-graphql-api-utilities to help compose and parsegidfrom Shopify admin. - Updated default values for
ResourcePickerprops to align with the Shopify App Bridge. Set the propsshowHidden,allowMultiple={false}, andshowVariants={false}to get the previous default behavior. - Updated
targetprop type related to embedded apps, use'APP','ADMIN_PATH', or'REMOTE' - Removed
iconprop fromPage. Upload your app’s icon in the Shopify Partners dashboard “App setup” section instead. - Removed
titleprop fromResourcePickeras setting a title is no longer supported by the Shopify App Bridge - Removed
productsprop fromResourcePicker, useresourceType="Product"instead - Removed
collectionsprop fromResourcePicker, useresourceType="Collection"instead - Removed
widthandheightprops fromModal, usesizeinstead - Removed
debugprop fromAppProvider, use Redux DevTools instead. Redux DevTools also has browser extensions. - Removed the
Alertcomponent, useModalwithmessageprop instead - Replaced
easdkon React context withappBridge. Access it viathis.context.polaris.appBridge. - Removed
this.context.easdk.startLoading()andthis.context.easdk.stopLoading(), use theLoadingcomponent instead - Removed
this.context.easdk.showFlashNotice(), use theToastcomponent instead - Removed
this.context.easdk.pushState(), use the Shopify App BridgeHistoryaction instead. TheHistoryaction requires passing theappBridgeinstance which is accessible viathis.context.polaris.appBridge. - Removed
this.context.easdk.redirect(), use the Shopify App BridgeRedirectaction instead. TheRedirectaction requires passing theappBridgeinstance 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
Formto default themethodtopostin 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
onPortalCreatedprop toPortal - Improved consistency of
Badgestyling - Explicitly specifying
list-styleonList
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
allowedMultipleprop is false - Fixed
Datatableso it resizes with new content (thanks @andrewpye for the original issue) - Fixed
RangeSliderlinear-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’sonCloseprop - Rearranged
primaryFooterActionandsecondaryFooterActioninCard(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
Modalabout why it can't be closed by clicking outside the modal and should only be closed by clickingXorCancel
Development workflow
- Moved sub-sub-components within
ResourceListinto components folders - Removed empty state from
ResourceListif there are no items andloadingis 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
Popovertransition from 500ms to 100ms - Improved text contrast in
Badge. - Added named
mediumsize to Button that renders the same as omiting the size attribute
Bug fixes
- Fixed typo in
Collapsibleexample - Fixed padding and margins on
SkeletonPageto matchPage - Fixed spacing between
Pagetitle 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