Skip to content

Add uniqueName property and update attachment naming in SnapshotTest#234

Open
itaybre wants to merge 11 commits intomainfrom
feature/previews_unique_name
Open

Add uniqueName property and update attachment naming in SnapshotTest#234
itaybre wants to merge 11 commits intomainfrom
feature/previews_unique_name

Conversation

@itaybre
Copy link
Copy Markdown
Contributor

@itaybre itaybre commented Apr 23, 2025

No description provided.

case .previewProvider(let internalPreview, let previewType):
return Preview(preview: internalPreview, type: previewType, uniqueName: uniqueName)
case .previewRegistry(let anyValue):
#if compiler(>=5.9)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we get rid of these now that Xcode 16 is out?


private enum InternalPreview {
case previewProvider(_Preview, any SwiftUI.PreviewProvider.Type)
// Can't use DeveloperToolsSupport.Preview here because it's not available before iOS 17
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you use a protocol that you conform DeveloperToolsSupport.Preview to in an extension?

public let platform: PreviewPlatform?
}

private struct PreviewTypeInfo {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Having a PreviewType and also PreviewTypeInfo is a bit confusing, can we clean this up?

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.

2 participants