Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Page separator prop as pages never have a separator #3918

Merged
merged 1 commit into from
Jan 26, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- Removed `button-filled-disabled` and `plain-button-background` SASS mixins ([#3817](https://github.com/Shopify/polaris-react/pull/3817))
- Removed `text-emphasis-placeholder` SASS mixin ([#3889](https://github.com/Shopify/polaris-react/pull/3889))
- Removed `plain` property in `Pagination` as it no longer has any effect. ([#3833](https://github.com/Shopify/polaris-react/pull/3833))
- Removed `separator` property in `Page` as it no longer has any effect. ([#3918](https://github.com/Shopify/polaris-react/pull/3918))

### Enhancements

Expand Down
18 changes: 0 additions & 18 deletions src/components/Page/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ keywords:
- full-width page
- narrow-width page
- page with action groups
- page with separator
- outer wrapper
- page actions
- page layouts
Expand Down Expand Up @@ -174,7 +173,6 @@ Use for detail pages, which should have pagination and breadcrumbs, and also oft
hasNext: true,
}}
additionalNavigation={<Avatar size="small" initials="CD" customer={false} />}
separator
>
<p>Page content</p>
</Page>
Expand Down Expand Up @@ -430,22 +428,6 @@ Use action groups for sets of actions that relate to one another, particularly w
</Page>
```

### Page with separator

<!-- example-for: web -->

Use a separator for pages that have an [empty state](https://polaris.shopify.com/components/structure/empty-state) as their only content, or that have an [annotated section](https://polaris.shopify.com/components/structure/layout) as the first component on the page.

```jsx
<Page title="Settings" separator>
<Layout>
<Layout.AnnotatedSection title="Store details">
<p>Annotated section content</p>
</Layout.AnnotatedSection>
</Layout>
</Page>
```

### Page with content after title (title metadata)

<!-- example-for: web -->
Expand Down
5 changes: 0 additions & 5 deletions src/components/Page/components/Header/Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ $action-menu-rollup-computed-width: rem(40px);
position: relative;
}

.separator {
padding-bottom: spacing();
border-bottom: var(--p-override-none);
}

.titleHidden {
@include visually-hidden;
}
Expand Down
4 changes: 0 additions & 4 deletions src/components/Page/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ interface PrimaryAction
export interface HeaderProps extends TitleProps {
/** Visually hide the title */
titleHidden?: boolean;
/** Adds a border to the bottom of the page header */
separator?: boolean;
/** Primary page-level action */
primaryAction?: PrimaryAction | React.ReactNode;
/** Page-level pagination */
Expand Down Expand Up @@ -72,7 +70,6 @@ export function Header({
additionalMetaData,
thumbnail,
titleHidden = false,
separator,
primaryAction,
pagination,
additionalNavigation,
Expand Down Expand Up @@ -148,7 +145,6 @@ export function Header({

const headerClassNames = classNames(
styles.Header,
separator && styles.separator,
isSingleRow && styles.isSingleRow,
titleHidden && styles.titleHidden,
navigationMarkup && styles.hasNavigation,
Expand Down