-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix Vertical Stepper Line Interruption by Content #160177
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 Vertical Stepper Line Interruption by Content #160177
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
nate-thegrate
left a comment
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.
@ayyoub-coder thank you so much!
Unfortunately I didn't notice you'd contributed a fix before I started working on it myself.
I have a slight preference toward avoiding Container objects, but I also appreciate the effort you put into this fix. I've opened #160193, but we can merge your change instead if you add a regression test and make sure all checks are passing.
Thanks again!
…t (Borrowed the test implementation from PR flutter#160193 authored by [Nate Wilson])
@nate-thegrate Thank you for reviewing my PR and providing valuable feedback! I noticed the test you authored in PR #160193 for verifying the connector line in the vertical Stepper widget. Thanks again for your great work! |
|
Thanks again @ayyoub-coder for your fantastic contribution!
Visual representation of number 2: // this PR
PositionedDirectional
└── SizedBox
└── Center
└── ConstrainedBox
└── ColoredBox
└── LimitedBox
└── ConstrainedBox
// other PR
PositionedDirectional
└── Center
└── SizedBox
└── ColoredBoxThe good first issue label might be worth checking out—next time you open a pull request, feel free to |
@ayyoub-coder gave a fantastic summary of the problem in #160177: if a `Container` doesn't have a child or unbounded constraints, it will expand to fill its parent, whereas a `ColoredBox` defaults to zero size. I also noticed that in the main branch, the `PositionedDirectional` widget has an unused `width` parameter, and instead builds a `SizedBox` child for it. This pull request cleans up the `Stepper` subtree a bit and allows the connector to display properly. fixes #160156
|
Thank you so much for your kind words and detailed explanation, @nate-thegrate! I really appreciate the time and effort you’ve put into reviewing my PR and providing such insightful feedback. I completely understand the rationale for moving forward with #160193—it’s a more efficient and streamlined approach. While I’m a bit disappointed that this PR won’t be merged, I’m grateful for the learning experience and the chance to contribute. I’ll definitely explore the "good first issue" label and take you up on your generous offer to help with my next PR. It means a lot to know that you’re willing to support and guide me through future contributions. Thanks again for everything! I look forward to collaborating with you on future Flutter improvements. |
Fix Vertical Stepper Line Interruption by Content
This PR addresses an issue where the vertical stepper line is interrupted by its content (#160156).
Problem
ColoredBoxBehavior: When used,ColoredBoxrequires wrapping it with aSizedBox, asSizedBoxdefaults to a zero size when no dimensions are specified.ContainerComparison: UnlikeSizedBox,Containerautomatically expands to fit its parent's constraints, resulting in a more intuitive layout.Solution
SizedBoxis used.Containerautomatically expands to fit its parent's constraints.Related Issue