Skip to content

Conversation

@max-nextcloud
Copy link
Collaborator

📝 Summary

Introduce hasEditor as reactive data to dynamically reload the MainContainer.

$editor is not reactive.
Once the MainContainer was rendered it stayed - even when $editor was reset during reconnection.
The child components of MainContainer would still use the old $editor value.

This Pull request includes some refactoring and cleanup commits before and after the actual change.

Tests are not included as i could not think of a way to trigger the connection to expire.

@max-nextcloud

This comment was marked as outdated.

@max-nextcloud
Copy link
Collaborator Author

/backport a6913ea to stable25

@cypress
Copy link

cypress bot commented Jan 1, 2023



Test summary

116 0 0 0Flakiness 0


Run details

Project Text
Status Passed
Commit ce89a30
Started Jan 4, 2023 8:07 AM
Ended Jan 4, 2023 8:10 AM
Duration 02:54 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Also good idea to pull out the moment updating.

@juliusknorr
Copy link
Member

For a cypress test we could probably intercept the create session request, store the session id and token and then manually issue a close session request in the test.

* Use a computed to react on changes to document.lastSavedVersionTime.
* Make the computed refresh every 20 seconds to dynamically update.

Signed-off-by: Max <[email protected]>
Introduce `hasEditor` as reactive data to dynamically reload the MainContainer.

$editor is not reactive.
Once the MainContainer was rendered it stayed - even when the connection expired.
The child components of MainContainer would still have the old $editor value.

Fixes #3374.

Signed-off-by: Max <[email protected]>
Move the event listener removal out of the close function
and use it to disconnect when attempting to reconnect.

Signed-off-by: Max <[email protected]>
@juliusknorr
Copy link
Member

/compile

Signed-off-by: nextcloud-command <[email protected]>
@juliusknorr juliusknorr merged commit 162caff into master Jan 4, 2023
@juliusknorr juliusknorr deleted the fix/reconnect branch January 4, 2023 08:17
@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@mejo-
Copy link
Member

mejo- commented Jan 4, 2023

/backport 434f6e5,9b98212757b4af01534b73101eaba1c607bb1840,b7ec01b51fb9226086cde978ce35728aca022923,7360d1c8db69bab8c9ae64f104ec904249a0227d to stable25

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@mejo- mejo- added backported successfully backported and removed backport-request labels Jan 5, 2023
@mejo-
Copy link
Member

mejo- commented Jan 5, 2023

The relevant parts have been backported to stable25 in #3635 thanks to @max-nextcloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported successfully backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconnect after idle broken

4 participants