Skip to content

Releases: Shopify/polaris-react

v2.11.0

03 Oct 17:01
Compare
Choose a tag to compare

Enhancements

  • Tab.Item with a url prop now renders an UnstyledLink instead of a Button when displayed in Popover and you can now keyboard navigate the disclosure in Tabs
  • 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 and Polaris-Modal-Header--withoutTitle to Polaris-Modal-CloseButton and Polaris-Modal-CloseButton--withoutTitle respectively.

Development workflow

  • Added d.ts files to test coverage ignore
  • Page is no longer self-closing in the playground

Bug fixes

  • Fixed Button alignment issue caused by unnecessary icon markup rendering (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 the ChoiceList labels
  • Replaced hardcoded rem values with globally scalable ones on DataTable’s collapsed shadow, and TextStyle code blocks
  • Fixed spacing of numbered List for double digits
  • Fixed ProgressBar not showing up in Windows high contrast mode
  • 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

Documentation

  • Made Modal examples show the modal dialog by default
  • Changed fitted Tabs to have equal width when enough space is present

New components

withContext

Use withContext to pass consumer context to a component.

withRef

Use withRef with compose to forwardRefs to a component.

v2.10.0

18 Sep 20:12
Compare
Choose a tag to compare

Enhancements

  • Updated Button to accept a React.ReactNode for its icon prop

Documentation

  • Refined accessibility checklist

Bug Fixes

  • Added truncation to Tag

v2.9.0

10 Sep 15:37
Compare
Choose a tag to compare

Enhancements

  • Updated date filter labels in resource list
  • Changed placeholder prop in Select to be the default selection
  • Added a loading prop to ResourceList that places a spinner overtop items and disables bulk actions

Documentation

  • Clarified when and how to use icons in the banner component
  • Updated footer help component guidelines to include content instructions for app developers

Bug fixes

  • 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 to breadcrumbs in Page component examples
  • Fixed ActionList wrapping text within a Popover
  • Fixed Banner spacing when inside of a section
  • Fixed Stack so it doesn't add extra spacing between items in Safari

v2.8.0

30 Aug 21:24
Compare
Choose a tag to compare

Bug fixes

  • Reverted a change that caused the built embedded.js bundle to be way larger than it should be due to broad imports

Enhancements

  • Added support for boolean type on Choice error prop

Documentation

  • 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

v2.7.2

27 Aug 21:01
Compare
Choose a tag to compare

Bug fixes

  • Reverted a change adding Windows high contrast support to popover components that caused items in a popover not to be clickable

2.7.1

27 Aug 19:16
Compare
Choose a tag to compare

Documentation

  • Fixed paths to images in the “Attention badge” example

Bug fixes

  • Fixed the page component's primary action to support LoadableActions and DisableableActions

2.7.0

27 Aug 16:55
Compare
Choose a tag to compare

Enhancements

  • Adjusted spacing for ChoiceChildren in choice list for readability
  • Made Card.Header a seperate publically accessible component
  • Added support for complex operators in ResourceList component
  • Updated the page component's primary action to support Button props.
  • Added validation for non-numeric input in a type="number" TextField
  • Added support for Windows High Contrast mode in the popover component
  • Added circle information icon

Documentation

  • Updated banner guidelines to make it clearer when success banners should be used vs success toasts.
  • Added documentation for iOS and Android section header

v2.6.1

21 Aug 22:31
Compare
Choose a tag to compare

2.6.1 - 2018-08-21

Development workflow

  • Moved pa11y and object-hash from dependencies to devDependencies

Bug fixes

  • Fixed inconsistent drop zone error styling

2.6.0 - 2018-08-21

Development workflow

  • 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

Enhancements

  • Added support for FilterType.DateSelector in ResourceList component
  • Added code as an accepted variation of the text style 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 and connectedTop props on ButtonGroup
  • Added label prop to DropZone for better accessibility
  • Added support for radio buttons to accept a block as a label
  • Added a singleColumn prop to the skeleton page component
  • Updated the transition on large modals to match the default transition
  • Added nextKeys, previousKeys, nextTooltip, and previousTooltip props to the pagination component to support keypress handling and tooltips 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 the badge component progress prop
  • Added an iFrameName prop to the modal component to support named iframe children
  • Added a ScrollTo subcomponent to the scrollable 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 the popover 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 text field and option list components
  • Added support for option list with avatars, icons, and thumbnails when options descriptors have a media property
  • Added support for destructive action list items
  • Added support for option list options descriptors to accept a block for the label property
  • Added $page-max-width variable to capture page calculated max-width value and page-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 the CallbackAction type as a prop(thanks @dylan for the current issue and everyone who identified this.)
  • Added support for text field error messages to be optional
  • Added a disabled prop to the choice component. Checkbox and radio labels are now styled to reflect their disabled state
  • Added support for Windows High Contrast mode in the select, checkbox and radio components

Bug fixes

  • Fixed text field resizer rendering when multiline 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 data table column count and content skipping in assistive technologies
  • Fixed unintended form submittal by action list items enclosed in a form
  • Fixed text alignment of multiline option list 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 cause problems for some build tools
  • Fixed the word-break of long text in labels and banners on small screens

Documentation

  • Added examples for iOS and Android radio buttons
  • Added examples for iOS and Android banners
  • Added toast component
  • Added examples for iOS and Android buttons
  • Added examples for iOS and Android button groups
  • Added examples for iOS and Android badge
  • Added stepper component

New components

InlineError

Use inline errors to describe custom form inputs or form groups when invalid.

v2.5.0

20 Jul 19:51
Compare
Choose a tag to compare

Enhancements

  • Added weekStartsOn prop to Datepicker

Bug fixes

  • Remove stickyManager from app provider props interface

Documentation

  • Added iOS and Android examples for the card component

Development workflow

  • Renamed yarn start:vrt to yarn tophat and updated the folder name to match
  • Improved yarn tophat’s design, and added a /all-components route

v2.4.0

13 Jul 14:09
Compare
Choose a tag to compare

Enhancements

  • Changed Form to submit a form by default when the Enter key is pressed, and added the prop implicitSubmit to disable this default

Bug fixes

  • Fixed text field padding when a prefix or suffix is included