Skip to content

MudSelect: Open menu on pointer down instead of click#10129

Merged
henon merged 5 commits into
MudBlazor:devfrom
danielchalmers:select-click-pointer-down
Nov 5, 2024
Merged

MudSelect: Open menu on pointer down instead of click#10129
henon merged 5 commits into
MudBlazor:devfrom
danielchalmers:select-click-pointer-down

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Oct 29, 2024

Copy link
Copy Markdown
Member

Description

I believe it's standard for a Select component to open as soon as the pointer is down, not waiting for the click. This matches the Autocomplete and helps speed up the animation as well.

Examples:

How Has This Been Tested?

visually

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 breaking change This change will require consumer code updates (ex: removes/changes an API) PR: needs review labels Oct 29, 2024
@danielchalmers

Copy link
Copy Markdown
Member Author

We desperately need to fix the WaitForRender method because it's causing a long delay between the click and seeing the menu open. Does anyone know why this is needed on the Select and not Autocomplete? Try opening both components and compare animation times.

@ScarletKuro

Copy link
Copy Markdown
Member

We desperately need to fix the WaitForRender

We desperately need to rewrite the whole component. I don't think you can easily get rid of it now as it's "core" part of the component, look how much it's called and all this magic delays etc. And changing single thing will 99% break something, this is a good example: #8770 and there are no tests for it.

@ScarletKuro

Copy link
Copy Markdown
Member

Is this related? #10132

@danielchalmers

Copy link
Copy Markdown
Member Author

@ScarletKuro Right. We need a MudComboBox that combines the Autocomplete and Select

@danielchalmers danielchalmers requested a review from henon October 31, 2024 02:41
@danielchalmers

Copy link
Copy Markdown
Member Author

Next thing could be to handle the items on both pointer down and up so you can hold the pointer down on the activator then swipe and let go to select an item

@danielchalmers

Copy link
Copy Markdown
Member Author

Migration Guide:

MudSelect is now opened on pointerdown instead of click to match the behavior of similar components.

@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2024

Copy link
Copy Markdown

@henon henon changed the title Select: Open menu on pointer down instead of click MudSelect: Open menu on pointer down instead of click Nov 5, 2024
@henon henon merged commit a77b1da into MudBlazor:dev Nov 5, 2024
@henon

henon commented Nov 5, 2024

Copy link
Copy Markdown
Contributor

Added to v8.0.0 Migration Guide at #9953

@ScarletKuro

Copy link
Copy Markdown
Member

Regression from this PR: #10345

@zebsimls

Copy link
Copy Markdown

Still having an issue with this as the select doesn't open when the mouse is casually clicked(although it does show as highlighted). It will open when held down or double clicking. Is there some other attribute that needs to be added here? This is from a Windows PC using Chrome and Edge.

@danielchalmers

Copy link
Copy Markdown
Member Author

Still having an issue with this as the select doesn't open when the mouse is casually clicked(although it does show as highlighted). It will open when held down or double clicking. Is there some other attribute that needs to be added here? This is from a Windows PC using Chrome and Edge.

Thanks, this should be fixed in the next update (v8.2.0). @zebsimls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change This change will require consumer code updates (ex: removes/changes an API) regression Previously worked and now doesn't

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants