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: Editor history visualization #24

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

Conversation

Henry-Wow
Copy link

Enhanced the editor history visualization system to improve operation history tracking and display in collaborative editing scenarios. The main improvements focus on:

  1. Added editor-history.ts:
  • Implemented core logic for converting editor operations to DAG nodes
  1. Updated history visualization components:
  • BasicWithHistory: Added single editor history tracking
  • SyncWithHistory: Improved two-editor synchronization with history
  • OfflineSyncWithHistory: Enhanced offline/online state handling
  • MultiOfflineSyncWithHistory: Added support for multiple editor synchronization

@zxch3n zxch3n changed the title Update: Editor history visualization Feat: Editor history visualization Dec 23, 2024
@Henry-Wow
Copy link
Author

_Update_.Editor.history.visualization.mp4

@zxch3n
Copy link
Member

zxch3n commented Dec 24, 2024

Awesome!

timestamp: number;
}

const storedOperations: StoredOperation[] = [];
Copy link
Member

Choose a reason for hiding this comment

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

This should be inside convertSyncStepsToNodes

});

// If the operation has not already been stored
if (!storedOperations.some(op => op.id === opId)) {
Copy link
Member

Choose a reason for hiding this comment

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

This is slow, you can use a Set to detect whether it's stored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants