-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add Material
to the HTML renderer
#418
Conversation
…sm/Tokamak into swiftui3-styles
I added a snapshot test, but the filter doesn't seem to be screenshot correctly... |
@@ -203,6 +203,31 @@ final class RenderingTests: XCTestCase { | |||
) | |||
#endif | |||
} | |||
|
|||
func testMaterial() { | |||
#if compiler(>=5.5) || os(WASI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, what features of 5.5 are used here? Since we don't have the latest Xcode on GitHub Actions, these tests won't run there, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just needs the newest SwiftUI in Xcode 13 so it can find Material
, and some new modifiers. I wasn't sure what the correct way to restrict it to that is besides using Xcode 13 on CI or restricting to the compiler version shipping with that Xcode version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but these tests should be using Material
from Tokamak, not SwiftUI. There's no import SwiftUI
in RenderingTests.swift
at all, and there's an explicit import of TokamakStaticHTML
, so maybe removing this #if compiler(>=5.5)
shouldn't be an issue? And os(WASI)
shouldn't have any effect since snapshot tests aren't supported on that platform anyway, and there's a top-level platform check for macOS in that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, sorry. Mixed that up with the demo files which wouldn't build. I'll get rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Seems legit
This adds the new iOS 15+
Material
ShapeStyle. They currently only work forbackground
modifiers on the web usingbackdrop-filter
.Tokamak:
SwiftUI: