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

Combined save&discard dialogue for all elements of a task #482

Open
jluethi opened this issue May 7, 2024 · 4 comments
Open

Combined save&discard dialogue for all elements of a task #482

jluethi opened this issue May 7, 2024 · 4 comments
Labels
to be discussed Not ready to implement

Comments

@jluethi
Copy link
Collaborator

jluethi commented May 7, 2024

What I've noticed when using e.g. Input Filters & Arguments was that each of the tabs had to be saved separately. e.g. when I edit the parameters and want to switch to Input filters, the Discard or Save dialogue shows up.

Screenshot 2024-05-07 at 13 33 18

When we're putting in more of this unified save dialogue (see #481), I start to wonder: Can we have the save/discard logic be applied to the whole task instead of each of its tabs?

No some of the logic would have to change:
I don't think it makes sense to have an endpoint that always overwrites all the parts (e.g. we always update parameters, meta & input filters, even if only arguments changed).
But maybe we can handle it front-end side in that clicking save or discard triggers save or discard for all the tabs if they have unsaved changes?

We'd have to test this a bit with the behavior of "what if I get a validation error during saving, like missing a required argument"?

@zonia3000
Copy link
Collaborator

Currently the content of each tab is created when the tab is selected and destroyed when the tab changes. To implement a save function that works for the whole task we need to always create all the components and change only their visibility when the tab change. This means having more components in the page and it could increase the page loading time.

Moreover, what about a user having validation errors on multiple tabs? We should find a way to indicate that fixes have to be made on multiple tabs.

@jluethi
Copy link
Collaborator Author

jluethi commented May 7, 2024

This means having more components in the page and it could increase the page loading time.

Ok, that's another area to consider carefully then. The scaling here may indeed be problematic in workflows with say 20 tasks or so.

Moreover, what about a user having validation errors on multiple tabs?

Yes, another relevant concern.

@zonia3000
Copy link
Collaborator

zonia3000 commented May 7, 2024

Ok, that's another area to consider carefully then. The scaling here may indeed be problematic in workflows with say 20 tasks or so.

It doesn't depend on the number of tasks. The components that would need to be loaded together are: Arguments form, Meta properties form, Task info, Input filters and Versions. These are currently created only when needed, so they don't exist when their tab is not selected. Maybe it's not a big overhead, but for sure the workflow page would contain many more components and logic (and I think it is already the page containing more features of fractal-web).

@jluethi
Copy link
Collaborator Author

jluethi commented May 7, 2024

I think it is already the page containing more features of fractal-web

Agreed. This issue also isn't an urgent issue, more of the observation that our user flow here is suboptimal. If there are future refactors the simplify the workflow page, let's keep the design goal in mind:

We want to minimize the save or discard dialogues that a user would go through in a normal flow. And such normal flows can contain changing arguments, meta & filters for each task.

@tcompa tcompa added the to be discussed Not ready to implement label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be discussed Not ready to implement
Projects
Development

No branches or pull requests

3 participants