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

Adjust the method for UITableViewCell separator hiding to prevent hangs #2068

Merged

Conversation

lukas-cap
Copy link
Contributor

@lukas-cap lukas-cap commented Jul 17, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Turns out that the method I previously implemented to keep separator insets at zero frame actually may not work, and can cause a hang because the system sometimes adds its own inset to whatever inset the client sets.

Let's change the logic to:

  1. Only set the inset once, not piece-meal
  2. Loosen up the condition to cover cases where after setting, the inset may actually be bigger than intended (which is still fine for our purposes).

Binary change

N/A

Verification

Sanity in test app that insets are still gone and view debugger still doesn't crash.

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

@lukas-cap lukas-cap requested a review from a team as a code owner July 17, 2024 01:00
@lukas-cap lukas-cap force-pushed the user/lucapkov/separatorInsetFix2 branch from 93947c0 to 0aaa714 Compare July 17, 2024 01:02
@lukas-cap lukas-cap merged commit 30b8885 into microsoft:main Jul 17, 2024
7 checks passed
sophialee0416 pushed a commit to sophialee0416/fluentui-apple that referenced this pull request Jul 17, 2024
sophialee0416 added a commit that referenced this pull request Jul 17, 2024
(cherry picked from commit 30b8885)

Co-authored-by: Lukas Capkovic <3610850+lcapkovic@users.noreply.github.com>
sophialee0416 pushed a commit to sophialee0416/fluentui-apple that referenced this pull request Jul 18, 2024
sophialee0416 pushed a commit to sophialee0416/fluentui-apple that referenced this pull request Jul 18, 2024
(cherry picked from commit 30b8885)
(cherry picked from commit 60aea2b)
sophialee0416 added a commit that referenced this pull request Jul 18, 2024
(cherry picked from commit 30b8885)
(cherry picked from commit 60aea2b)

Co-authored-by: Lukas Capkovic <3610850+lcapkovic@users.noreply.github.com>
@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.

3 participants