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 DropDownButtonRevealStyle #70

Closed
lhak opened this issue Dec 12, 2018 · 15 comments · Fixed by #1211 or #1316
Closed

Add DropDownButtonRevealStyle #70

lhak opened this issue Dec 12, 2018 · 15 comments · Fixed by #1211 or #1316
Assignees
Labels
feature proposal New feature proposal good first issue A straightforward issue that's a good condidate if you are new to contributing help wanted Issue ideal for external contributors team-Controls Issue for the Controls team

Comments

@lhak
Copy link

lhak commented Dec 12, 2018

Proposal: Add DropDownButtonRevealStyle

Summary

Add a reveal style for the DropDownButton control.

Rationale

There are currently reveal styles for many controls of the platform. However, there is one missing for the DropDownButton control. It would be nice if such a style could be added to WinUI.

Functional Requirements

The style should have a similar design to the current ButtonRevealStyle/AppBarButtonRevealStyle styles.

Usage Examples

Detailed Feature Design

Open Questions

@jevansaks jevansaks added feature proposal New feature proposal good first issue A straightforward issue that's a good condidate if you are new to contributing help wanted Issue ideal for external contributors labels Dec 12, 2018
@jevansaks
Copy link
Member

Yup, totally agree. This seems to be an oversight. @chigy @kikisaints could you see about getting a comp for this?

I don't know when our team would be able to get to this, but we would welcome a contribution for this.

@kikisaints
Copy link

kikisaints commented Dec 12, 2018

Actually, since DropDownButton's template is based on button, simply doing this:

<DropDownButton Content="Email" Style="{ThemeResource ButtonRevealStyle}"/>

Will give you full Reveal on the DropDownButton.

However, for clarity's sake, I'd suggest we add something like this to generic.xaml:

<Style TargetType="DropDownButton" x:Key="DropDownButtonRevealStyle" BasedOn="{StaticResource ButtonRevealStyle}"/>

@jevansaks I don't believe a comp is necessary, as testing out the ButtonRevealStyle on the DropDownButton gives the desired results and can be viewed today - but let me know if you feel otherwise.

@jevansaks
Copy link
Member

I forgot to call out that I think we should also do a SplitButton reveal style along with this.

For DropDownButton, yes, the fix may be simple -- but it still needs to be done. :)

@kikisaints
Copy link

For SplitButton, I was imagining something like this:
splitbutton_reveal

@lhak
Copy link
Author

lhak commented Dec 13, 2018

I tried using ButtonRevealStyle, but this does not show the dropdown indicator.

@kikisaints
Copy link

Ah! So you are correct, @lhak. For your immediate remedy then, you can do this:

<DropDownButton Style="{ThemeResource ButtonRevealStyle}">
    <DropDownButton.Content>
        <StackPanel Orientation="Horizontal">
            <TextBlock
            Text="Email"
            VerticalAlignment="Center"/>
            
            <TextBlock
            x:Name="ChevronTextBlock"
            Grid.Column="1"
            FontFamily="Segoe MDL2 Assets"
            FontSize="12"
            Text="&#xE70D;"
            VerticalAlignment="Center"
            Margin="6,0,0,0"
            AutomationProperties.AccessibilityView="Raw"/>
        </StackPanel>
    </DropDownButton.Content>
    
    <DropDownButton.Flyout>
        <MenuFlyout Placement="Bottom">
            <MenuFlyoutItem Text="Send"/>
            <MenuFlyoutItem Text="Reply"/>
            <MenuFlyoutItem Text="Reply All"/>
        </MenuFlyout>
    </DropDownButton.Flyout>
</DropDownButton>

But @jevansaks, here's a prototype comp for DropDownButtonStyle:
dropdownbutton_revealgif

@lhak
Copy link
Author

lhak commented Jan 11, 2019

Thank you for the suggestion. I actually need to put this button into a commandbar so I have used some similar code in a retemplated AppBarButton. Still, an official AppBarDropDownButton control would be great (see #172).

@chigy
Copy link
Member

chigy commented Jan 14, 2019

@lhak - Sounds like you were able to workaround it for now. And I thank you for opening the issue in the Windows UI Library repo. That's the right place for the feedback. Let me know if there is anything that you still need (other than the support which will be tracked with #172).

@jesbis jesbis added this to New proposal in Feature tracking Jan 24, 2019
@jevansaks jevansaks added this to Approved in Controls Triage Feb 11, 2019
@jevansaks jevansaks moved this from Approved to Approved - Assigned in Controls Triage Feb 22, 2019
@jevansaks jevansaks moved this from Approved - Assigned to Approved in Controls Triage May 7, 2019
marcelwgn added a commit to marcelwgn/microsoft-ui-xaml that referenced this issue Aug 25, 2019
Controls Triage automation moved this from Backlog to Closed Aug 28, 2019
kaiguo pushed a commit that referenced this issue Aug 28, 2019
)

* Added RevealStyle for DropDownButton and SplitButton; Closes #70;

* Fix missing hover reveal for SplitButton and DropDownButton and add to reveal page;
@msft-github-bot msft-github-bot removed this from Freezer in Feature tracking Aug 28, 2019
@msft-github-bot
Copy link
Collaborator

🎉This issue was addressed in #1211, which has now been successfully released as Microsoft.UI.Xaml v2.2.190830001.:tada:

Handy links:

@lhak
Copy link
Author

lhak commented Sep 4, 2019

It seems that the added style is incomplete and lacks the dropdown indicator. It also does not show up in the intellisense box.

@msft-github-bot
Copy link
Collaborator

🎉This issue was addressed in #1316, which has now been successfully released as Microsoft.UI.Xaml v2.2.190917002.:tada:

Handy links:

@lhak
Copy link
Author

lhak commented Sep 23, 2019

I tested the updated package but I still see some issues (the first two might be limitations of Visual Studio):

  • The intellisense context menu in Visual Studio does not offer this as a style for the DropDownButton
  • Jumping to the style definition with F12 does not work
  • When the control is disabled the text of the button is grayed out, but the dropdown symbol is not

@jevansaks
Copy link
Member

Thanks! Yes, the first two are limitations of visual studio. Could you file those via the "send feedback" in VS?

The third one seems like a bug. @chingucoding @kaiguo can you take a look?

@marcelwgn
Copy link
Contributor

I will look into the third bug.

@msft-github-bot
Copy link
Collaborator

🎉This issue was addressed in #1316, which has now been successfully released as Microsoft.UI.Xaml v2.3.191007001-prerelease.:tada:

Handy links:

@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal good first issue A straightforward issue that's a good condidate if you are new to contributing help wanted Issue ideal for external contributors team-Controls Issue for the Controls team
Projects
No open projects
6 participants