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

Implementing Collaborative Timeline Slider with Undo/Redo Functionality for Jupyter Collaboration #332

Conversation

Meriem-BenIsmail
Copy link
Contributor

Description:

This pull request introduces a comprehensive timeline and undo/redo functionality to the Jupyter Collaboration project. The primary goal of this feature is to enhance the collaborative experience by allowing users to track changes, restore previous versions of documents, and seamlessly undo or redo actions.

Key Features:

  1. Timeline Slider Component:
    • Added a component (TimelineSliderComponent) that provides an interactive slider to navigate through the history of document changes.
    • The slider fetches and displays timestamps of changes, allowing users to select specific versions of the document and to restore them if needed.
  2. Document Forking and Restoration:
    • Implemented functions to fork the current state of the document and create new versions.
    • Users can restore the document to any previous state using the restore mode.
  3. Undo/Redo Management:
    • Integrated UndoManager to handle undo and redo operations for document edits.
    • Users can perform multiple undo/redo actions to revert or reapply changes.
  4. API Enhancements:
    • Extended the existing API to support timeline fetching and document restoration.
    • Introduced new endpoints for creating document forks and managing undo/redo operations.
  5. Notifications:
    • Implemented user notifications to provide feedback on actions such as successful document restoration or errors.

Usage:

  1. Accessing the Timeline:
    • Click on the history icon in the status bar to open the timeline slider.
    • Use the slider to navigate through different versions of the document.
  2. Restoring a Version:
    • Select a desired timestamp from the slider and click the "Restore version" button to revert the document to the selected state.
    • A notification will confirm the successful restoration or display an error if the operation fails.
  3. Undo/Redo Actions:
    • Use the timeline slider to perform undo/redo operations by moving back and forth between timestamps.

Note: The timeline is tested with various document types, including notebooks and files in different directory structures and also YJCad files of JupyterCAD.

Here is a demo of the functionality
timeline-rtc-feature

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Binder 👈 Launch a Binder on branch Meriem-BenIsmail/jupyter-collaboration/collaborative-timeline-feature

dependency conflicts

fixed timestamp order

fork handler added

connect fork

read only notebook connected (fork)

fork document in frontend

fork in the frontend + apply updates

added fork indication to the page

added fork indication to the page

distinction between fork and original document added to slider

adjustement in fork handler

file

add css slider

context menu option for opening file (fork) + timeline added

notebook condition added

file menu option to open timeline for notebook

alternative: add file menu option to open right widget

added timeline slider to status bar

slider added to status bar

status bar timeline slider with logic to switch between notebooks added

error handling in the backend handler

clean console

add isActive to the registerStatusItem

fix: internal server error fixed in updateTimelineforNotebook function

fork cnd added to timeline status bar plugin

undo manager refactoring

fork logic for 1 notebook.

fork logic implemented for multiple notebooks opened at the same time

ydoc.share

fork works with multiple notebooks + freezing notebook when sliding through timeline

notebook id

testing cad

undo manager tests

clearDoc method

remove is timelineFork open

rebase

build error resolved

using undo manager in the backend

undo/redo steps added

freeze document

updated to the new version of pycrdt, fixed problem with undostack

rebase

restore version btn

undo manager agnostic for different type of documents

restoring version

restoring version

restore btn : fix style

delete unused files

delete unused files

jupytercad

jupyter cad

jupytercad integration + rebase main

conflicts

conflicts

fixed console error: empty response.

icon visible only when data is not null

moving fetch timeline in slider component: on click of the history button

get format & content type from query params

get format & content type from query params: fix updating contenttype and format when switching between documents

remove sharedmodel from update content

support for documents inside folders/subfolders.

clean drive.ts

move test files in folder

delete unused dependency

return comments deleted by accident

fixes in jupyter-server-ydoc

delete test documents

add test-folder to gitignore

styling restore button

styling restore button

pre commit hooks
@Meriem-BenIsmail Meriem-BenIsmail force-pushed the collaborative-timeline-feature branch from e156b6d to c9685da Compare August 1, 2024 21:16
Meriem-BenIsmail and others added 5 commits August 6, 2024 10:19
dependency conflicts

fixed timestamp order

fork handler added

connect fork

read only notebook connected (fork)

fork document in frontend

fork in the frontend + apply updates

added fork indication to the page

added fork indication to the page

distinction between fork and original document added to slider

adjustement in fork handler

file

add css slider

context menu option for opening file (fork) + timeline added

notebook condition added

file menu option to open timeline for notebook

alternative: add file menu option to open right widget

added timeline slider to status bar

slider added to status bar

status bar timeline slider with logic to switch between notebooks added

error handling in the backend handler

clean console

add isActive to the registerStatusItem

fix: internal server error fixed in updateTimelineforNotebook function

fork cnd added to timeline status bar plugin

undo manager refactoring

fork logic for 1 notebook.

fork logic implemented for multiple notebooks opened at the same time

ydoc.share

fork works with multiple notebooks + freezing notebook when sliding through timeline

notebook id

testing cad

undo manager tests

clearDoc method

remove is timelineFork open

rebase

build error resolved

using undo manager in the backend

undo/redo steps added

freeze document

updated to the new version of pycrdt, fixed problem with undostack

rebase

restore version btn

undo manager agnostic for different type of documents

restoring version

restoring version

restore btn : fix style

delete unused files

delete unused files

jupytercad

jupyter cad

jupytercad integration + rebase main

conflicts

conflicts

fixed console error: empty response.

icon visible only when data is not null

moving fetch timeline in slider component: on click of the history button

get format & content type from query params

get format & content type from query params: fix updating contenttype and format when switching between documents

remove sharedmodel from update content

support for documents inside folders/subfolders.

clean drive.ts

move test files in folder

delete unused dependency

return comments deleted by accident

fixes in jupyter-server-ydoc

delete test documents

add test-folder to gitignore

styling restore button

styling restore button

pre commit hooks

fixed pre commit issues

fixed pre commit issues

add license header to new files

pre commit hooks

python test: added jupytercad_core to CI/CD workflow

python test debug

python test debug
@Meriem-BenIsmail Meriem-BenIsmail force-pushed the collaborative-timeline-feature branch from f5f5668 to 8017806 Compare August 6, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants