sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.16k stars 212 forks source link

Feature Request: View 2 Documents/Notebooks/Apps side-by-side #4924

Closed flutefreak7 closed 1 month ago

flutefreak7 commented 3 years ago

It would be very useful to be able to see two notebooks (or applications) side-by-side, but was disappointed to realize that the multi-pane functionality is currently limited to seeing different views of a single file or application.

Common workflows might be looking at 2 notebooks at the same time, looking at a notebook while typing in a Markdown or Latex document, etc

Ideas:

  1. Add file-switching somehow to the pane toolbar where one can select between Notebook, TOC, Timeline, raw, etc, so any view in an existing set of panels can be any document.
    • An obvious concern arises here that it breaks the tab analogy because when we switch a top-level CoCalc tab to a different document or application, we expect to then see view(s) of that document. If all the panels within a tab could be changed to view other documents, then the document tabs no longer make sense - you'd have to fully replace window-level doc-switching with pane-level doc switching, which is less intuitive for simpler use-cases.
    • I just realized there are also project tabs - I'm ignoring those for now. This thing is like OneNote with all the tabbers.
  2. Add an additional layer of windowing
    • Suggestion: Enable tabs to be moved to a right-side pane (Notepad++ for example only supports left and right panes, not full paneling, and it's mostly fine)
  3. Recommend users who want this to simply use their OS / browser to view multiple CoCalc tabs simultaneously
    • This almost certainly mean notebook cells can't be drag-and-dropped between tabs - Markdown, etc, can be copy-pasted back and forth thanks to system clipboard

It's worth noting that using JupyterLab or VS Code (via X11) from within CoCalc does allow some of the behaviors I'm discussing, the specific feature I'm interested in is multiple CoCalc Notebooks or CoCalc Mardown Editors, etc, so that the full collaboration benefits can be enjoyed.

If there's a way to do this that I've missed, then perhaps discoverability should be improved.

williamstein commented 3 years ago

This almost certainly mean notebook cells can't be drag-and-dropped between tabs

Minor note -- unfortunately, drag and drop of notebook cells isn't currently implemented in cocalc now, so this functionality wouldn't be "lost".

williamstein commented 3 years ago

No problem. And yes people who need two different documents side by side typically use another browser. There are some undocumented "secret" hints that are relevant, and we could certainly greatly improve the UX for this.

  1. If you have a tab open and shift+click it, then that document will open in a dedicated pop-up kiosk-mode window. It's a quick easy way to have a second doc in another window.

  2. There is a session=default query param that you might see at the end of your URL when using cocalc. You can explicitly change default to another word and refresh your browser to get a different session (with different open files and projects). This is useful if you have a large monitor and want to have very different content side by side.

For what it is worth, I finally just got my first large monitor (an HP U27 4k Wireless display) this week, so I'm a bit more motivated to make the larger-monitor experience better...

StevenClontz commented 3 years ago

Bumping this as I just had a conversation with someone lamenting that this functionality doesn't seem to exist. Interestingly, it seems to be partially there: when editing a text file you can split the tab into two subwindows, but there's no way to get a different file opened in one of them.

image

Side-by-side editing would be very useful when wiring two files together (e.g. a notebook that imports a script).

williamstein commented 3 years ago

but there's no way to get a different file opened in one of them.

Note: in some cases if you switch the type of the second frame to terminal, then type open filename, it will open that file in a new frame... You might try that. Basically, I implemented the functionality to edit many different text files in the same tab, but there is no user interface for it yet. It's used for latex, for example,

StevenClontz commented 3 years ago

Thanks William! I've documented this solution here: https://github.com/StevenClontz/checkit-platform/blob/main/generators.md#side-by-side-editing-in-cocalc

williamstein commented 3 years ago

Thanks William! I've documented this solution here: https://github.com/StevenClontz/checkit-platform/blob/main/generators.md#side-by-side-editing-in-cocalc

Is there a list of thing we could do to make CheckIt easier to use with CoCalc?

StevenClontz commented 3 years ago

Not at the moment, but I'll add a note to compile one from my users.

StevenClontz commented 3 years ago

I do know this issue impact using the Dashboard (you have to open generated links in a new tab): https://github.com/sagemathinc/cocalc/issues/5258

williamstein commented 1 month ago

We're not going to do this. Use two distinct browser windows (or JupyterLab).