Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/curvy-cats-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Page component: display subtitle even when it's the only header prop set
1 change: 1 addition & 0 deletions polaris-react/src/components/Page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function Page({

const hasHeaderContent =
(rest.title != null && rest.title !== '') ||
(rest.subtitle != null && rest.subtitle !== '') ||
rest.primaryAction != null ||
(rest.secondaryActions != null &&
((isInterface(rest.secondaryActions) &&
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/src/components/Page/tests/Page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('<Page />', () => {
describe('subtitle', () => {
it('gets passed into the <Header />', () => {
const subtitle = 'Subtitle';
const page = mountWithApp(<Page {...mockProps} subtitle={subtitle} />);
const page = mountWithApp(<Page subtitle={subtitle} />);
expect(page).toContainReactComponent(Header, {
subtitle,
});
Expand Down