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

fix(patterns): fix page width to occupy available space #1532

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

davelinke
Copy link
Contributor

What?

Fixed the page width css for page to occupy the available width instead of hugging contents

Why?

To avoid pages to be shrunk to the center of the screen misaligned with action bar and having a consistent experience

Screenshots/Screen Recordings

Before

buggy-page

After

corrected-page

Testing/Proof

dev.tsx code
import { Page, Header, ActionBar } from '@bigcommerce/big-design-patterns';
import { Panel, Text } from '@bigcommerce/big-design';
import { AddIcon } from '@bigcommerce/big-design-icons';

const PageWithActionBar = () => {
  return (
    <Page
      actionBar={
        <ActionBar
          actions={[
            {
              text: 'Main action',
              variant: 'primary',
            },
            {
              text: 'Dismiss',
              variant: 'subtle',
            },
          ]}
        />
      }
      header={
        <Header
          actions={[
            {
              text: 'Secondary',
              variant: 'secondary',
              iconLeft: <AddIcon />,
            },
          ]}
          description="Page description (optional)"
          title="Page with action bar"
        />
      }
    >
      <Panel header="Page contents">
        <Text>Hello</Text>
      </Panel>
    </Page>
  );
};

export default PageWithActionBar;

@davelinke davelinke requested review from a team as code owners September 11, 2024 19:32
Copy link

changeset-bot bot commented Sep 11, 2024

🦋 Changeset detected

Latest commit: 1c4a27a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@bigcommerce/big-design-patterns Patch
@bigcommerce/docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@davelinke davelinke merged commit 66bc0c8 into main Sep 12, 2024
12 checks passed
@davelinke davelinke deleted the fix/page-width branch September 12, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants