-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add hook for hyper-htm plugin: https://github.com/MisterTea/hyper-htm #3026
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
Changes from all commits
510cf45
8600c0c
b6944d5
451dc0e
31e4dd9
38c65ae
0803c5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,10 +44,7 @@ rpc.on('session add', data => { | |
| store_.dispatch(sessionActions.addSession(data)); | ||
| }); | ||
|
|
||
| rpc.on('session data', d => { | ||
| // the uid is a uuid v4 so it's 36 chars long | ||
| const uid = d.slice(0, 36); | ||
| const data = d.slice(36); | ||
| rpc.on('session data', ({uid, data}) => { | ||
| store_.dispatch(sessionActions.addSessionData(uid, data)); | ||
| }); | ||
|
|
||
|
|
@@ -103,16 +100,16 @@ rpc.on('session break req', () => { | |
| store_.dispatch(sessionActions.sendSessionData(null, '\x03')); | ||
| }); | ||
|
|
||
| rpc.on('termgroup add req', () => { | ||
| store_.dispatch(termGroupActions.requestTermGroup()); | ||
| rpc.on('termgroup add req', ({termGroupUid, sessionUid}) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will these params always be undefined without your plugin? 🤔
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point. Let me set them upstream |
||
| store_.dispatch(termGroupActions.requestTermGroup(termGroupUid, sessionUid)); | ||
| }); | ||
|
|
||
| rpc.on('split request horizontal', () => { | ||
| store_.dispatch(termGroupActions.requestHorizontalSplit()); | ||
| rpc.on('split request horizontal', ({sessionUid, activeUid}) => { | ||
| store_.dispatch(termGroupActions.requestHorizontalSplit(sessionUid, activeUid)); | ||
| }); | ||
|
|
||
| rpc.on('split request vertical', () => { | ||
| store_.dispatch(termGroupActions.requestVerticalSplit()); | ||
| rpc.on('split request vertical', ({sessionUid, activeUid}) => { | ||
| store_.dispatch(termGroupActions.requestVerticalSplit(sessionUid, activeUid)); | ||
| }); | ||
|
|
||
| rpc.on('reset fontSize req', () => { | ||
|
|
||
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.
@chabou Why was this done instead of using an object? Let me know if you want me to revert this part of the PR (I have no idea why to encode the uid + data in this way, but there may be a reason).