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

Fix ListItem padding bug on visionOS #2049

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

joannaquu
Copy link
Contributor

@joannaquu joannaquu commented Jun 21, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

On visionOS, ListItem's detail button, with no modifications is a capsule. I initially used clipShape to force it to be a circle. However, when there is padding applied around the button, using clipShape applies it around the frame of the original capsule button, not the updated circle one. This results in extra padding around the button.

Use buttonBorderShape instead, which does what we want.

Binary change

Total increase: 0 bytes
Total decrease: 0 bytes

File Before After Delta
Total 31,095,248 bytes 31,095,248 bytes 🎉 0 bytes
Full breakdown
File Before After Delta

Verification

Visual Verification
Before before
After after

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@joannaquu joannaquu requested a review from a team as a code owner June 21, 2024 23:50
@joannaquu joannaquu merged commit e728a4a into microsoft:main Jun 25, 2024
7 checks passed
@joannaquu joannaquu deleted the joannaqu/fix-padding branch June 25, 2024 00:48
@harrieshin harrieshin mentioned this pull request Aug 16, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants