Skip to content

Commit 3b0f5e9

Browse files
authored
[Page][Breadcrumbs] Deprecate title and backAction props (#13605)
### WHY are these changes introduced? Resolves [polaris#769](shop/issues-polaris-internal#769). Resolves [polaris#16](shop/issues-polaris-internal#16). ### WHAT is this pull request doing? Deprecates the following: - `Page.Title` component `title` prop - `Page.Header` component `backAction` prop - `Breadcrumbs` component `backAction` prop ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) ### 🎩 checklist - [ ] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
1 parent 69d419d commit 3b0f5e9

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

.changeset/curly-mails-shout.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': minor
3+
---
4+
5+
Deprecated `title` prop in `Page.Title` and `backAction` prop in `Page.Header` and `Breadcrumbs`

polaris-react/src/components/Breadcrumbs/Breadcrumbs.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import {handleMouseUpByBlurring} from '../../utilities/focus';
66
import {Button} from '../Button';
77

88
export interface BreadcrumbsProps {
9-
/** Back action link */
9+
/**
10+
* @deprecated Back action link
11+
* Use `breadcrumbs` prop instead as documented [here](https://shopify.dev/docs/api/app-bridge/previous-versions/actions/titlebar#using-titlebar-with-polaris)
12+
*/
1013
backAction: CallbackAction | LinkAction;
1114
}
1215

polaris-react/src/components/Page/components/Header/Header.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ export interface HeaderProps extends TitleProps {
5757
primaryAction?: PrimaryAction | React.ReactNode;
5858
/** Page-level pagination */
5959
pagination?: PaginationProps;
60-
/** A back action link */
60+
/**
61+
* @deprecated A back action link
62+
* Use `breadcrumbs` prop instead as documented [here](https://shopify.dev/docs/api/app-bridge/previous-versions/actions/titlebar#using-titlebar-with-polaris)
63+
*/
6164
backAction?: BreadcrumbsProps['backAction'];
6265
/** Collection of secondary page-level actions */
6366
secondaryActions?: MenuActionDescriptor[] | React.ReactNode;

polaris-react/src/components/Page/components/Header/components/Title/Title.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import {Text} from '../../../../../Text';
77
import styles from './Title.module.css';
88

99
export interface TitleProps {
10-
/** Page title, in large type */
10+
/**
11+
* @deprecated Page title, in large type
12+
* Use `breadcrumbs` prop instead as documented [here](https://shopify.dev/docs/api/app-bridge/previous-versions/actions/titlebar#using-titlebar-with-polaris)
13+
*/
1114
title?: string;
1215
/** Page subtitle, in regular type */
1316
subtitle?: string;

0 commit comments

Comments
 (0)