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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EmptyState] Remove legacy styles from empty state within page context #4140

Merged
merged 2 commits into from
May 25, 2021

Conversation

szuchnik
Copy link
Contributor

@szuchnik szuchnik commented Apr 26, 2021

WHY are these changes introduced?

Empty state was not centering its components within page context, due to styles from before new design language still being applied. The repositioning of the image seems to be an echo of the time when EmptyState was laid out in two columns.

The image above is the previous state, below you can see how this component will look after the update.

Fixes #0000

WHAT is this pull request doing?

Remove condition applying styles from old design language and associated style rules. Add documentation for page context usecase.

How to 馃帺

馃枼 Local development instructions
馃棐 General tophatting guidelines
馃搫 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}

馃帺 checklist

  • Tested on mobile
  • Tested on multiple browsers
  • Tested for accessibility
  • Updated the component's README.md with documentation changes
  • Tophatted documentation changes in the style guide
  • For visual design changes, pinged one of @鈥奌YPD, @鈥妋irualves, @鈥妔arahill, or @鈥妑y5n to update the Polaris UI kit

@szuchnik szuchnik self-assigned this Apr 26, 2021
@ghost
Copy link

ghost commented Apr 26, 2021

馃憢 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven鈥檛 already, please check out the contributing guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 26, 2021

馃煝 This pull request modifies 3 files and might impact 1 other files.

Details:
All files potentially affected (total: 1)
馃搫 UNRELEASED.md (total: 0)

Files potentially affected (total: 0)

馃帹 src/components/EmptyState/EmptyState.scss (total: 1)

Files potentially affected (total: 1)

馃З src/components/EmptyState/EmptyState.tsx (total: 0)

Files potentially affected (total: 0)

Copy link
Contributor

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think these changes are good, but one important thing to note is that all empty states should be nested within cards if they're going onto a page. This is the new pattern after the new design language shipped.

I think the changes are worth making but I wouldn't include the story example because that's not a pattern we want to see start to emerge / deviate.

@szuchnik
Copy link
Contributor Author

Overall I think these changes are good, but one important thing to note is that all empty states should be nested within cards if they're going onto a page. This is the new pattern after the new design language shipped.

I think the changes are worth making but I wouldn't include the story example because that's not a pattern we want to see start to emerge / deviate.

Example removed! The usage within page context is coming from outside of admin, hence the difference in design patterns :)

Copy link
Contributor

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃憦 Thanks @szuchnik !

@szuchnik
Copy link
Contributor Author

/shipit

@github-actions
Copy link
Contributor

size-limit report

Path Size
cjs 141.85 KB (+0.01% 馃敽)
esm 95.43 KB (-0.02% 馃斀)
esnext 138.57 KB (-0.1% 馃斀)
css 33.68 KB (-0.28% 馃斀)

@szuchnik
Copy link
Contributor Author

/shipit

@szuchnik szuchnik merged commit 7aba117 into main May 25, 2021
@szuchnik szuchnik deleted the empty-state-page-context branch May 25, 2021 07:59
@ghost
Copy link

ghost commented May 25, 2021

馃帀 Thanks for your contribution to Polaris React!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants