Skip to content

Rename "viewControllable" to "viewController"#321

Merged
tinder-caiofonseca merged 1 commit intomainfrom
rename-viewcontrollable-viewcontroller
Mar 7, 2023
Merged

Rename "viewControllable" to "viewController"#321
tinder-caiofonseca merged 1 commit intomainfrom
rename-viewcontrollable-viewcontroller

Conversation

@tinder-caiofonseca
Copy link
Contributor

Rename viewControllable variables, properties and arguments to viewController

This should include framework source code as well as the stencils.

And excluding only this specific viewControllable property …

https://github.com/TinderApp/Nodes/blob/main/Sources/XcodeTemplateGeneratorLibrary/Resources/Templates/Flow.stencil#L34

@tinder-caiofonseca tinder-caiofonseca added the templates Templates label Mar 7, 2023
@tinder-caiofonseca tinder-caiofonseca self-assigned this Mar 7, 2023
public func present(_ viewControllable: ViewControllable) {
rootViewController = viewControllable._asUIViewController()
/// - Parameter viewController: The ``ViewControllable`` instance to present.
public func present(_ viewController: ViewControllable) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we're not removing/renaming the viewControllable property in the flow, the attachment will still be using flow.viewControllable. Something like:

let flow: RootFlow = rootBuilder.build(withListener: context)
viewController.present(flow.viewControllable)
attach(starting: flow)

Copy link
Contributor

@tinder-cfuller tinder-cfuller left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@tinder-garricnahapetian tinder-garricnahapetian left a comment

Choose a reason for hiding this comment

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

Great!

@tinder-caiofonseca tinder-caiofonseca merged commit 97a26fa into main Mar 7, 2023
@tinder-caiofonseca tinder-caiofonseca deleted the rename-viewcontrollable-viewcontroller branch March 7, 2023 22:57
@tinder-garricnahapetian tinder-garricnahapetian added framework Framework and removed templates Templates labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework Framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants