-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[v4][Page] Narrow width page #1606
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
Conversation
2e7d6f3
to
2596cf9
Compare
2596cf9
to
0e3f2e5
Compare
} | ||
|
||
export type ComposedProps = Props & WithAppProviderProps; | ||
export interface DeprecatedProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to, we could parse for this interface in the style guide (see bottom of the screenshot)
export type ComposedProps = Props & WithAppProviderProps; | ||
export interface DeprecatedProps { | ||
/** Decreases the maximum layout width. Intended for single-column layouts | ||
* @deprecated As of release 4.0, replaced by {@link https://polaris.shopify.com/components/structure/page#props-narrow-width} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't currently use these tags in the style guide, but ids should be added to the props none the less
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this as well—using the correct tags and following standards. That way it is there if we want to support it in the future and/or change to tool we used to parse this.
} | ||
|
||
export default withAppProvider<Props>()(Page); | ||
export default withAppProvider<Props & DeprecatedProps>()(Page); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Props & DeprecatedProps>
is our public API
it('warns the singleColumn prop has been renamed', () => { | ||
const warningSpy = jest | ||
.spyOn(console, 'warn') | ||
.mockImplementation(() => {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking the warning spam in our test output
0e3f2e5
to
f39c5a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I like it |
WHY are these changes introduced?
Fixes #1572
@tmlayton For documentation, what do you think about sectioning out deprecated props rather than removing them? Where
Deprecated Props
could be ourDeprecatedProps
interface?