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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☠️ GridSplitter refactor w/ new base class #4463

Closed

Conversation

XAML-Knight
Copy link
Contributor

@XAML-Knight XAML-Knight commented Jan 21, 2022

Update: for those following along at home, check out the new residence of this refactoring effort: michael-hawker#3

Follow up to #4083

PR Type

What kind of change does this PR introduce?

 Refactoring (no functional changes, no api changes)

What is the current behavior?

The pair of controls GridSpliter and ContentSizer share a lot of the same functionality.

What is the new behavior?

The plan is to refactor out all the common base functionality of GridSplitter & ContentSizer, and add them to a common base class (SplitBase).

Also includes, but is not limited to, the following updates:

  • Resizing is now functional when starting from the right or bottom edge (previously, resizing only worked from left and top)
     - Addressed by adding a new bool variable InvertDragDirection
  • AutomationProperty for unit tests added
  • Set proper gripper character based on resizing direction and remove reliance upon gripper wrapper class

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • New component
    • Pull Request has been submitted to the documentation repository instructions. Link:
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • If control, added to Visual Studio Design project
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • 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

Other information

michael-hawker and others added 18 commits January 20, 2022 15:36
Content Sizer Issues:
- [ ] TargetControl isn't loaded yet causes problems (Expander Issue)
- [ ] Size Direction needs to be more specific (only works Left/Top, not Right/Bottom)
- [ ] Do we support 'Auto'?
- [ ] Need to set Automation Property Name in Code-Behind
- [ ] Content Initial value as binding converter to ResizeDirection?
Bonus also fixes issue with sample loading the first time...
Allows for access to VisualTree within UI Test
Uses System.Test.Json serialization to return UI object info between host/harness
Added intial basic GridSplitter tests to validate (though unsure why there's such a large variance in delta from drag... test is reporting moved the right number of requested pixels, so not sure if issue with delta vs. completed in GridSplitter itself)
@ghost
Copy link

ghost commented Jan 21, 2022

Thanks XAML-Knight for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker and azchohfi January 21, 2022 00:33
@XAML-Knight
Copy link
Contributor Author

Rebase issue; will submit this branch again after resolving rebase

@XAML-Knight XAML-Knight changed the title GridSplitter refactor w/ new base class ☠️ GridSplitter refactor w/ new base class Jan 21, 2022
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.

2 participants