-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add Text devtool to CodeMirror example #646
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #646 +/- ##
==========================================
+ Coverage 88.83% 88.88% +0.04%
==========================================
Files 80 80
Lines 8942 8958 +16
Branches 823 825 +2
==========================================
+ Hits 7944 7962 +18
+ Misses 689 688 -1
+ Partials 309 308 -1 ☔ View full report in Codecov by Sentry. |
2029e7a
to
be08bf7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
devtools
seems useful for understanding the state of data structure and this is a good start to implement internal devtool. I left a suggestion.
It appears that the styles and functions defined in devtools/text.js and devtools/text.css are globally defined. This could potentially lead to conflicts when adding other data structures. How about bundling them into a module like devtools.text
to avoid potential conflicts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
What this PR does / why we need it?
I added a devtool to the CodeMirror example that allows monitoring of CRDT Text. This devtool is an adaptation of the text editor devtool work done by @easylogic, modified to align with the current Yorkie version.
How to Run:
Visit the URL: http://localhost:9000/codemirror-devtool.html
Features
devtool1.mov
text
,structure data
,structure text
SplayTree
,LLRBTree
dev1.mov
text
,structure data
, ortree
view highlights and focuses on the respective node.devtool2.mov
In the previous PR, it included information to monitor how skewed the splay tree was. However, in this PR, I have removed this feature to prioritize the most basic functionality. We can consider adding it back when needed.
Any background context you want to provide?
The previous work by @easylogic in this PR: #467
Thanks to the devtool, CRDT Text has become much more user-friendly to understand and easier to debug. This is amazing and incredibly helpful! Thank you, @easylogic.
What are the relevant tickets?
Fixes #
Checklist