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

List of documents opened by collaborators #284

Open
brichet opened this issue Apr 16, 2024 · 3 comments
Open

List of documents opened by collaborators #284

brichet opened this issue Apr 16, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@brichet
Copy link
Contributor

brichet commented Apr 16, 2024

The collaborators panel display the current shared document of a collaborator.

It could be interesting to display a list of all shared documents on which a collaborator is working.

Problem

To find the current shared document, we use the statedb -> layout-restorer -> main of Jupyterlab, and display the document only if the widget is a notebook or an editor.

state.changed.connect(async () => {
const data: any = await state.toJSON();
const current = data['layout-restorer:data']?.main?.current || '';
if (current.startsWith('editor') || current.startsWith('notebook')) {
awareness.setLocalStateField('current', current);
} else {
awareness.setLocalStateField('current', null);
}
});

The drawbacks of this implementation are:

  • the widgets that can host shared documents are hard coded
  • the shared document is tracked by the layout-restorer (which is not related to collaboration)
  • the shared document must be opened in the main area (e.g. chat which could be opened in a side panel)

In addition we only track here the current shared document in the main area, but not other shared documents opened in main area.

Proposed Solution

We could instead update a list of documents every time a user opens or closes a shared document, from the YDrive.

The collaborators panel could open the list of documents when clicking on the user (accordion widget).
Perhaps the current one in the main area could be highlighted as the main document the collaborator is working on.

@brichet brichet added the enhancement New feature or request label Apr 16, 2024
Copy link

welcome bot commented Apr 16, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@Zsailer
Copy link
Member

Zsailer commented Apr 18, 2024

This would be a great addition, @brichet!

Alternatively, I would love to have an option to display this data in a slightly different way. I'd like to see each document as a top level item, and list all users who have opened that document as a subtree underneath it.

@brichet
Copy link
Contributor Author

brichet commented Apr 18, 2024

I'd like to see each document as a top level item, and list all users who have opened that document as a subtree underneath it.

We were discussing this with @martinRenou a short while ago.
Probably both information can be useful, list of files for a user and list of users for a file.
@martinRenou proposed to add user icons in a new column of the existing filebrowser, to avoid duplicate a file tree in the collaboration panel.

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

No branches or pull requests

2 participants