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

Chip: Don't apply hover or focus effect if not clickable and allow text selection #8598

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

danielchalmers
Copy link
Contributor

@danielchalmers danielchalmers commented Apr 7, 2024

Description

How Has This Been Tested?

visually

Types 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)

Resolves #7243
Hover before:

hoverbefore.mp4

Hover after:

hoverafter.mp4

Clickable chips remain the same.
Before:

chipsetbefore.mp4

After:

chipsetafter.mp4

Additionally resolves #7420
Before:

selectionbefore.mp4

After:

selectionafter.mp4

It does not interfere with the click effect but allows the user to drag the mouse or double click to select text.

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 enhancement New feature or request PR: needs review labels Apr 7, 2024
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.89%. Comparing base (f70bb9e) to head (bda57e9).
Report is 11 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8598      +/-   ##
==========================================
+ Coverage   89.78%   89.89%   +0.11%     
==========================================
  Files         411      412       +1     
  Lines       11840    11881      +41     
  Branches     2363     2362       -1     
==========================================
+ Hits        10630    10680      +50     
+ Misses        682      675       -7     
+ Partials      528      526       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henon
Copy link
Collaborator

henon commented Apr 8, 2024

So clickable chips can not be selected but readonly chips can? I see a ripple in the video where you selected text on the chip. Should we also disable the ripple if the chip is not clickable?

@danielchalmers
Copy link
Contributor Author

So clickable chips can not be selected but readonly chips can? I see a ripple in the video where you selected text on the chip. Should we also disable the ripple if the chip is not clickable?

I would probably make it work like MUI but I'll leave those decisions to someone else because I don't use the chips enough to have an opinion. I just copied the other PRs.

@henon
Copy link
Collaborator

henon commented Apr 8, 2024

OK, in MUI clickable chips are not selectable but do hover and ripple. Non-clickable are selectable but don't hover and have no ripple. If it is like that now this can be merged.

@danielchalmers
Copy link
Contributor Author

OK, in MUI clickable chips are not selectable but do hover and ripple. Non-clickable are selectable but don't hover and have no ripple. If it is like that now this can be merged.

I can make it like that if that's the consensus (I agree)

@henon
Copy link
Collaborator

henon commented Apr 8, 2024

Yes, let's do it like that. No need to make it more complicated if we already agree ;)

@danielchalmers danielchalmers changed the title Chip: Only apply hover effect if clickable Chip: Don'apply hover or focus effect and allow text selection if not clickable Apr 8, 2024
@danielchalmers danielchalmers changed the title Chip: Don'apply hover or focus effect and allow text selection if not clickable Chip: Don't apply hover or focus effect if not clickable and allow text selection Apr 8, 2024
@danielchalmers
Copy link
Contributor Author

@henon Done. Please checkout the branch and see if it's what you expect

@henon henon added breaking change v7 New major MudBlazor version and removed PR: needs review labels Apr 9, 2024
@henon henon merged commit 8a99dd9 into MudBlazor:dev Apr 9, 2024
4 checks passed
@henon
Copy link
Collaborator

henon commented Apr 9, 2024

Thanks @danielchalmers

@danielchalmers danielchalmers deleted the chip-interactive-hover branch April 9, 2024 07:23
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change enhancement New feature or request v7 New major MudBlazor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MudChip text selectable Chip: Add ReadOnly mode
2 participants