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

MasterDetailsView Windows 10X and Two-pane view support #3173

Closed
wants to merge 13 commits into from
Closed

MasterDetailsView Windows 10X and Two-pane view support #3173

wants to merge 13 commits into from

Conversation

COM8
Copy link
Contributor

@COM8 COM8 commented Mar 18, 2020

PR Type

What kind of change does this PR introduce?

  • Feature
  • Documentation content changes

What is the current behavior?

The MasterDetailsView does not take advantage of multiple screens on Windows 10X devices.

What is the new behavior?

The new and refactored MasterDetailsView control is aware of multiple screens when used on Windows 10X devices.
We archive this by replacing the current grid-based layout with the new Two-pane view based layout.

Additional changes

  • I added additional properties: DetailsPaneBackground, DetailsContentTemplateSelector, MasterNoItemsContent, MasterNoItemsContentTemplate and MasterItemTemplateSelector.
  • I added a new NuGet dependency: Microsoft.UI.Xaml to the Microsoft.Toolkit.Uwp.UI.Controls so I would be able to use the TwoPaneView class regardlessof the current Windows 10 version. Need feedback here!
  • Due to the new NuGet package I had to increment the TargetPlatformVersion from 10.0.17763.0 to 10.0.18362.0
  • I updated the bug_report.md template to reflect these changes.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Old behavior

Old Toolkit

New behavior

New Toolkit

@ghost
Copy link

ghost commented Mar 18, 2020

Thanks COM8 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 assigned azchohfi Mar 18, 2020
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.

This PR is very difficult to review within GitHub due to items being moved around. Please move properties, methods, member variables, etc. to their original locations

@@ -15,6 +15,26 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
/// <seealso cref="Windows.UI.Xaml.Controls.ItemsControl" />
public partial class MasterDetailsView
{
/// <summary>
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like properties have been moved around. This is making it really difficult to see what actually changed. Can you put the properties back in the order they were originally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. I will work on it tomorrow.
I've rearranged them to make them a little more logical.

Copy link
Contributor

Choose a reason for hiding this comment

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

That could be done as a separate "no functional change" PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I've rearranged them.

@ghost
Copy link

ghost commented Mar 18, 2020

This PR has been marked as "needs attention 👋" and awaiting a response from the team.

// Control names:
private const string PartRootPane = "RootPane";
private const string PartDetailsPresenter = "DetailsPresenter";
private const string PartDetailsPane = "DetailsPane";
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not change the names of the panels in the view

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@skendrot
Copy link
Contributor

I have unchecked the Contains NO breaking changes option in the PR. This change does introduce a breaking change. Anyone that has styled the control at all will no longer be able to use it

@michael-hawker
Copy link
Member

@COM8 this is an amazing idea, thanks for submitting this PR. However, I know we're not going to want to take a dependency in our main package on WinUI yet until we move to WinUI 3 #3106. So, we'll have to figure out how to coordinate this with a potential preview later this summer...

@COM8
Copy link
Contributor Author

COM8 commented Mar 19, 2020

@michael-hawker OK, good to know.
Let me know if I can help in any way here.

@michael-hawker
Copy link
Member

Just adding do not merge label so we can keep track with our WinUI 3 work later.

@ghost ghost removed the needs attention 👋 label Aug 19, 2020
@COM8 COM8 changed the title [WIP] MasterDetailsView Windows 10X and Two-pane view support MasterDetailsView Windows 10X and Two-pane view support Aug 20, 2020
@michael-hawker michael-hawker marked this pull request as draft September 18, 2020 20:33
@michael-hawker
Copy link
Member

Converting to Draft as we need to wait until we're working towards WinUI 3 and take the WinUI dependency.

@michael-hawker
Copy link
Member

@COM8 just wanted to give you an update since it's been a while and the WinUI 3 shift has changed some of our plans in the Toolkit.

I think in one of our upcoming releases this year, we'll be considering adding a dependency on WinUI 2.x. At that time we can bring this PR forward and get it merged in. I'll keep you posted.

@COM8
Copy link
Contributor Author

COM8 commented Jan 13, 2021

Cool. Thanks for the update.

@michael-hawker
Copy link
Member

@COM8 we have decided to take a dependency on WinUI 2.x. So this PR doesn't have to wait for any WinUI 3 work anymore. It's too late for our upcoming 7.0, but we can get it scheduled for a future release.

We have done some refactors since moving controls around, so this will need to be rebased/updated on the current main branch.

Was there many things left or was this otherwise ready to go, once things are rebased?

I think the main thing for us will just be how we time releasing it if we're significantly changing the API surface of the control itself. If it's mainly style/internal changes, we'll have to evaluate if we want that in a minor release or not.

@COM8
Copy link
Contributor Author

COM8 commented Feb 19, 2021

Glad to hear!
Since there a so many changes I will work on a new PR for this.
There doesn't really change too much besides the layout change, I added only a couple of properties, like described above.

@COM8 COM8 closed this Feb 19, 2021
@COM8
Copy link
Contributor Author

COM8 commented Feb 19, 2021

Otherwise the PR and documentation MicrosoftDocs/WindowsCommunityToolkitDocs#304 were ready to go.

@COM8 COM8 mentioned this pull request Feb 19, 2021
8 tasks
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.

4 participants