Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rewrite, with Welcome Page and session history #546

Merged
merged 112 commits into from
Jan 30, 2023
Merged

Rewrite, with Welcome Page and session history #546

merged 112 commits into from
Jan 30, 2023

Conversation

mbektas
Copy link
Member

@mbektas mbektas commented Dec 26, 2022

desktop new 2

  • Sessions

    • There are two types of sessions: local and remote
    • Local session: Working Directory, files to open (optional)
    • Remote session: Server URL, persistSessionData flag
    • Sessions can be closed and new ones can be created without closing desktop app
    • close-session
  • Welcome Page

    • welcome-page
    • Links to create new notebook, launch new JupyterLab session, open files / folders in new session, connect to existing local / remote JupyterLab servers
    • Recent session list with ability to relaunch
    • News on Welcome Page. Using Jupyter Blog feed. Clicking opens in external browser. News are cached, updated at every app launch.
    • Drag and Drop files / folder to open in a new session
  • First Launch Screen

  • first-screen
  • Configuration Changes

    • jupyterlab-desktop-data file removed
    • [USER-DATA-DIR]/app-data.json stores application data and cache (sessions, recent items, news)
    • [USER-DATA-DIR]/settings.json stores user defaults
    • [WORKING-DIRECTORY]/.jupyter/desktop-settings.json (workspace settings) overrides user defaults (e.g. Python path)
    • [WORKING-DIRECTORY]/.jupyter/desktop-workspaces stores workspaces for the working directory
    • Default Working Directory can be set
    • Default Python environment can be set
    • Prettified JSON config files
    • preferences-server
    • preferences-privacy
  • CLI Changes

    • Specify working directory or Python path to use
    • Open multiple files
    • jlab --help with examples
  • Connect to existing JupyterLab Server

    • connect-to-existing
    • Recent connections and locally running JupyterLab servers listed. user can enter new URLs
  • Registry

    • Local Python environments are discovered at launch
    • Local JupyterLab servers running are discovered
  • Server Status on title bar

    • Remote server status is not clickable anymore. User is expected to close session and connect to new server
    • Local server status clicks shows list of Python environments and allows browsing / specifying a Python path. Selecting new Python env relaunches JupyterLab at the same working directory without relaunching desktop app
    • env-selection
  • Startup Mode

    • preferences-general
    • Three modes: Show Welcome Page, Start New Session (old behavior), Restore Last Session
  • Progress View

    • progress-view
    • Shown during time consuming tasks such as new server launch and also when errors occur
    • Has subtle animation around JupyterLab icon
    • Progress messages shown on view with a title and message lines. They can be in HTML format. Provides sendMessageToMain method to enable action links
  • Architectural Changes

    • Major refactoring and rewrite of the code-base
    • Simplification and clean-up
    • Changes towards support for multiple windows/sessions

Tasks

  • Architectural redesign
  • Separate app state and settings. Introduce workspace (working directory) settings
  • Welcome Page
  • Open notebook / folder from UI
  • Recent session list and ability to reopen
  • News feed from Jupyter Blog
  • Close session and open new without relaunch
  • Default Python env and working directory in Preferences dialog. Default working directory now configurable in UI
  • Remote server URL history and autocomplete in UI
  • User configurable startup modes: Welcome Page, New Local Session, Restore Last Session
  • Cleaner, prettified JSON config files
  • Drag - drop support on Welcome Page
  • CLI with pythonPath and working directory options
  • List and connect to existing local servers
  • More user friendly Python env selection on UI using popup. New env applied without app restart. Existing environments are discovered and listed as options
  • Progress view and better server launch error handling
  • Check for bundled environment updates and update in Preferences dialog
  • Refactor session create methods
  • Refactoring, cleanup
  • Testing

@mbektas mbektas changed the title Welcome Page and state refactoring Welcome Page, refactoring Dec 28, 2022
@mbektas mbektas changed the title Welcome Page, refactoring Rewrite with Welcome Page and session history Dec 31, 2022
@krassowski
Copy link
Member

krassowski commented Jan 25, 2023

I was running a version a few commits behind (b6a2795) for few days now and had overall good impressions. Some noticeable annoyances that I saw are:

  1. When I start a new session from command line I see:
    Screenshot from 2023-01-25 20-26-51
    not sure if this is a me problem or a real bug
  2. (major UX) When changing environment using file picker the path is set in the input but then nothing happens. To actually change it I need to focus the input and press enter. It is very un-intuitve as the only button is the folder which opens the file picker dialog again. I think it is sensible to accept the choice upon getting the path from file picker..
  3. (annoyance) when I change environment the zoom level is not saved. When I use my very large monitor I have to hit ctrl + shift + plus several times each time which is annoying (also because of Zoom with CTRL+= (equals) no longer works #550).
  4. when I change virtual environment the notebooks that I had open do not get re-opened
  5. (very minor) it would be a lovely addition if the scrollbar in the env picker was styled in dark mode, this is how it looks for me now:
    Screenshot from 2023-01-25 20-29-39

Note: please feel free to move styling suggestions to follow up issues if you don't feel like tacking this, I am just trying to document these at source while we have a fresh memory of the relevant codebase.

@krassowski
Copy link
Member

I guess that point (4) was already fixed by 119da42 but have not tested yet.

@krassowski
Copy link
Member

Idea: one useful addition to the welcome screen could be a set of links to this repository ("Report a bug"/"Open a feature request"/"Contribute").

@mbektas
Copy link
Member Author

mbektas commented Jan 27, 2023

@krassowski thanks for testing. (1) happens when you start another instance of the app. I am working on a fix for that. Regarding (2), there is tooltip with the requirement to hit 'Enter' but I will apply the selected path from file dialog as you suggest. I will look into (3). (4) is fixed in the latest as you guessed. I would like to leave (5) for later. There are other scroll bars (recents list, connect to server list) which might have the same issue.

@mbektas
Copy link
Member Author

mbektas commented Jan 27, 2023

Idea: one useful addition to the welcome screen could be a set of links to this repository ("Report a bug"/"Open a feature request"/"Contribute").

I am not too sure about this, it would be better to keep welcome page simple and clean. We could add these links to about dialog.

@mbektas
Copy link
Member Author

mbektas commented Jan 28, 2023

@krassowski I couldn't reproduce (3). it worked fine on macOS, Windows and Ubuntu for me. Zoom level persisted event on different sessions and after restart. by the way, I pushed fixes for (1) and (2).

@krassowski
Copy link
Member

Some more comments:

  • What do you think about adding "open welcome screen" item in the hamburger menu? currently one needs to close current session to get it I think.
  • the environment picker/list does not close when clicking on title bar. It is a very minor but I do notice it sometimes.

@krassowski
Copy link
Member

krassowski commented Jan 28, 2023

It seems that I no longer can open two sessions at once, I get this dialog

Screenshot from 2023-01-28 21-16-42

this prevents me from working on two projects simultaneously (or even say working on galata tests and jupyterlab/packages in two separate windows which used to be my workflow). This is a serious downgrade for me.

@mbektas
Copy link
Member Author

mbektas commented Jan 29, 2023

Some more comments:

  • What do you think about adding "open welcome screen" item in the hamburger menu? currently one needs to close current session to get it I think.
  • the environment picker/list does not close when clicking on title bar. It is a very minor but I do notice it sometimes.

As you also mentioned in your next comment, currently only single session window is supported. I am planning to add multiple window support in the next release. but I will see if I can include in this PR. I am thinking of adding New Window menu item that opens welcome page in new window. Second instance launches from CLI or file double click would also cause a new window create if all open windows are in a jlab view mode.

You can click on the jlab view or hit Escape to close to Python env list. but I will also make sure title bar clicks hide it as well.

@krassowski
Copy link
Member

I am planning to add multiple window support in the next release.

Just FYI, I will be staying with build prior to 1b2b2a8 and possibly apply patches locally as having multiple sessions is a critical feature for me.

I am thinking of adding New Window menu item that opens welcome page in new window.

Sounds like a good idea. FYI, on Ubuntu for example when I click on the icon in the OS launcher it already has a "New Window" option and it already worked like that prior to 1b2b2a8:

Screenshot from 2023-01-29 01-42-04

@mbektas
Copy link
Member Author

mbektas commented Jan 29, 2023

@krassowski hiding the env select popup when titlebar is clicked turned out to be quite complex. It works on macOS but not on Linux / Windows. Since it is a window drag region, mouse events are not being received by the listeners.

I will try multiple window support in another PR but before releasing these changes. it will most likely be relatively easy thanks to this PR, but I have to try and see. This PR makes event handling specific to the SessionWindow, designed for the multiple windows.

By the way, I wouldn't stay before 1b2b2a8 . Because multiple instances would modify the shared app-data.json and settings.json files which may cause issues.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants