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

Bk/self sizing month header fixes #253

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

bryankeller
Copy link
Contributor

Details

Fixed self-sizing month header issues:

  • Fixes an issue that caused views to flicker as they were incorrectly being reused only for sizing purposes
  • Prevent the month header size cache from growing unbounded

I'll leave comments in code where the relevant changes are.

Updated tests:

  • Added self-sizing month header tests
  • Sorted the comparison strings used in the unit tests to make future diffs smaller

Related Issue

N/A

Motivation and Context

Realized I introduce

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@bryankeller bryankeller added the enhancement New feature or request label Aug 4, 2023
Comment on lines +366 to +368
private var sizingMonthHeaderViewsForViewDifferentiators = [
_CalendarItemViewDifferentiator: UIView
]()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's easy enough to just maintain a separate dictionary of sizing views. Then there's no chance we'll accidentally use a real month header view from the reuse manager to do sizing.

@bryankeller bryankeller force-pushed the bk/self-sizing-month-header-fixes branch from be22cb8 to 22e5af8 Compare August 4, 2023 16:59
@bryankeller bryankeller force-pushed the bk/self-sizing-month-header-fixes branch from e4af57e to b8868e0 Compare August 4, 2023 17:01
@bryankeller bryankeller merged commit 4ec6a85 into master Aug 4, 2023
2 checks passed
@bryankeller bryankeller deleted the bk/self-sizing-month-header-fixes branch August 4, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants