-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix wiggle in listview selection #3119
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
Conversation
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
…t-spectrum into fix-wiggle-listview-selection
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
reidbarber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LFDanLu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Build successful! 🎉 |

Closes
https://github.com/adobe/react-spectrum/pull/3105/files#r869689633
This removes overflow hidden on our items so that borders can extend out beyond them, much like cards and focus rings. The reason for this is so that items can share borders. This is important because when they can't, then the border is either on one item or its neighbor. We've been doing this for a while, always using the bottom border of the item directly above in order to provide a top border to an item. This is a good way to fake sharing borders.
With rounded corners, the border must always be on the item with the rounded corners. There is no way to invert the rounded corner. As a result, we can't use the bottom border of the item above to provide the top border for a rounded item.
If we use the bottom border of the item above most of the time, but then have to switch to the items own border when rounded, this leads to a 2px difference which causes the item to change apparent size to users when selecting and deselecting.
The solution is for every item to always have a full border when selected, but to actually share the border space with neighbors when both are selected.
note if we ever move to using "rowHeight" a bit of CSS will need to be written to accommodate that to prevent overflow inside of items
✅ Pull Request Checklist:
📝 Test Instructions:
Smoketest Menu/ListBox/Picker/Combobox
🧢 Your Project: