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

Add a diagram dirty state #135

Closed
1 task done
hmarchadour opened this issue Nov 27, 2020 · 2 comments
Closed
1 task done

Add a diagram dirty state #135

hmarchadour opened this issue Nov 27, 2020 · 2 comments
Assignees

Comments

@hmarchadour
Copy link

hmarchadour commented Nov 27, 2020

  • I have checked that this feature has not yet been suggested by someone else.

Expected behavior

There is a time laps between an invoke mutation and the related refresh.
This time laps involves some strange UX behaviors that we can avoid with a dirty state flag.

Use case:

  • T0: A mutation (Label edit/invoke delete tool/invoke node or edge tool) is triggering. There is two ways:
    • T1: the mutation succeed
      • T2: a diagram refresh happens
    • T1': the mutation failed

During these time laps (T0/T2 or T0/T1'), the diagram is in a dirty state.
We should avoid to propose the contextual palette when the user select a diagram element (especially after an invoke tool)

This proposition is based on a premise: a mutation in success will always update something and throw a diagram refresh
This proposition may be invalid if this premise is (or becomes) invalid.

Cuttings backs

None

Potential side effects

  • Contextual palette

Describe alternatives you've considered

We could involve the dirty state only between (T1/T2)

@pcdavid
Copy link
Member

pcdavid commented Dec 1, 2020

I'm not sure "dirty" is the best name for the intermediate state. I don't have a better name (maybe "busy"? or "waiting"? not fond of it but I can't find a better alternative at the moment). The usual meaning of "dirty" is more "contains changes which have not yet been saved on permanent storage", which is not the case here.

Side note: it's time lapse not laps. Laps exists but is somehting else.

hmarchadour pushed a commit that referenced this issue Dec 1, 2020
The dirty boolean means that the diagram will be refreshed (after a
mutation)
We use this "flag" to disable some UX feature like the contextualPalette

Fixes #135

Signed-off-by: Hugo Marchadour <hugo.marchadour@obeo.fr>
@sbegaudeau
Copy link
Member

I am not sure where this premise a mutation in success will always update something and throw a diagram refresh's coming from but it does not exist anywhere in the architecture.

A mutation triggers something to be performed on the project. If the mutation is successful, something may occur which may trigger a refresh.

hmarchadour pushed a commit that referenced this issue Dec 2, 2020
The dirty boolean means that the diagram will be refreshed (after a
mutation)
We use this "flag" to disable some UX feature like the contextualPalette

Fixes #135

Signed-off-by: Hugo Marchadour <hugo.marchadour@obeo.fr>
hmarchadour pushed a commit that referenced this issue Dec 3, 2020
The dirty boolean means that the diagram will be refreshed (after a
mutation)
We use this "flag" to disable some UX feature like the contextualPalette

Fixes #135

Signed-off-by: Hugo Marchadour <hugo.marchadour@obeo.fr>
hmarchadour pushed a commit that referenced this issue Dec 10, 2020
The dirty boolean means that the diagram will be refreshed (after a
mutation)
We use this "flag" to disable some UX feature like the contextualPalette

Fixes #135

Signed-off-by: Hugo Marchadour <hugo.marchadour@obeo.fr>
hmarchadour pushed a commit that referenced this issue Dec 10, 2020
The dirty boolean means that the diagram will be refreshed (after a
mutation)
We use this "flag" to disable some UX feature like the contextualPalette

Fixes #135

Signed-off-by: Hugo Marchadour <hugo.marchadour@obeo.fr>
hmarchadour pushed a commit that referenced this issue Dec 11, 2020
The dirty boolean means that the diagram will be refreshed (after a
mutation)
We use this "flag" to disable some UX feature like the contextualPalette

Fixes #135

Signed-off-by: Hugo Marchadour <hugo.marchadour@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants