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

Increase support for SpatialTapGesture #279

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

andy-vanwagoner-jn
Copy link
Contributor

To write tests using SpatialTapGesture, we needed a way to initialize the Value. This adds the appropriate init & adds tests for SpatialTapGesture.

@@ -260,7 +260,7 @@ internal extension InspectableView {
return (modifier, [])
case .composed:
return traverseComposedGesture(modifier, name, &modifiers)
case .state :
case .state:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed swiftlint warning

@@ -78,7 +78,7 @@ final class GridTests: XCTestCase {
func testGridRowAlignmentInspection() throws {
guard #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *)
else { throw XCTSkip() }
let view = Grid() { GridRow(alignment: .bottom) { EmptyView() } }
let view = Grid { GridRow(alignment: .bottom) { EmptyView() } }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed swiftlint warning


@available(iOS 16.0, macOS 13.0, watchOS 9.0, *)
@available(tvOS, unavailable)
final class SpatialTapGestureTests: XCTestCase {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were largely pilfered from RotationGestureTests. I'm not sure I understand the full scope of CommonGestureTests, but I hope this covers all intended uses of SpatialTapGesture.

@nalexn nalexn merged commit 6b2265c into nalexn:0.9.9 Nov 25, 2023
@nalexn nalexn added the pending release A fixed issue that'll be released in an upcoming update label Nov 25, 2023
@nalexn
Copy link
Owner

nalexn commented Nov 25, 2023

Thank you for this nice addition, @andy-vanwagoner-jn !

@andy-vanwagoner-jn andy-vanwagoner-jn deleted the spatialTapGesture branch November 27, 2023 16:35
@nalexn nalexn removed the pending release A fixed issue that'll be released in an upcoming update label Dec 3, 2023
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