Skip to content

Conversation

@marner2
Copy link
Collaborator

@marner2 marner2 commented Aug 6, 2022

Adding a createWithoutLogging function that can be used outside the project for view model args (simple will be used for design time view models) - could be useful for debugging purposes.

TODO: rename to create after renaming the internal one to createWithLogging but only after #489 and #475 are merged in (they conflict with that)

@marner2 marner2 force-pushed the feature/make_viewModelArgs_public branch from d50d5ea to 389db70 Compare August 15, 2022 17:00
@marner2 marner2 marked this pull request as draft August 17, 2022 13:10
@marner2 marner2 force-pushed the feature/make_viewModelArgs_public branch 2 times, most recently from 6d5abf3 to a9a08b9 Compare September 7, 2022 03:31
@marner2 marner2 marked this pull request as ready for review September 7, 2022 03:32
@marner2 marner2 force-pushed the feature/make_viewModelArgs_public branch from a9a08b9 to 2317e7e Compare September 9, 2022 01:04
dispatch: 'msg -> unit
loggingArgs: LoggingViewModelArgs }
type ViewModelArgs<'model, 'msg> =
internal { initialModel: 'model; dispatch: 'msg -> unit; loggingArgs: LoggingViewModelArgs }
Copy link
Member

Choose a reason for hiding this comment

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

Please keep each field on it's own line. In particular, this will keep the diff smaller.

{ initialModel: 'model
dispatch: 'msg -> unit
loggingArgs: LoggingViewModelArgs }
type ViewModelArgs<'model, 'msg> =
Copy link
Member

Choose a reason for hiding this comment

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

Keep this internal for now. Make in public in the PR that needs that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This essentially undoes this PR. I'll just close it until we implement static view models, which will need it.

let simple initialModel =

let createWithoutLogging initialModel dispatch =
Copy link
Member

Choose a reason for hiding this comment

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

Keep this internal for now. Make in public in the PR that needs that.

dispatch = dispatch
loggingArgs = LoggingViewModelArgs.none }

let simple initialModel = createWithoutLogging initialModel ignore
Copy link
Member

Choose a reason for hiding this comment

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

Keep this internal for now. Make in public in the PR that needs that.

@marner2 marner2 force-pushed the feature/make_viewModelArgs_public branch from 2317e7e to 2cdf62e Compare September 16, 2022 01:49
@marner2 marner2 force-pushed the feature/make_viewModelArgs_public branch from 2cdf62e to f55b2f4 Compare September 16, 2022 16:39
@marner2
Copy link
Collaborator Author

marner2 commented Sep 16, 2022

Closing per @TysonMN 's request to make this change as part of a larger one.

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