Skip to content

SkeletonPage Header content is not laid out as expected #5241

@peterlazzarino

Description

@peterlazzarino

Issue summary

When using SkeletonPage, the primaryAction and secondaryActions are not laid out in a way that's consistent with the Page component on a large screen.

Expected behavior

The SkeletonPage component should approximate the layout and content that will be displayed once loading is complete.

Page Header with one secondaryAction and primaryAction on desktop

Screen Shot 2022-03-08 at 2 56 17 PM

Actual behavior

SkeletonPage Header with one secondaryAction and primaryAction on desktop

  • secondaryAction displays on second row

Screen Shot 2022-03-08 at 2 55 48 PM

  • images illustrating that the primaryAction doesn't fit within the parent and results in content that is not vertically aligned as it is with Page

Screen Shot 2022-03-08 at 2 54 49 PM

Screen Shot 2022-03-08 at 2 54 53 PM

Steps to reproduce the problem

See difference in code sandbox below.

Reduced test case

Skeleton Page
Page

Specifications

  • Are you using the React components? (Y/N): Y
  • Polaris version number: 8.2.2
  • Browser: Chrome
  • Device: M1 Mac
  • Operating System: OSX

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/polaris to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken and not working as intended in the system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions