Skip to content

GridSplitter - Fixed issue where the grid would overflow when resizing columns with minimum width #2018

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

Closed
wants to merge 9 commits into from

Conversation

kbrons
Copy link
Contributor

@kbrons kbrons commented Apr 25, 2018

Issue: #1894

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

When resizing columns on a grid with one or more automatic width columns with minimum width, the grid starts getting bigger and ultimately overflows.

bug

What is the new behavior?

The resizing stops whenever the minimum width of any automatic width column would be violated.

fixed

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features)
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@skendrot
Copy link
Contributor

skendrot commented Apr 25, 2018

If the bottom gif is the new behavior it's still wrong. The Grid should not expand on the right if you're dragging from the left. Likewise if dragging from the right it shouldn't move the left "wall"

@kbrons
Copy link
Contributor Author

kbrons commented Apr 25, 2018

This fix is for a specific case having two automatic width columns (left and right) and a fixed width column (center) that provoked an overflow of the grid. Investigating some more, the behavior you are describing happens when all the columns have automatic width (gif below).

all automatic scenario

The thing is, that behavior wasn't correctly defined or implemented for the case of this fix, nor the case where all the columns have a fixed width (gif below).

all fixed scenario

Taking that into account, I think the behavior of the component should be redefined and reworked, along with all the configurations of the control tested to make sure they follow that behavior.
I think that the best would be to create a new issue to redefine this component's behavior and split the efforts.

@skendrot
Copy link
Contributor

The problem is ultimately the same, columns with the auto width and min width. There is essentially one bug causing more than one issue. It would be best to fix the issue with auto width and min width set

Copy link
Contributor

@skendrot skendrot left a comment

Choose a reason for hiding this comment

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

The problem is ultimately the same, columns with the auto width and min width. There is essentially one bug causing more than one issue. It would be best to fix the issue with auto width and min width set

@kbrons
Copy link
Contributor Author

kbrons commented May 18, 2018

I've been taking a look at the code and testing some stuff, and found that leaving only this part of the column resizing logic, everything seems to be working at first glance. Does anyone know why the code for resizing when the current or sibling columns have fixed width was added?

This is the logic that I was testing out (along with checking that neither the current and sibling column are null).

image

@nmetulev nmetulev added this to the 3.1 milestone May 21, 2018
@nmetulev
Copy link
Contributor

Thanks @kbrons for researching this. Moving to 3.1 - let's revisit this in more details once we ship 3.0

@kbrons
Copy link
Contributor Author

kbrons commented Jul 2, 2018

How should we continue with this issue? Should I keep investigating a better solution to take care of the underlying issues?

@nmetulev nmetulev modified the milestones: 3.1, 4.0 Jul 11, 2018
@windowstoolkitbot
Copy link

This PR seems inactive. @kbrons Do you need help to complete this issue?

2 similar comments
@windowstoolkitbot
Copy link

This PR seems inactive. @kbrons Do you need help to complete this issue?

@windowstoolkitbot
Copy link

This PR seems inactive. @kbrons Do you need help to complete this issue?

@jamers99
Copy link

When will this be merged into master and released? We're experiencing this issue in our app and would like it fixed!

@kbrons
Copy link
Contributor Author

kbrons commented Mar 20, 2019

@michael-hawker we should discuss this for the next release

@Kyaa-dost
Copy link
Contributor

I am still seeing a similar behavior and no change on my end. This is something I can talk to @michael-hawker and will test out more.

@michael-hawker michael-hawker added this to the 7.0 milestone Mar 17, 2020
@michael-hawker
Copy link
Member

As part of the #3062 I'd like to refactor GridSplitter, so I'll try and re-map these scenarios on top of that while testing.

@michael-hawker
Copy link
Member

Going to close this and factor in these discussions during the refactor of GridSplitter.

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

Successfully merging this pull request may close these issues.

8 participants