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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue-21] Expose minimumTopOffset #24

Merged
merged 6 commits into from Apr 27, 2023
Merged

Conversation

mpospese
Copy link
Contributor

Introduction

PWC may need fine-tuned control over the maximum size of bottom sheets. We had a private constant that controlled this, but now it's a public variable that's part of the sheet's appearance.

Purpose

Fix #21 Move the private minimumTopOffset constant from BottomSheetController to Appearance and make it a public variable.

Scope

  • Move the minimumTopOffset property
  • Make BottomSheetController.minimumContentHeight public
  • Refactor BottomSheetController to better organize the code

Discussion

The issue says to also move minimumContentHeight to Appearance, but it is already there serving a related but slightly different purpose, so I just switched it from private let to public var in BottomSheetController.

There are also a few cleanup items I did:

  1. mark the init(coder:) methods as unavailable and removed their unit tests
  2. added a helper file to tests for comparing Typography equality
  3. improved the unit tests around the appearance
  4. renamed memory leak tracking method for consistency

馃摫 Screenshots

Sheet appearance is unchanged.

馃搱 Coverage

Code

100%

image

Documentation

100%

image

@mpospese mpospese merged commit 89b91d6 into main Apr 27, 2023
1 check passed
@mpospese mpospese deleted the issue/21-expose-minimumtopoffset branch April 27, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Expose minimumTopOffset and minimumContentHeight properties
3 participants