Skip to content

Comments

CommandBar closes itself when buttons with flyouts are clicked.#3054

Merged
StephenLPeters merged 1 commit intomasterfrom
user/stpete/CommandBarMenuFlyoutTouch
Aug 6, 2020
Merged

CommandBar closes itself when buttons with flyouts are clicked.#3054
StephenLPeters merged 1 commit intomasterfrom
user/stpete/CommandBarMenuFlyoutTouch

Conversation

@StephenLPeters
Copy link
Contributor

Fixes #2040 CommandBar closes itself when buttons with flyouts are clicked.

Description

We have logic that excludes buttons with flyouts from the commands which close the command bar. However it wasn't being applied in all cases, this change fixes that.

How Has This Been Tested?

A new interaction test.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Aug 5, 2020
@StephenLPeters StephenLPeters requested a review from llongley August 5, 2020 22:20
@StephenLPeters StephenLPeters added area-Commanding AppBar, UICommand, MVVM, etc team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Aug 5, 2020
@StephenLPeters
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Button showCommandBarFlyoutButton = FindElement.ByName<Button>("Show CommandBarFlyout with sub-menu");
ToggleButton isFlyoutOpenCheckBox = FindElement.ById<ToggleButton>("IsFlyoutOpenCheckBox");

Action openCommandBarAction = () =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a specific reason we are defining an action for this?

Copy link
Member

Choose a reason for hiding this comment

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

This was probably copied from other test methods where we run the action multiple times.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fair enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other tests in the file do it in order to reuse the action. For this tests its only used once and isn't really needed. But I think leaving it as is is probably fine.

@StephenLPeters StephenLPeters merged commit 0775e1e into master Aug 6, 2020
@StephenLPeters StephenLPeters deleted the user/stpete/CommandBarMenuFlyoutTouch branch August 6, 2020 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Commanding AppBar, UICommand, MVVM, etc team-Controls Issue for the Controls team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: How to use menuflyout in CommandBarFlyout with touch screen

4 participants