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

Fix discard changes glitch and first-run glitch #315

Merged
merged 7 commits into from
Oct 13, 2023

Conversation

zonia3000
Copy link
Collaborator

Checklist before merging

  • I added an appropriate entry to CHANGELOG.md

Closes #267
Closes #313 (I'll leave a comment in the ticket)

@zonia3000 zonia3000 changed the title Fix discard changes glitch Fix discard changes glitch and first-run glitch Oct 12, 2023
@tcompa
Copy link
Collaborator

tcompa commented Oct 12, 2023

  1. As per First-run issues: Does not load some pages on first attempt #313, I'll let @jluethi check that it works as expected.
  2. I confirm that the bug described Fix glitch in task edit/delete/switch #267 (comment) is fixed.
  3. I'm trying to reproduce the bug that Joel showed us, but I'm not sure it is the same. Here's a reproducible procedure
    • Collect fractal-tasks-core tasks
    • Create a workflow, add the create-ome-zarr-multiplexing task, and select it.
    • Open the "Image Glob Patterns / Arguments list" accordion, and add one item to the list.
    • Do not click "save changes"
    • Open the "Allowed Channels / Argument Properties" accordion
    • Type a value for "key"
    • Click "Add property"
    • You'll get the "There are argument changes unsaved" modal

@tcompa
Copy link
Collaborator

tcompa commented Oct 12, 2023

To avoid collecting all fractal-tasks-core package, one can create a dummy task and set args_schema to
args_schema.json

@tcompa
Copy link
Collaborator

tcompa commented Oct 12, 2023

Some more info for debugging:

By adding MODE="development" in the appropriate env file, one can then head over at http://localhost:5173/sandbox/jsonschema and paste a JSON schema in the first text field to see something like
image

This does not include the save/discard logic, and then it's likely useless in this specific case, but I wanted to bring it up so that @zonia3000 is aware of it.

@zonia3000
Copy link
Collaborator Author

  1. I'm trying to reproduce the bug that Joel showed us, but I'm not sure it is the same. Here's a reproducible procedure

I've fixed this and potentially some similar ones. Some buttons (like the "Add property" one) missed the type="button" attribute, causing the form to automatically submit and then triggering the pending changes modal.

I've also displayed the error message in case of duplicated argument properties. It was currently silently logged in the console.

image

@tcompa
Copy link
Collaborator

tcompa commented Oct 12, 2023

  • I'm trying to reproduce the bug that Joel showed us, but I'm not sure it is the same. Here's a reproducible procedure

    • Collect fractal-tasks-core tasks
    • Create a workflow, add the create-ome-zarr-multiplexing task, and select it.
    • Open the "Image Glob Patterns / Arguments list" accordion, and add one item to the list.
    • Do not click "save changes"
    • Open the "Allowed Channels / Argument Properties" accordion
    • Type a value for "key"
    • Click "Add property"
    • You'll get the "There are argument changes unsaved" modal

I confirm this issue is not present any more.


I also agree with the small error message for an already-present key:
image

@tcompa
Copy link
Collaborator

tcompa commented Oct 12, 2023

I've fixed this and potentially some similar ones. Some buttons (like the "Add property" one) missed the type="button" attribute, causing the form to automatically submit and then triggering the pending changes modal.

I've also displayed the error message in case of duplicated argument properties. It was currently silently logged in the console.

Simultaneous comments ;)

Once again: I confirm the behavior is as expected, nothing to add from my side.

@tcompa tcompa merged commit a366c6a into main Oct 13, 2023
@tcompa tcompa deleted the fix-discard-changes-glitch branch October 13, 2023 08:22
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.

First-run issues: Does not load some pages on first attempt Fix glitch in task edit/delete/switch
2 participants