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

Support editing lists, args, and kwargs #512

Merged
merged 7 commits into from
Mar 27, 2023

Conversation

JosephMarinier
Copy link
Contributor

Description:

Screen Shot 2023-03-23 at 10 54 53 AM

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

  • ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

@JosephMarinier JosephMarinier self-assigned this Mar 23, 2023
@nandhinibsn nandhinibsn force-pushed the nandhini/config_ui_string_editable branch from 720b8aa to d16611e Compare March 23, 2023 16:44
Base automatically changed from nandhini/config_ui_string_editable to main March 24, 2023 15:20
@JosephMarinier JosephMarinier force-pushed the joseph/lists-args-kwargs branch 3 times, most recently from 8bb2172 to 5c3d68a Compare March 25, 2023 16:01
pipelineIndex: number,
update: Partial<PipelineDefinition["model"]>
) =>
setPartialConfig({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be safer to use
setPartialConfig(partialConfig => ({...partialConfig, etc...}))
https://react.dev/reference/react/useState#updating-state-based-on-the-previous-state

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh cool! I didn't know that existed. 👍
It is like that in more than 20 other places, so I'll make another refactor PR to cover everything.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you decide to do the changes in this file in this PR there are a few more instances in this file as well.

Copy link
Contributor Author

@JosephMarinier JosephMarinier Mar 27, 2023

Choose a reason for hiding this comment

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

Yeah, yeah, I am just talking about this file: 21 instances of setPartialConfig({ ...partialConfig.

Copy link
Collaborator

@christyler3030 christyler3030 left a comment

Choose a reason for hiding this comment

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

Approved with comments

@JosephMarinier JosephMarinier enabled auto-merge (squash) March 27, 2023 17:52
@JosephMarinier JosephMarinier merged commit 9681c4c into main Mar 27, 2023
@JosephMarinier JosephMarinier deleted the joseph/lists-args-kwargs branch March 27, 2023 18:14
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