-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Chatbox #2118
Chatbox #2118
Conversation
Wow! absolutely fantastic!!! @cameronoelsen
…On Thu, Apr 27, 2017 at 8:17 AM, Ian Rose ***@***.***> wrote:
This is a start of a chatbox widget for collaborative documents. It lives
on the sidepanel and shares the same collaborator pool as the currently
active collaborative document. It is not fully functional at the moment
(contingent on #2058 <#2058>),
but has the right basic behavior.
[image: chat]
<https://cloud.githubusercontent.com/assets/5728311/25490317/550f3bc6-2b21-11e7-8081-7944b2dc2b62.png>
Things that currently work:
- Multiple users, with different color text bubbles.
- Rendering with markdown.
- Showing different chats depending upon the active document.
Things that are not currently working:
- Some variety of paging for long chatlogs.
- It would be cool to be able to drag chat entries into a notebook as
markdown cells.
cc @ellisonbg <https://github.com/ellisonbg> @cameronoelsen
<https://github.com/cameronoelsen>
------------------------------
You can view, comment on, or merge this pull request online at:
#2118
Commit Summary
- Copy code console as a starting point for a chatbox.
- Add to lerna build.
- Console -> chatbox
- Remove ForeignHandler.
- Work on using Markdown cells.
- Wip stylin
- Strip out all kernel/session info.
- Fix creation from launcher.
- Remove instance tracker logic.
- Cleanup
- Remove history from chatbox.
- More cleanup
- Make the chat per-document.
- Simplify content factories further.
- Add chat entry widget, with some clumsy css.
- Remove some unused stuff.
- Route all widget actions through the log so collaboration will work.
- Add layout restoration to chatbox.
- Clean up disposal logic.
- Remove unnecessary styling.
- Call update() to invoke scollToBottom().
- Work on adding document title to chatbox.
- More work on info panel.
- Remove yet more unused stuff.
- Try to make DocumentInfo styling less embarassing.
- Remove unused dependencies.
- Remove unused dependencies from chatbox extension.
- Revert Enter key behavior to submit-on-enter.
File Changes
- *M* jupyterlab/package.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-0> (2)
- *M* jupyterlab/src/main.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-1> (4)
- *M* packages/all-packages/package.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-2> (2)
- *M* packages/all-packages/src/index.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-3> (2)
- *A* packages/chatbox-extension/package.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-4> (44)
- *A* packages/chatbox-extension/src/index.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-5>
(128)
- *A* packages/chatbox-extension/tsconfig.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-6> (15)
- *A* packages/chatbox/package.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-7> (46)
- *A* packages/chatbox/src/chatbox.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-8>
(493)
- *A* packages/chatbox/src/entry.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-9>
(107)
- *A* packages/chatbox/src/index.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-10> (7)
- *A* packages/chatbox/src/panel.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-11>
(263)
- *A* packages/chatbox/style/index.css
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-12>
(91)
- *A* packages/chatbox/tsconfig.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-13>
(15)
- *M* packages/default-theme/package.json
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-14> (1)
- *M* packages/default-theme/style/icons.css
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-15> (9)
- *A* packages/default-theme/style/icons/md/chat.svg
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-16> (4)
- *M* packages/default-theme/style/index.css
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-17> (1)
- *M* packages/shortcuts-extension/src/index.ts
<https://github.com/jupyterlab/jupyterlab/pull/2118/files#diff-18>
(10)
Patch Links:
- https://github.com/jupyterlab/jupyterlab/pull/2118.patch
- https://github.com/jupyterlab/jupyterlab/pull/2118.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2118>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0K8IY349Wz_2kOhP9raDGWdEKVhQks5r0LFygaJpZM4NKXbr>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com
|
Very cool. It would be great to support mathjax too. |
MathJax works. The chat entries are just markdown cells with some stripped-down styling. |
CC @williamstein, who has something like this in SMC. William, do you have any suggestions or tips from your experience with chats associated with documents? |
That. Is. Slick. |
I can imagine this being particularly nice in single-document mode - change the document, and the chat channel changes to the new document. |
This is sweet @ian-r-rose! Pinging @faricacarroll, we had a meeting yesterday conceptualizing the initial chat experience and she should have some wireframes/mockups in the next week! |
packages/chatbox/src/chatbox.ts
Outdated
} | ||
set model(model: DocumentRegistry.IModel) { | ||
this._model = model; | ||
let modelDB: any = (this._model as any).modelDB; |
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.
Is this casting as any
temporary until the real-time handler PR goes in?
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.
Yeah, there are a few temporary stubs in this PR that I will take care of after the #2058 is resolved.
494d542
to
a859e85
Compare
@jasongrout since you asked, here is the analogue in SageMathCloud of the above screenshot: |
@williamstein thanks for the input. |
@ian-r-rose If it's not persisted in the notebook, was this your motivation for allowing for parts of the thread to get dragged to a markdown cell in the notebook (I think you are doing this in widget.ts?) as an alternative form of persistence? |
@Analect We have been working on an abstracted database for storing document models that different backends can implement. The chat log gets stored in that database, and is persistent if the database is. The default, in memory notebook is not persisted except through the normal save mechanism, so the chatlog would likewise not be persisted for that case (in fact, I am not even showing it in that case). It is not currently serialized as part of the The markdown cell dragging is just something that we thought would be neat, and perhaps useful to some people. Since I was already representing chat entries internally as markdown cells, it was relatively easy to add. |
Thanks @ian-r-rose for the quick response. So just so I'm clear, is your work on widget.ts about dragging markdown cells from your notebook to a chat thread ... or the other way around? Just trying to get a better understanding (on jupyterlab gitter here) of emulating your approach for something not necessarily involving a chat thread ... but where I want to inject pre-existing *.md files in order to give a skeleton to an *.ipynb file ... and ideally do this programmatically. |
At the moment I only have dragging of chat cells into a notebook, not the other way around. It would not be too much work to do the other way, though. |
There is more that can be done with the styling and UI, but I am fairly happy with the basic functionality here. Note that the chatbox tab does not even appear unless a collaborative document is made active. |
Nice! That was one concern I was going to bring up. |
I am fine with us merging this and having @cameronoelsen do a design pass. Ready to go? |
I am happy with it. I expect a couple of minor conflicts with #2232. |
I'd like to do another review pass. |
background-image: url(icons/md/chat.svg); | ||
} | ||
|
||
.jp-CloseIcon { |
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.
Redundant definition
Nice! |
This is a start of a chatbox widget for collaborative documents. It lives on the sidepanel and shares the same collaborator pool as the currently active collaborative document. It is not fully functional at the moment (contingent on #2058), but has the right basic behavior.
Things that currently work:
Things that are not currently working:
cc @ellisonbg @cameronoelsen