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

feat(session): Send save request via sendBeacon at beforeunload #6798

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Dec 18, 2024

📝 Summary

This will send a final save request on unsaved changes via the browsers native navigator.sendBeacon() function when navigating away from the website or the tab/browser is closed.

Fixes: #6606

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

@mejo- mejo- added bug Something isn't working 3. to review labels Dec 18, 2024
@mejo- mejo- requested a review from juliusknorr December 18, 2024 13:38
@mejo- mejo- self-assigned this Dec 18, 2024
@mejo- mejo- requested a review from max-nextcloud as a code owner December 18, 2024 13:38
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.

Project coverage is 37.88%. Comparing base (40a655a) to head (2fa0402).

Files with missing lines Patch % Lines
src/services/SessionApi.js 0.00% 13 Missing ⚠️
src/services/SyncService.js 0.00% 11 Missing ⚠️
src/components/Editor.vue 0.00% 9 Missing ⚠️
src/components/Editor/Status.vue 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6798      +/-   ##
==========================================
- Coverage   37.89%   37.88%   -0.01%     
==========================================
  Files         750      742       -8     
  Lines       42560    42567       +7     
  Branches     1268     1260       -8     
==========================================
  Hits        16127    16127              
- Misses      25811    25826      +15     
+ Partials      622      614       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@max-nextcloud max-nextcloud self-assigned this Dec 19, 2024
@max-nextcloud max-nextcloud force-pushed the feat/send_beacon_on_close branch from bd683d4 to 009a095 Compare February 3, 2025 15:30
mejo- added 2 commits February 5, 2025 12:13
This will send a final save request on unsaved changes via the browsers
native `navigator.sendBeacon()` function when navigating away from the
website or the tab/browser is closed.

Fixes: #6606

Signed-off-by: Jonas <jonas@freesources.org>
@max-nextcloud max-nextcloud force-pushed the feat/send_beacon_on_close branch from 009a095 to 2fa0402 Compare February 5, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

Block closing/navigating away with unsaved changes
2 participants