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

External change update cannot be canceled #1188

Closed
nikku opened this issue Feb 11, 2019 · 5 comments
Closed

External change update cannot be canceled #1188

nikku opened this issue Feb 11, 2019 · 5 comments
Assignees
Labels
bug Something isn't working platform:Linux
Milestone

Comments

@nikku
Copy link
Member

nikku commented Feb 11, 2019

Describe the Bug

The external change dialog cannot be canceled right now:

bug

Steps to Reproduce

Steps to reproduce the behavior:

  • Open diagram in editor
  • Externally change diagram
  • When asked whether to update choose Cancel

Expected Behavior

  • Dialog does not appear unless file is changed externally again

Environment

Please complete the following information:

  • OS: Linux (may apply to others, too)
  • Camunda Modeler Version: v3.0.0-0
@nikku nikku added the bug Something isn't working label Feb 11, 2019
@pinussilvestrus
Copy link
Contributor

The fact that I can't reproduce it on MacOS leads me to the opinion that it fallbacks to misleading describes in #1150. After the user pressed on cancel, the mainWindow#focus event got triggered again, which does not get locked from our new executeOnce method, since canceling already ends the lock.

@pinussilvestrus
Copy link
Contributor

One solution would be to wait a moment after the dialog's got canceled. This will prevent the window from creating a new dialog since it would still run inside the executeOnce function. @nikku What do you think?

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Feb 26, 2019

On the latest nightly build I was not able to reproduce it on macOS and Windows. However, it seems to be still there on Linux.

@nikku nikku self-assigned this Feb 26, 2019
nikku added a commit that referenced this issue Feb 26, 2019
This commit ensures we mark a file as unsaved
if the user cancels a file update request.

It also ensures that we cache the lastModified last
checked (and handled by the user) so that we don't
re-execute the check every time the tab gets re-focused.

Closes #1188
@ghost ghost added in progress Currently worked on and removed ready Ready to be worked on labels Feb 26, 2019
@ghost ghost added needs review Review pending and removed in progress Currently worked on labels Feb 26, 2019
@nikku
Copy link
Member Author

nikku commented Feb 26, 2019

It turns out that there were a few things broken in the external file changed department:

  • regardless of whether the user accepts or cancels the reload we should persist the last-modified (so that the user is not bothered with repeating update notifications)
  • if the user pressed cancel there was no indication that the file displayed is not the one on disk

I presume the issue only surfaced on Linux, as the focus sequence is different on Mac + Windows.

PR #1277 fixes the issue and adds proper unsaved notification if the user cancels the update.

nikku added a commit that referenced this issue Feb 26, 2019
This commit ensures we mark a file as unsaved
if the user cancels a file update request.

It also ensures that we cache the lastModified last
checked (and handled by the user) so that we don't
re-execute the check every time the tab gets re-focused.

Closes #1188
@pinussilvestrus pinussilvestrus added ready Ready to be worked on and removed needs review Review pending labels Feb 27, 2019
nikku added a commit that referenced this issue Feb 27, 2019
This commit ensures we mark a file as unsaved
if the user cancels a file update request.

It also ensures that we cache the lastModified last
checked (and handled by the user) so that we don't
re-execute the check every time the tab gets re-focused.

Closes #1188
merge-me bot pushed a commit that referenced this issue Feb 27, 2019
This commit ensures we mark a file as unsaved
if the user cancels a file update request.

It also ensures that we cache the lastModified last
checked (and handled by the user) so that we don't
re-execute the check every time the tab gets re-focused.

Closes #1188
@pinussilvestrus
Copy link
Contributor

Closed via #1277.

@ghost ghost removed the ready Ready to be worked on label Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform:Linux
Projects
None yet
Development

No branches or pull requests

2 participants