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

Rename ContainerHints to ViewEnvironment to match Swift. #1005

Merged
merged 1 commit into from Mar 6, 2020

Conversation

zach-klippenstein
Copy link
Collaborator

@zach-klippenstein zach-klippenstein commented Mar 5, 2020

Closes #1000.

Keeps ContainerHints around as a deprecated type alias with replacement action.

@zach-klippenstein zach-klippenstein added kotlin Affects the Kotlin library. platform inconsistency Issues or pull requests that address some inconsistency between Swift and Kotlin libraries. labels Mar 5, 2020
@zach-klippenstein zach-klippenstein added this to the v1.0.0 milestone Mar 5, 2020
@zach-klippenstein zach-klippenstein added this to In progress in Workflow via automation Mar 5, 2020
@zach-klippenstein zach-klippenstein moved this from In progress to Review in progress in Workflow Mar 5, 2020
Copy link
Contributor

@rjrjr rjrjr left a comment

Choose a reason for hiding this comment

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

Missed a few:

~/Development/square/workflow/kotlin zachklipp/viewenvironment git grep ContainerHint -- *.kt
samples/containers/android/src/main/java/com/squareup/sample/container/panel/ScrimContainer.kt:      viewConstructor = { initialRendering, initialContainerHints, contextForNewView, _ ->
samples/containers/android/src/main/java/com/squareup/sample/container/panel/ScrimContainer.kt:              bindShowRendering(initialRendering, initialContainerHints) { rendering, environment ->
workflow-ui/core-android/src/main/java/com/squareup/workflow/ui/ViewEnvironment.kt:typealias ContainerHints = ViewEnvironment
workflow-ui/core-android/src/main/java/com/squareup/workflow/ui/WorkflowViewStub.kt: *          containerHints: ContainerHints

Also, do the *.api files need to be updated?

"Renamed to ViewEnvironment.",
replaceWith = ReplaceWith("ViewEnvironment", "com.squareup.workflow.ui.ViewEnvironment")
)
typealias ContainerHints = ViewEnvironment
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. Should you do the same for the key type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think it's used as ubiquitously (at least an order of magnitude less common to define new keys than to reference the container type), so I think we can just update those references immediately.

Workflow automation moved this from Review in progress to Reviewer approved Mar 5, 2020
@zach-klippenstein zach-klippenstein modified the milestones: v1.0.0, v0.23.3, v0.24.0 Mar 5, 2020
Keeps `ContainerHints` around as a deprecated type alias with replacement action.

Closes #1000.
@zach-klippenstein
Copy link
Collaborator Author

Only remaining red shard is an iOS error, this is ready to merge.

@zach-klippenstein zach-klippenstein merged commit 4ddef58 into master Mar 6, 2020
Workflow automation moved this from Reviewer approved to Done Mar 6, 2020
@zach-klippenstein zach-klippenstein deleted the zachklipp/viewenvironment branch March 6, 2020 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kotlin Affects the Kotlin library. platform inconsistency Issues or pull requests that address some inconsistency between Swift and Kotlin libraries.
Projects
Workflow
  
Done
Development

Successfully merging this pull request may close these issues.

Rename ContainerHints to ViewEnvironment
2 participants