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

workflow tab #5680

Merged
merged 26 commits into from
Feb 14, 2024
Merged

workflow tab #5680

merged 26 commits into from
Feb 14, 2024

Conversation

maryhipp
Copy link
Collaborator

@maryhipp maryhipp commented Feb 8, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because:

Have you updated all relevant documentation?

  • Yes
  • No

Description

  • split the workflow editor into Edit Mode (what it is today) and View Mode (a view that only exposes the linear fields, if any, for the loaded workflow)
  • adds an indicator to exposed fields if the values have changed from what the workflow defines as default, and gives the user an option to reset to the default views

Related Tickets & Documents

  • Related Issue #
  • Closes #

QA Instructions, Screenshots, Recordings

Merge Plan

Added/updated tests?

  • Yes
  • No : please replace this line with details on why tests
    have not been included

[optional] Are there any post deployment tasks we need to perform?

@maryhipp maryhipp changed the title (wip) workflow tab workflow tab Feb 13, 2024
There was a lot of potentially sensitive logic shared between the new workflow button and menu items. Also, two instances of ConfirmationAlertDialog.

Using a render prop deduplicates the logic & components
This was occurring because the `nodesChanged` action is called by reactflow when loading a workflow. Specifically, it calculates and sets the node dimensions as it loads.

The existing logic set `isTouched` whenever this action was called.

The changes reactflow emits have types, and we can use the change types and data to determine if a change should result in the workflow being marked as touched.
Copy link
Collaborator

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

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

Tidied/fixed a few things:

  • Fixed a longstanding bug where workflows were marked as touched when loading for the first time, or after clicking a node.

  • There are now 3 buttons to save a workflow in edit mode:

    • In the side panel
    • On the react flow canvas
    • In the ... menu at top-right

    I don't think we need so many of them - maybe skip the side panel save button?

  • I changed the mode toggle to be an IconButton w/ a tooltip.

    Screen.Recording.2024-02-14.at.7.41.07.pm.mov
  • Also as you can see in the video, I changed the New Workflow icon to be different than the workflow tab icon. I also changed it in the ... menu.

Will defer to you to actually merge @maryhipp

@maryhipp maryhipp enabled auto-merge (squash) February 14, 2024 14:00
@maryhipp maryhipp merged commit 9d6e4ff into main Feb 14, 2024
8 checks passed
@maryhipp maryhipp deleted the maryhipp/workflow-tab branch February 14, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants