Chip: Don't apply hover or focus effect if not clickable and allow text selection#8598
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
|
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. |
|
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) |
|
Yes, let's do it like that. No need to make it more complicated if we already agree ;) |
|
@henon Done. Please checkout the branch and see if it's what you expect |
|
Thanks @danielchalmers |
Description
How Has This Been Tested?
visually
Types of changes
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
dev).