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

Statusbar #78

Merged
merged 7 commits into from
Oct 31, 2019
Merged

Statusbar #78

merged 7 commits into from
Oct 31, 2019

Conversation

krassowski
Copy link
Member

Currently "uninitialized virtual documents" messages are false alarms as the "serverInitialized" event is not emitted (fixing requires creating a fork for the connection implementation - got the code, but not the time to publish)

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@krassowski
Copy link
Member Author

It would be helpful if we could know if there is an LSP server for given language (from the frontend). Maybe the dear endpoints could return 404 or something similar?

@bollwyvl
Copy link
Collaborator

fixing requires creating a fork for the connection implementation

While contributing to the upstream is always good, I concur, it may be best, at least in the near term, to fork, at least until we figure out what needs to change and/or have a larger API surface exposed... for example, I wanted to look into adding hierarchical symbol support, but the initialization message is hard-coded inside the function.

This would be another compelling thing to do on #76 at any point after stage 1 (currently working on it, but again, should in no way block the 0.6.0 line).

It would be helpful if we could know if there is an LSP server for given language (from the frontend). Maybe the dear endpoints could return 404 or something similar?

Hm, websockets are funny, and not expecting to 404... i think the connection would already open.

We could have /lsp/ be a plain-old REST endpoint that returns a list of all the available specs, likely something we'd want to do anyway.

@bollwyvl
Copy link
Collaborator

Wooee, that's quite a status thing. Also for settings icons, we're gonna need an icon. How do these hit you? (helps to zoom way out, as the status bar is only 24px)

logo logo_2

font is [FiraCode](https://github.com/tonsky/FiraCode

The color ones could play a bit more (like the underlines could be another color), but for status bar icons you pretty much just get tone...

@krassowski
Copy link
Member Author

I would prefer the leftmost one. In the rightmost one, it is not so obvious that the pipe on the left represents 'L'. I think that actually this reflects that we configure language servers' features, rather than the language server protocol itself. On the other hand, "LSP" acronym is what ppl are already familiar with (so not sure what is the best course of action).

In the long term, I was also thinking about changing the branding more in the direction of "IntelliSense" (TM of Microsoft) as this is essentialy what we provide (literally depending on small pieces of VSCode) - and more explanatory to a novice user. Something like "JupyterLab code inteligence", "JupyterLab language intelligence" etc. But this is not very important now, and if you think this is better to have an icon already, I would go with the leftmost one!

Is FiraCode already used by JupyterLab or would it be a new dependency?

@bollwyvl
Copy link
Collaborator

IntelliSense

👎 there's basically no reason to introduce that, not least because of ™️. If anything, it would be in the docs,

In addition to Jupyter Kernel features like dynamic completion, you can enhance the JupyterLab Notebook and File Editor with code insights akin to the Intellisense:tm: features found in VSCode, including static code completion, diagnostics, symbol-based navigation, etc. by installing the appropriate and configuring a Language Server

But nah, we shouldn't have that string in the code anywhere.

ppl are already familiar with

Consider the new user using hub and lab for a class and learning to code for the first time: they won't know any of the acronyms or branding, but would still substantially benefit from the features. the challenge is to reveal the features as simply and naturally as possible... and we won't have to worry about branding at all once we get into jupyterlab/jupyterlab 🐒

if you think this is better to have an icon already

yeah, if only for testing, and making it easier for people to suggest a new one (single file PR). I want to be able to find it on the page, and write docs about it. otherwise in Advanced Settings we just get a gear. Also we're probably going to need a family of icons, very possibly one per language server, but that's further down the road.

Is FiraCode already used by JupyterLab or would it be a new dependency?

not without jupyterlab-fonts 👻. we'd cook it down to svg anyway.

@krassowski krassowski changed the title [WIP] Statusbar Statusbar Oct 31, 2019
@krassowski
Copy link
Member Author

@bollwyvl I got an initial version of the statusbar ready.

  • I moved the detailed text message into a popup; if we get a dedicated set of status icons (representing states such as "waiting", "connecting", "initializing", "initialized") we could further reduce the verbosity (but I would keep an explanatory word or two).
  • the icons are placeholders - feel free to provide suggestions/swap them for something better
  • I will implement your idea of having a new tab/sidebar for more detail configuration (this is a good one) later on - for this PR I only got the status message.
  • I see the popup as an intermediate step between quick actions and the full-blown configuration tab. I would like to see three-four buttons here, like:
    • "Restart LSP connections/reconnect" (after an internet connection issues for users working remotely, i.e. JupyterHub/binder),
    • "Pause the LSP functionality, my laptop battery is dead and the node_modules indexing is driving my CPU crazy!"
    • "Show me the full config, please!"

A typical picture from a single file editor:
Screenshot from 2019-10-31 11-04-44

An advanced case of a notebook with cells including other languages:
Screenshot from 2019-10-31 11-04-54

@krassowski
Copy link
Member Author

Merging as-is, as it provides a huge usability improvement already (users get a visual indication that the extension is enabled and my deduce why it might not be working as intended and can provide us with some useful info for debugging).

I gotta go and do some science, will be back on Saturday.

@krassowski krassowski merged commit 74236fc into master Oct 31, 2019
@krassowski krassowski mentioned this pull request Oct 31, 2019
9 tasks
@bollwyvl
Copy link
Collaborator

Science hard, my friend!

@krassowski krassowski mentioned this pull request Dec 1, 2019
4 tasks
@krassowski krassowski deleted the statusbar branch January 12, 2020 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants