Skip to content

[Feature] Add TabbedCommandBar (ribbon) control #3556

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

Merged
42 commits merged into from
Feb 10, 2021

Conversation

yoshiask
Copy link
Contributor

@yoshiask yoshiask commented Nov 6, 2020

Fixes #3259

PR Type

What kind of change does this PR introduce?

Feature

Sample app changes

What is the current behavior?

There is no ribbon or ribbon-like control for UWP. The current solution is to put CommandBars inside of a Pivot.

What is the new behavior?

Adds a TabbedCommandBar, which internally is almost identical to the current solutions, but provides a much friendlier developer experience.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

I forgot to do my work on a feature branch, so this PR is basically a duplicate of #3551, with a little bit of cleanup.

@ghost
Copy link

ghost commented Nov 6, 2020

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

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.

Quick comments

@ghost ghost added controls 🎛️ feature 💡 feature request 📬 A request for new changes to improve functionality labels Nov 7, 2020
@yoshiask
Copy link
Contributor Author

yoshiask commented Nov 13, 2020

I'm using the package generated by the pipeline and I can see a few bugs that I'm not sure how to address.

  • The animation when switching tabs doesn't work in the Toolkit Sample App, but they do in my personal app.
  • The styles that I defined for the controls (e.g. DefaultTabbedCommandBarItemStyle, AcrylicTabbedCommandBar) aren't available in projects that just reference the Toolkit package. Attempting to use one of those styles in an app results in a "resource not found" exception.

@Kyaa-dost Kyaa-dost added this to the 7.0 milestone Nov 13, 2020
@ghost ghost added the in progress 🚧 label Nov 13, 2020
@yoshiask
Copy link
Contributor Author

@michael-hawker Just pinging you since it's been a while, did you see my last comment?
#3556 (comment)

@michael-hawker
Copy link
Member

So sorry @yoshiask, I missed your comment after .NET Conf.

For your issues with the Sample App and stand-alone. The Sample App uses WinUI 2, so it's including their style overrides compared to when just run with the Toolkit and the system styles. This is something we have to address in the future better (opened #3598 to track this). It might be that we have to check for what this conflict/difference may be?

Do those two styles use specific resources found in the WinUI 2 styles?

@yoshiask
Copy link
Contributor Author

yoshiask commented Dec 3, 2020

No, all styles use system resources. Also just want to reiterate that the issue isn't coming from inside the custom styles. The issue is that the styles I wrote don't seem to be accessible outside of the Toolkit resource dictionary

@yoshiask
Copy link
Contributor Author

yoshiask commented Dec 3, 2020

For example, the DefaultTabbedCommandBarItemStyle is the style that couldn't be found.

@michael-hawker
Copy link
Member

@yoshiask I see, you're saying for accessing in the code a developer would be using in their app, eh?

Does it work for any other style for any other controls in the Toolkit? This may be a general issue not specific to your component. This also may be related to how we don't require inclusion of resources in the app like WinUI does as well.

I know in more explicit cases where we wanted alternate styles for folks to leverage, we just had them as loose XAML files which we then had folks include explicitly like with the alternate styles for InAppNotification:

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/2a4938d9f11faf6ff3630294470194598ae4da3b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationXaml.bind#L14-L17

@yoshiask
Copy link
Contributor Author

yoshiask commented Feb 8, 2021

Okay, I'm officially calling it here. I'm not adding any new stuff (as much as I wanted to make the ribbon collapsible). I believe I've addressed all the feedback, but feel free to unresolve a thread if there's more work to be done there.

@michael-hawker michael-hawker added the next preview ✈️ Label for marking what we want to include in the next preview release for developers to try. label Feb 8, 2021
@Kyaa-dost
Copy link
Contributor

@yoshiask Thanks for all the work ❤️

Will have to look more into this as we are still able to repro this error highlighted by the community.

image

@michael-hawker
Copy link
Member

Thanks @Kyaa-dost, yeah I'm not overly worried about that bug as it's a bit tricky to actually reproduce unless you follow an explicit set of steps. I think it's something we can address later or even in 7.1 if we find out it's a bigger issue.

I plan to give this another whirl and double-check the contextual tab updates tonight. So excited to get this in for the release! 🎉

Great work @yoshiask!

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.

I noticed there's a few todos? Are those future todos, things that should be removed, or issues that should be addressed?

Maybe best to create a new issue to track any open/remaining things you want to track long-term and then just put a #1234 reference to the issue number in the comments with more details?

Otherwise, I think we just have to update the sample with the new binding to make it work by default... (see comments)

@ghost
Copy link

ghost commented Feb 9, 2021

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

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.

Alright, think we're good. @Kyaa-dost want to take it for a final spin with the fix for the Sample in the morning and we can get it merged?

@RosarioPulella after that mind updating the dev/split-controls branch to move this to Core?

@ghost
Copy link

ghost commented Feb 10, 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.

@ghost ghost removed the auto merge ⚡ label Feb 10, 2021
@yoshiask
Copy link
Contributor Author

yoshiask commented Feb 10, 2021

@michael-hawker I merged master back in and the bot removed the auto merge label

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 ⚡ controls 🎛️ feature 💡 feature request 📬 A request for new changes to improve functionality in progress 🚧 needs attention 👋 next preview ✈️ Label for marking what we want to include in the next preview release for developers to try.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Ribbon control
7 participants