Skip to content

Menu: Optimize pointer events#10479

Merged
danielchalmers merged 1 commit intoMudBlazor:devfrom
danielchalmers:menu-optimize-pointer-events
Dec 18, 2024
Merged

Menu: Optimize pointer events#10479
danielchalmers merged 1 commit intoMudBlazor:devfrom
danielchalmers:menu-optimize-pointer-events

Conversation

@danielchalmers
Copy link
Member

Description

Functionally the same but now does less stuff if it doesn't need to happen.

How Has This Been Tested?

unit

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Dec 18, 2024
@danielchalmers
Copy link
Member Author

In a future version, a HoverDelay of zero will let you transfer the cursor to submenus

@sonarqubecloud
Copy link

Copy link
Member

@ScarletKuro ScarletKuro left a comment

Choose a reason for hiding this comment

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

LGTM
Tho this is very minor optimazation:

if (!_openState.Value)
{
await OpenMenuAsync(args, true);
}

As OpenMenuAsync already has the check and you would only update two variables

@danielchalmers
Copy link
Member Author

danielchalmers commented Dec 18, 2024

LGTM Tho this is very minor optimazation:

if (!_openState.Value)
{
await OpenMenuAsync(args, true);
}

As OpenMenuAsync already has the check and you would only update two variables

I don't want to overwrite the transient state (will be relevant in the next PR)

@danielchalmers danielchalmers merged commit eb16181 into MudBlazor:dev Dec 18, 2024
@danielchalmers danielchalmers deleted the menu-optimize-pointer-events branch December 18, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants