-
Notifications
You must be signed in to change notification settings - Fork 47
[fix]: make WorkflowHostingController background color clear #220
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
[fix]: make WorkflowHostingController background color clear #220
Conversation
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.
Is it possible that some of the sample apps in Samples
will become illegible with this change?
view.backgroundColor = .white | ||
view.backgroundColor = .clear |
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.
This probably should have been .backgroundColor
in the first place 🤔
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's possible! I'll browse through them and double check.
|
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.
Not sure if you're keeping track elsewhere, but make sure this gets into the changelog!
I don't think the changelog within the repo is maintained, is it? It looks like it's generated for the release description manually based on PRs. |
965f764
to
e728f84
Compare
e728f84
to
50293db
Compare
Overview
This PR is part of the larger effort to add support for automatic
ViewEnvironment
bridging betweenUIKit
propagation andWorkflowUI
propagation withinWorkflowUI
.See the associated proposal for more information.
While this change may seem unrelated to the view environment bridging work, it was added to this feature branch since it allows replacement of
DescribedViewController
usages withWorkflowHostingController
s without loading the view earlier than you may have needed to previously.WorkflowHostingController
rendering a single screen is one way to achieve automatic bridging of theViewEnvironment
from a vanilla propagation path to aScreen
which can be useful in contexts like snapshot testing harnesses. While we may want to provide an automatic bridging container specific toScreen
's, this work is currently considered out of scope for this feature branch (although that's open to reconsideration)—see the this section in the proposal for more information on this topic.DescribedViewController
'sbackgroundColor
is.clear
, which is an intuitive value when considering that it should appear identical to the content it is wrapping—it shouldn't place an opaque.white
background underneath. I'd argue the same applies toWorkflowHostingController
.Today, if you want to set the
WorkflowHostingController
'sbackgroundColor
to.clear
, you'd need to load the view first (workflowHostingController.view.backgroundColor = .clear
)—there is no way override the background color otherwise. Loading the view early like this can be problematic in some cases, e.g. when attempting to utilize aWorkflowHostingController
in snapshot testing infrastructure where you may want to build up aUIViewController
hierarchy before loading the view at all in case it references values in the vanillaViewEnvironment
propagation path which need to be mutated above it.Square Integration PRs
https://github.com/squareup/market/pull/6286
https://github.com/squareup/ios-register/pull/86301
Checklist