-
Notifications
You must be signed in to change notification settings - Fork 541
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
PageLayout: add @deprecated
notice to PageLayout.Pane
position
prop
#3597
Conversation
🦋 Changeset detectedLatest commit: bb09614 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
size-limit report 📦
|
@siddharthkp should we take the implementation changes back (everything on PageLayout.tsx except the deprecation notice) and can tackle how to introduce the actual deprecation in a follow up PR? Reasons for that proposal:
Thoughts?? cc @radglob |
Oh funny thing is that I just saw that we have a task to re-order the |
Since warnings break in dotcom, we need another way to communicate that these changes need to be made. There's a PR merged into |
This comment was marked as duplicate.
This comment was marked as duplicate.
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.
accidently approved the changes - I only wanted to leave comment. So taking it back! Sorry.
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.
No worries @radglob! We removed the warnings as well because they were breaking as you said (#3545) but without the warnings, it still breaks dotcom. (Reference is the screenshot in the description and the pane moved to the right side but supposed to be on the left)
There's a PR merged into next-major that completely removes support for position.
This is great!
Since warnings break in dotcom, we need another way to communicate that these changes need to be made.
We have TS @deprecated
annotation and this should be a good way to communicate the deprecation.
I feel like there is really not much else to do here. (Unless I am missing something). We can only release the @deprecated
annotation in this PR and worry about the rest of the changes in the major release but seems like we already have a branch to merged to next-major
to remove the support for position
so maybe we are all good?
Yeah, that makes sense to me. |
src/PageLayout/PageLayout.tsx
Outdated
@@ -530,7 +564,7 @@ const Pane = React.forwardRef<HTMLDivElement, React.PropsWithChildren<PageLayout | |||
{ | |||
'aria-label': label, | |||
'aria-labelledby': labelledBy, | |||
position: responsivePosition = 'end', | |||
position: responsivePosition = undefined, |
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 think we should drop these changes for handling an undefined
position prop. It adds extra complexity, and "end"
is a reasonable default since everything should just flow as it would by source position alone.
The TS deprecation warning is enough to get the point across until next-major
is merged in (which fully removes support for this).
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.
Agreed! I also think we won't need the other implementation changes in this minor PR since we are only introducing a deprecation notice. Am I missing anything? I pushed a commit to take all them back and leave only the docs and deprecation notice but let me know what you think and if the other changes needed as well! @radglob
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.
Yeah, that sounds right to me.
55b51a2
to
f3f56d3
Compare
@deprecated
notice to PageLayout.Pane
position
prop
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days. |
Bump, is this something we want to revive or should we close? @broccolinisoup what do you think? |
Thanks @lesliecdubs for the ping! This was supposed to be realised in a minor version until we remove the @joshblack Do you think it still worths to release the |
Just had a chat with @joshblack and it is better to close this PR because removing the |
UPDATED DESCRIPTION: We are only adding
@deprecated
TS annotation to theposition
prop in this PR due to the reasons mentioned below. We also updated the docs accordingly to encourage to drop the usage of theposition
prop.warning
for the deprecatedposition
prop #3545 by @broccolinisoupReasons for revert, copied from #3589:
warning
for the deprecatedposition
prop #3545 because that was built on top of 3389We would need to bring this change back in a way that it allows new behaviour without breaking existing behaviour.
Important: It seems like the same pull request number is also merged in next-major? Link to next-major release tracking That seems very fishy? Was this not supposed to be in main at all?