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

Split out Controls.Primitives package. #3660

Merged
merged 17 commits into from
Jan 13, 2021
Merged

Split out Controls.Primitives package. #3660

merged 17 commits into from
Jan 13, 2021

Conversation

Rosuavio
Copy link
Contributor

@Rosuavio Rosuavio commented Jan 6, 2021

Step towards #3594

Split out AdaptiveGridView, DockPanel, StaggeredPanel, SwitchPresenter, UniformGrid, and WrapPanel to a new project Microsoft.Toolkit.Uwp.UI.Controls.Primitives.

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

All of our controls are in a singular Microsoft.Toolkit.Uwp.UI.Controls package. For consumers to get anyone package they have to pull in the whole package with all the controls and all there dependencies.

What is the new behavior?

AdaptiveGridView, DockPanel, StaggeredPanel, SwitchPresenter, UniformGrid, and WrapPanel are in Microsoft.Toolkit.Uwp.UI.Controls.Primitives.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • 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

@ghost
Copy link

ghost commented Jan 6, 2021

Thanks RosarioPulella 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 🙌

@Rosuavio
Copy link
Contributor Author

Rosuavio commented Jan 7, 2021

@michael-hawker Do you think we need to split out the the Controls.Design project also?

@Rosuavio
Copy link
Contributor Author

Rosuavio commented Jan 8, 2021

For the Control.Primitives package, it seems we already have some classes in that namespace that we were not planning to move to that package.

Public classes...

  • ColorPickerSlider
  • DataGridCellsPresenter
  • DataGridColumnHeader
  • DataGridColumnHeadersPresenter
  • DataGridDetailsPresenter
  • DataGridFrozenGrid
  • DataGridRowHeader
  • DataGridRowsPresenter

And an internal class,
DataGridColumnHeaderInteractionInfo

@Rosuavio Rosuavio added help wanted Issues identified as good community contribution opportunities in progress 🚧 needs attention 👋 labels Jan 8, 2021
@michael-hawker
Copy link
Member

@michael-hawker Do you think we need to split out the the Controls.Design project also?

I've been wondering about this. I would assume we may need to. @azchohfi do you know how these get bundled? They're just included in the package somehow right?

I don't know if it'd be weird to keep the aggregated one and only have Design support if you have the full package? As soon as you'd split into the smaller packages nothing would work in VS, right?

@ghost ghost removed the needs attention 👋 label Jan 8, 2021
@michael-hawker
Copy link
Member

For the other classes already in the namespace. I think that's ok? Those are all more helpers to other controls and probably aren't going to be invoked individually?

@Rosuavio
Copy link
Contributor Author

Rosuavio commented Jan 8, 2021

So I split out a Controls.Primitive.DesingTools project, in b6ca5af. I tried to fallow the patterns I could find.

@Rosuavio Rosuavio changed the base branch from master to dev/split-controls January 12, 2021 17:16
@Rosuavio Rosuavio changed the title [WIP] Split controls package [WIP] Split out Controls.Primitives package. Jan 12, 2021
@Rosuavio Rosuavio added the for-review 📖 To evaluate and validate the Issues or PR label Jan 12, 2021
@Rosuavio Rosuavio changed the title [WIP] Split out Controls.Primitives package. Split out Controls.Primitives package. Jan 12, 2021
@Rosuavio Rosuavio marked this pull request as ready for review January 12, 2021 17:22
Comment on lines 11 to 12
[assembly: InternalsVisibleTo("UnitTests.UWP")]
[assembly: InternalsVisibleTo("UnitTests.XamlIslands.UWPApp")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know much about how XamlIslands works, do you think we need this for the primitives, @michael-hawker?

Copy link
Member

Choose a reason for hiding this comment

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

This is just exposing it to the XamlIslands tests, so we probably need to tweak those and the Unit Tests as well if they touch these controls?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like the xmal islands test worked just fine without that line.

@Rosuavio
Copy link
Contributor Author

If you don't mind @Nirmal4G reviewing my DesignTools related changes it would appreciated.

@Nirmal4G
Copy link
Contributor

Sure @RosarioPulella

Copy link
Contributor

@Nirmal4G Nirmal4G left a comment

Choose a reason for hiding this comment

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

All good here.


<ItemGroup>
<None Include="VisualStudioToolsManifest.xml" Pack="true" PackagePath="tools" />
<None Include="$(OutDir)\Design\$(MSBuildProjectName).Design*.dll;$(OutDir)\Design\$(MSBuildProjectName).Design*.pdb" Pack="true" PackagePath="lib\$(TargetFramework)\Design" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of Design*, we can use DesignTools as we are not relying on older system anymore. But it's okay now as I still have some cleanup to do with the Design projects.

I'll take it up as part of my next PR. so don't worry about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured we were going to make that change but I did not want to jump the gun. Thanks @Nirmal4G C:

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

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

Seems to work great, thanks Rosario!

Let's merge this into the dev branch and focus on the next one! 🎉🎉🎉

@ghost
Copy link

ghost commented Jan 13, 2021

Hello @michael-hawker!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@michael-hawker
Copy link
Member

Thanks for helping take a look at this @Nirmal4G, much appreciate your expertise in this area!

@michael-hawker michael-hawker merged commit fc221a7 into CommunityToolkit:dev/split-controls Jan 13, 2021
@Rosuavio Rosuavio deleted the split-controls branch January 14, 2021 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merge ⚡ for-review 📖 To evaluate and validate the Issues or PR help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Split up the controls package.
3 participants