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

Removes the initialization of the dirty property from the frontend #4

Merged
merged 2 commits into from
May 13, 2022

Conversation

hbcarlos
Copy link
Collaborator

References

Code changes

User-facing changes

Backwards-incompatible changes

@hbcarlos hbcarlos added the bug Something isn't working label May 12, 2022
Copy link
Owner

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

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

Thanks Carlos.
I see you removed the clearing of the dirty flag, but what about the setting?

@hbcarlos
Copy link
Collaborator Author

Good point, no need to have it since we will never modify the attribute from the frontend.

@davidbrochart
Copy link
Owner

Although I can't see where, the dirty flag is still set from the front-end, because when one client changes a document, another one has its dirty flag set.

@davidbrochart
Copy link
Owner

OK so after discussing, it is normal that the dirty flag is "seen" by several clients, because they see the document changing and set their local dirty flag.
Merging! Thanks Carlos.

@davidbrochart davidbrochart merged commit 576b02b into davidbrochart:load_yjs May 13, 2022
@hbcarlos hbcarlos deleted the local_dirty_property branch May 13, 2022 14:31
fcollonval added a commit that referenced this pull request May 18, 2022
* Load document from the back-end using y-py

* Load only documents metadata when collaborative

* Delay closing the room in the backend

* Update Yjs

* Fix notebook ycell initialization

* Watch file change in the back-end and overwrite Y document

* Automatically save from the back-end

* Small fixes

* Use ypy-websocket's WebsocketServer

* Poll for file changes for now, until watchfiles is fixed

* Use ypy-websocket v0.1.2

* Remove watchfiles

* Rename save_document to maybe_save_document, add collab_file_poll_interval config

* Workaround ypy bug

* Fix for new notebook

* Use jupyter_ydoc

* Rename yjs_echo_ws.py->ydoc_handler.py, YjsEchoWebSocket->YDocWebSocketHandler

* Update ypy-websocket and jupyter_ydoc minimum versions

* Use ypy-websocket>=0.1.6

* Update jupyter_ydoc>=0.1.4

* Move WEBSOCKET_SERVER global variable to YDocWebSocketHandler class attribute

* Fix tests

* Update jupyterlab/staging/package.json

* Rename collab_file_poll_interval to collaborative_file_poll_interval, update extension migration documentation

* Set room name as file_type:file_name

* Don't save file if already on disk

* Pin jupyter_ydoc>=0.1.5

* Set room name as format:type:path

* Disable save button

* Show caption only in collaborative mode

* Sync file attributes with room name

* Clear dirty flag when opening document

* Pin jupyter_ydoc>=0.1.7 which observes the dirty flag

* Don't save when dirty flag cleared

* Moves nbformat and nbformat_minor to ymeta, changes the YNotebook eve… (#2)

* Moves nbformat and nbformat_minor to ymeta, changes the YNotebook event to support the new nbformat, and adds a local dirty property

* Pin jupyter_ydoc>=0.1.8

* Adds a local dirty property in the DocumentModel (#3)

* Removes the initialization of the dirty property from the frontend (#4)

* Removes the initialization of the dirty property from the frontend

* Remove setting dirty in the SharedDocument

Co-authored-by: hbcarlos <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
davidbrochart pushed a commit that referenced this pull request May 25, 2022
* Notebook toolbar buttons do not respect context
Fixes jupyterlab#12177

* Make sure main area widget focuses its content in bubble phase of mousedown (#4)

Co-authored-by: Afshin Taylor Darian <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working pkg:shared-models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants