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

Add missing controls to Visual Studio Toolbox #4070

Merged
3 commits merged into from
Aug 13, 2021

Conversation

Nirmal4G
Copy link
Contributor

@Nirmal4G Nirmal4G commented Jun 17, 2021

Fixes #3620

  • Adds almost all the Controls in the toolkit packages to the Visual Studio Toolbox.
  • Fixes Markdown controls not appearing on the toolbox (due to incorrect assembly naming).
  • Fixes controls appearing in WPF category of the toolbox (due to UIFramework not mentioned).
NOTE

When you have more than one version of controls packages containing VisualStudioToolsManifest.xml installed, you might see an entry for each version of the controls listed in the manifest. You can see the dicusssion below to know more.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Build or CI related changes

What is the current behavior?

Many controls don't appear in the VS IDE Toolbox.

What is the new behavior?

The Controls now appear in the VS IDE Toolbox.

PR Checklist

Please check if your PR fulfils the following requirements:

  • Tested code with current supported SDKs
  • Contains NO breaking changes

Other information

  • If you're editing this patch tree, please rebase on latest HEAD and then commit, without updating from the latest HEAD.
  • When merging, please update the commit title to PR title instead of the default Merge pull request #xxxx from repo/branch, and commit message to either PR message or messages of individual commits. The auto-merge bot does this by default.

@ghost
Copy link

ghost commented Jun 17, 2021

Thanks Nirmal4G 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, azchohfi, Kyaa-dost and Rosuavio June 17, 2021 14:27
@ghost ghost added the bug 🐛 An unexpected issue that highlights incorrect behavior label Jun 17, 2021
@Nirmal4G Nirmal4G marked this pull request as ready for review June 17, 2021 20:06
@michael-hawker michael-hawker marked this pull request as draft June 17, 2021 20:20
@michael-hawker
Copy link
Member

Marking as draft so we can know that it depends on #3894 first.

@Nirmal4G Nirmal4G force-pushed the hotfix/toolbox branch 3 times, most recently from 5356098 to 7731d68 Compare June 25, 2021 17:06
@michael-hawker michael-hawker added this to the 7.1 milestone Jun 29, 2021
@Nirmal4G Nirmal4G force-pushed the hotfix/toolbox branch 2 times, most recently from bd417d6 to 879f35c Compare July 20, 2021 20:41
@Nirmal4G Nirmal4G marked this pull request as ready for review July 20, 2021 20:42
@Nirmal4G Nirmal4G force-pushed the hotfix/toolbox branch 2 times, most recently from 9f3f5f5 to cc5dfe7 Compare August 2, 2021 17:04
The MarkdownTextBlock's Assembly entry in the VS manifest is wrong, which is why the control was not present in the Toolbox.
By simply updating to the correct Assembly Name lets the "MarkdownTextBlock" control to be validated and listed in the Visual Studio Toolbox.
There are many controls that were added since the original Design project was authored.
Some of them were not added due to lack of docs w.r.t the Design project.
So, We'll add them here and now instead.

NOTE: If this works properly, then, we'll backport these changes to older versions.
When specified with "UIFramework" tag on the controls, we ensure that the controls doesn't list in places where UWP UI/WinUI is not supported.
@XAML-Knight
Copy link
Contributor

XAML-Knight commented Aug 10, 2021

I'm having limited success with bringing in these items into my VS Toolbox.

After tracking down the individual dlls that get built, and bringing them in via the "Choose Toolbox Items" dialog, and adding to the Universal Windows Components tab (which seems like the best option of the available choices), the best I can do is get some of the items to appear under a "All WPF Controls" header, and not the expected "Windows Toolkit" header (I had a Sample Page *.xaml file open, in the VS Designer):

image

image

@michael-hawker
Copy link
Member

That's really weird @XAML-Knight, what version of VS are you running? They should appear automatically once the NuGet package is installed to a UWP project. You shouldn't have to do any manual config.

Like here's our ContosoNotes sample:

image

Or in another project after I just installed the first Toolkit package for the Input (looks like TokenzingTextBox was missing in our 7.1-preview):

image

Just showed up instantly after installing NuGet. I'm on 16.11 now.

@Nirmal4G
Copy link
Contributor Author

@XAML-Knight

Prior to this PR, the custom header is defined in the Visual Studio Toolbox manifest, not in the source. Also the control is not marked as UAP, so, that might be the reason it gets in WPF section.

Please check to see if it's the same with this PR's NuGet! Also, I've marked these controls as UAP here, so, let me know if you want these controls to appear for WPF projects too!?

@XAML-Knight
Copy link
Contributor

When starting with a blank UWP app, I am now able to import & view the controls in my VS Toolbox (VS 2019 v16.10.3). However, to get to this point, I had to install each individual NuGet package by themselves (i.e., Microsoft.Toolkit.Uwp.UI.Controls.Input, Microsoft.Toolkit.Uwp.UI.Controls.Core, etc.), and wasn't able to bring in just one package, the all-up Microsoft.Toolkit NuGet package.

I'm also now seeing duplicate controls in the Microsoft.UI.Xaml grouping in the VS Toolbox:

image

@XAML-Knight
Copy link
Contributor

XAML-Knight commented Aug 11, 2021

let me know if you want these controls to appear for WPF projects too!?

No, not at this point

@michael-hawker
Copy link
Member

@Nirmal4G would we have to do anything special for our meta Microsoft.Toolkit.Uwp.UI.Controls package for the toolbox?

@Nirmal4G
Copy link
Contributor Author

@XAML-Knight

Does installing Microsoft.Toolkit.Uwp.UI.Controls package bring in all the individual controls packages?

You'd see duplicate controls because there might be two versions of WinUI installed in your solution. It was recently fixed as media controls had v2.5 and others having v2.6! but I don't know why it is happening again.

@michael-hawker No, I don't think so but as I mentioned above, we should look into the meta package if it doesn't bring in the individual controls packages.

@XAML-Knight
Copy link
Contributor

So the good news is that installing the Microsoft.Toolkit.Uwp.UI.Controls NuGet package is all I need to bring in all the controls into VS Toolbox.

Unfortunately, though, in a blank UWP solution, I'm still seeing duplicate controls under Microsoft.UI.Xaml. Only v2.6.1 is being brought in:
image

@michael-hawker
Copy link
Member

I just installed the latest PR package for the Control on my VS 16.11 (latest stable) and it seemed fine:

image

All that's left is lumping them all back into a single bucket.

@ghost
Copy link

ghost commented Aug 13, 2021

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

@Nirmal4G Nirmal4G requested review from michael-hawker and Rosuavio and removed request for Kyaa-dost August 13, 2021 18:43
@ghost
Copy link

ghost commented Aug 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

Installed the single meta package from the PR feed and everything LGTM:
image

@XAML-Knight any luck on your side? If not, we can try and fix-forward and identify if it's particular to your environment for some reason or a particular VS version?

@ghost ghost removed the needs attention 👋 label Aug 13, 2021
@XAML-Knight
Copy link
Contributor

Installed the single meta package from the PR feed and everything LGTM:
image

@XAML-Knight any luck on your side? If not, we can try and fix-forward and identify if it's particular to your environment for some reason or a particular VS version?

No need for any changes - my out-of-box experience is the same as you're seeing.

@ghost ghost merged commit 2d74076 into CommunityToolkit:main Aug 13, 2021
@Nirmal4G Nirmal4G deleted the hotfix/toolbox branch August 14, 2021 00:50
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merge ⚡ bug 🐛 An unexpected issue that highlights incorrect behavior priority 🚩
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Follow-up] Remaining Items TODO for DesignTools Refactor
5 participants