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

[web] Warn user about pending requests when attempting to close the browser(-tab) #10954

Closed
12 tasks
kulmann opened this issue May 23, 2024 · 3 comments · Fixed by #10986
Closed
12 tasks

[web] Warn user about pending requests when attempting to close the browser(-tab) #10954

kulmann opened this issue May 23, 2024 · 3 comments · Fixed by #10986
Assignees
Labels
Type:Story User Story Web-only Issue without backend dependecies

Comments

@kulmann
Copy link
Member

kulmann commented May 23, 2024

Description

When a user attempts to close the browser(-tab) we should warn them about pending requests (e.g. from batch operations) that would be aborted by closing.

User Stories

  • As a user who started a batch operation for deleting a large number of files, I'd be annoyed if closing the browser aborted my batch operation, because I expect the process to finish.

Value

Educate users about batch operations being orchestrated by the web ui. -> less bug reports.

Acceptance Criteria

  • if the loadingService has any unfinished process and the user attempts to close the browser(-tab), show a warning that closing the browser(-tab) would abort pending requests.
  • Closing the browser while an upload is running already has such a message. There should not be two after this story is done (i.e. a: have a new concept and also use it for uploads or b: make an exception for uploads so that we continue to use the already existing mechanism there, slightly preferring a, but might not be feasible. needs to be checked.)
  • Closing the browser while a document editing session is in a dirty state (i.e. file not saved) also already has such a message. see above.

Definition of ready

  • Everybody needs to understand the value written in the user story
  • Acceptance criteria have to be defined
  • All dependencies of the user story need to be identified
  • Feature should be seen from an end user perspective
  • Story has to be estimated
  • Story points need to be less than 20

Definition of done

  • Functional requirements
    • Functionality described in the user story works
    • Acceptance criteria are fulfilled
  • Quality
    • Code review happened
    • CI is green (that includes new and existing automated tests)
    • Critical code received unit tests by the developer
  • Non-functional requirements
    • No sonar cloud issues

Additional context

This was pointed out by @mbuonaccorsi in #9182 (comment) - thanks for the input.

@kulmann kulmann added Type:Story User Story Web-only Issue without backend dependecies labels May 23, 2024
@AlexAndBear
Copy link
Contributor

Maybe some kind of axios http interceptor possible

@JammingBen
Copy link
Collaborator

I guess this is what we're looking for: https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event. Then just check for loadingService.isLoading() and show the user some prompt.

@kulmann
Copy link
Member Author

kulmann commented May 24, 2024

I guess this is what we're looking for: https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event. Then just check for loadingService.isLoading() and show the user some prompt.

We're already using exactly that in the AppWrapper and for active upload queues :-)

@kulmann kulmann changed the title Warn user about pending requests when attempting to close the browser(-tab) [web] Warn user about pending requests when attempting to close the browser(-tab) May 27, 2024
@AlexAndBear AlexAndBear self-assigned this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Story User Story Web-only Issue without backend dependecies
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants