Skip to content

Conversation

@snowystinger
Copy link
Member

@snowystinger snowystinger commented May 11, 2022

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:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Smoketest Menu/ListBox/Picker/Combobox

🧢 Your Project:

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

@snowystinger
Copy link
Member Author

snowystinger commented May 16, 2022

Also fixes this case i just noticed on main, a result of CMD+A

Screen Shot 2022-05-16 at 2 36 20 PM

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

@adobe-bot
Copy link

Build successful! 🎉

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

LGTM

@adobe-bot
Copy link

Build successful! 🎉

@snowystinger snowystinger merged commit 2301e42 into main May 18, 2022
@snowystinger snowystinger deleted the fix-wiggle-listview-selection branch May 18, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants