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

Messages as a list in collaborative chat document #31

Merged
merged 5 commits into from
May 15, 2024

Conversation

brichet
Copy link
Collaborator

@brichet brichet commented May 14, 2024

This PR aims to use a list of messages in YChat document, instead of a Map.

Fixes #25

Before this PR, the messages order was handled in the chat component itself.
With this PR, the messages list is handled in the model, and used by the chat component. It adds some function to insert or delete messages with index.

The collaborative chat document now saves messages in a list and is responsible for the message order. That way the order is computed only once, when a message is added, server side. It make use of the insert/delete functions of the model to set the order in front end side.

@brichet brichet added the enhancement New feature or request label May 14, 2024
@brichet brichet changed the title Use list in collaborative chat Messages as a list in collaborative chat document May 14, 2024
@brichet brichet marked this pull request as ready for review May 15, 2024 06:07
@brichet brichet merged commit 8e91bbb into jupyterlab:main May 15, 2024
10 checks passed
@brichet brichet deleted the messages_list branch May 15, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question about collaborative chat shared document
1 participant