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

Show legend in hit target snapshots #188

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Conversation

NickEntin
Copy link
Collaborator

No description provided.

NSString *errorDescription = snapshotVerifyWithInvertedColors(self, selector, view__, identifier__ ?: @"", useMonochromeSnapshot__, maxPermissibleMissedRegionWidth__, maxPermissibleMissedRegionHeight__, 0, 0);\
NSString *errorDescription = snapshotVerifyWithHitTargets(self, selector, view__, identifier__ ?: @"", useMonochromeSnapshot__, maxPermissibleMissedRegionWidth__, maxPermissibleMissedRegionHeight__, 0, 0);\
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤦‍♂️

let maxYBoundary = bounds.minY + availableLegendHeight
let maxYBoundary = bounds.minY + Metrics.legendInsets.top + availableLegendHeight
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was an existing bug in the layout code for all accessibility snapshots, which could cause legend views to wrap to the next column too early.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Retroactively filed #189 for this.

Copy link
Collaborator

@dnagler dnagler left a comment

Choose a reason for hiding this comment

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

Love it!

@NickEntin NickEntin linked an issue Jan 19, 2024 that may be closed by this pull request
@NickEntin NickEntin force-pushed the entin/hit-test-legend-2 branch from 728af01 to b9e2f25 Compare January 19, 2024 00:55
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Turns out #189 was actually affecting a fair number of snapshots 😓. This is an example where we were actually missing the last element since it fell over into the next (off screen) column.

Base automatically changed from entin/hit-test-legend to master January 19, 2024 00:58
@NickEntin NickEntin merged commit 28aac80 into master Jan 19, 2024
6 checks passed
@NickEntin NickEntin deleted the entin/hit-test-legend-2 branch January 19, 2024 01:08
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.

Last accessibility marker can be omitted from legend in some cases
2 participants