Skip to content

Releases: Shopify/polaris-react

v3.13.0

22 Apr 19:41
Compare
Choose a tag to compare

Deprecations

  • Deprecated Navigation Item’s iconBody prop. Pass a string into the icon prop instead. (#1299)

Enhancements

  • Added an onChange handler to CheckableButton (#1326)
  • Labelled now wraps its content, no longer causing a label + action to get unreasonably squished (#1309)
  • Updated polaris-tokens from 2.3.0 to 2.5.0 and converted all use of duration 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 open styleguide pr to create multiple pull requests to 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 matching frame-with-nav-when-not-max-width mixin (#1311)
  • Updated Resizer to schedule handleHeightCheck to run in next animation frame (#1301)

Bug fixes

  • Fixed ResourceList actions from show at incorrect breakpoints or while in select mode (#1333)
  • Fixed Search overlay stretching below the viewport (#1260)
  • Added onChange and value to select AppProvider 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 when EmptySearchResult exists (#1286)
  • Stopped passing the polaris context into the div rendered by Scrollable (#1271)
  • Fixed clickable area on sortable column headers on DataTable (#1273)

Development workflow

  • Upgraded Storybook to v5 (#1140)

Dependency upgrades

  • Remove core-js (#1328)
  • Upgraded Polaris icons to include the full icon set (#1284)

Code quality

  • Migrated the refs in DropZone to use the new createRef API (#1063)
  • Updated ResourceList to no longer use componentWillReceiveProps(#1235)
  • Updated Tabs to no longer use componentWillReceiveProps(#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)

v3.12.0

01 Apr 15:50
Compare
Choose a tag to compare

Enhancements

  • Added a public focus method on Banner (#1219)
  • Added an onScrollToBottom prop to Popover.Pane (#1248)
  • Added a placeholder prop to FilterControl (#1257)
  • Added support for setting string values on the TextField autoComplete prop (#1259)

Bug fixes

  • 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)

Documentation

  • Removed button group joined to the bottom of a component example (#1267)

v3.11.0

21 Mar 17:54
Compare
Choose a tag to compare

Enhancements

  • 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 to Toast (#919)
  • Remove all usage of @shopify/javascript-utilities/decorators, namely autobind, debounce, and memoize (#1148)
  • Added Empty State footerContent prop (#1200)
  • Added viewport condition to TopBar to enlarge the contextControl wrapper on wider screens (#1231)

Bug fixes

  • 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)

Documentation

  • Added accessibility documentation for Checkbox, RadioButton, and ChoiceList (#1145)

Dependency upgrades

  • 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)

Code quality

  • Replaced all occurrences of _.merge with a custom merge 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)

v3.10.0

07 Mar 22:20
Compare
Choose a tag to compare

Enhancements

  • Added Polaris version information tracking in App Bridge actions (#1087)
  • Re-added the navigation’s border-right (#1096)
  • Added onScrolledToBottom prop to Modal (#1117)
  • Updated Navigation.Item to use Icon when iconBody prop is passed in. Renders these icons in an img tag now. (#1094)
  • Added focus state outlines to be visible when using Windows High Contrast Mode for Button (#1101)

Bug fixes

  • 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 and Thumbnail (#1141) (thanks @mbaumbach for the issue report)
  • Refactored ComboBox tests that were not running (#1137)

Documentation

  • Updated related component documentation for Page, PageActions, and Pagination (#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 for Button (#1097)
  • Fixed examples using the selected prop for Autocomplete (#1053)

Development workflow

  • Added viewport meta tag to Storybook frame (#1026)

Code quality

  • Removed lodash decorators and replace all occurrences of _.throttle with debounce (#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 custom capitalize function (#1015)
  • Replaced all occurrences of _.isObject with a custom isObject function (#1011)
  • Replaced all occurrences of _.get with a custom get function (#1013)
  • Moved icons specific to Banner, DropZone, and ResourceList to @shopify/polaris-icons (#1042)
  • Updated spinner component to use the Image component instead of an SVG tag to render (#1042)

Deprecations

  • 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)

v3.9.0

21 Feb 18:47
Compare
Choose a tag to compare

Enhancements

  • Used base-tight spacing value instead of rem(12px) (#1044)

Bug fixes

  • Fixed the focused prop on TextField 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)

v3.8.0

20 Feb 15:53
Compare
Choose a tag to compare

New components

  • SkeletonThumbnail for representing thumbnails in loading state

Enhancements

  • Updates TopBar.UserMenu interaction states styling (#1006)
  • Added download prop to Button and UnstyledLink components that enables setting the download attribute (#1027)
  • Added support for internationalization of month and week names to DatePicker (#1005)
  • Added untrusted prop to Icon to render SVG strings in an img tag (#926)
  • Added a data-href to ResourceList.Items that have a url prop (#1054)

Bug fixes

  • 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 with Popover (#1019)
  • Fixed Card header not showing when title empty or not set (#1031)
  • Fixed an issue on Chrome when you use a TextField inside Collapsible which is inside a scrollable element, the text disappeared if you focused a fully hidden TextField (#1047)

Documentation

  • Added accessibility documentation for the button and link components (#924)
  • Added accessibility recommendations for the text field and autocomplete components (#968)

Development workflow

  • 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)

v3.7.1

12 Feb 19:59
Compare
Choose a tag to compare

Bug fixes

  • Moved character counter to bottom of multiline text input (#992)
  • Aligned TopBar search input and results with page content (#1008)

Documentation

v3.7.0

11 Feb 21:59
Compare
Choose a tag to compare

Enhancements

  • 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 accept React.ReactNode as title (#781)
  • Added contextControl prop to TopBar and Navigation (#966)

Bug fixes

  • Fixed Collapsible to use overflow: 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 passing null to value (#964) (thanks @mbaumbach for the original issue)
  • Changed the default value for showHidden prop on ResourcePicker 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)

Documentation

  • 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)

Development workflow

  • Fixed links to Polaris component pages in story descriptions (#933)

Dependency upgrades

  • Upgraded to @shopify/polaris-icons v2.0.0 (#982)

Code quality

  • Updated import styles from './foo.scss'; from non-standard import * 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)

v3.6.0

30 Jan 22:19
Compare
Choose a tag to compare

Enhancements

  • TextField accepts a showCharacterCount prop to enable the display of character count (#709)

Bug fixes

  • Fixed vertical misalignment in Banner.Header(#870)
  • Removed a duplicate activatorWrapper in Popover when destructuring props (#916)
  • Fixed Banner secondaryAction content wrapping in Firefox (#719)
  • Added onKeyPress, onKeyDown, and onKeyUp to Button (#860)
  • Added monochrome prop to Button and Link component (#821)
  • Updated Frame layout and made TopBar.UserMenu visible on mobile (#852)
  • Added a forceRender prop to Page to not delegate to the app bridge TitleBar action (#695)
  • Changed Tabs example to contain children so the Panel 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)

Documentation

  • 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)

Development workflow

  • 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)

Dependency upgrades

  • Updated App Bridge to version 1.0.3 (#844)

Deprecations

  • Deprecated Navigation.UserMenu in favor of TopBar.UserMenu (#849)
  • Deprecated Navigation’s userMenu prop (#930)

v3.5.0

23 Jan 14:40
Compare
Choose a tag to compare

Enhancements

  • Update build toolchain to use Babel v7, PostCSS v7 and Rollup v1. Update our build targets match our supported browsers, leading to a reduction in bundle size (#837)

Bug fixes

  • Ensure disabled Button components with a url 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 support env and constant (#881)

Documentation

  • Added deprecation guidelines (#853)

Development workflow

  • 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)
  • Ensure CSS builds are reproducible (#869)