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

Quick feedback on 3.0.0b8 #9044

Closed
bollwyvl opened this issue Sep 19, 2020 · 18 comments
Closed

Quick feedback on 3.0.0b8 #9044

bollwyvl opened this issue Sep 19, 2020 · 18 comments
Assignees
Labels
enhancement status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@bollwyvl
Copy link
Contributor

Per @jasongrout 's request, here are some quick reactions from trying out bet8 on binder originally added to gitter

This includes the new command palette as a floating window instead of on the side - please, please test this and see how it feels

it's snappy! but losing the categories, and having to know to use the file menu (or a chord which isn't what most editors use) is a little sad

widgets are looking great! it was awesome to have it work without rebuilding, teared up a little

workspace save/load looks solid

single document mode... would have expected to be able to rename the document by clicking on the huge title

(or even context menu, but probably just click)

also in SDM: the missing top borders of active menus looks odd...

oh, on the workspace file: the jupyter logo does not look great as a file icon... even on hidpi, one of the moons basically disappears

the border between an open sidebar and The Document feels really heavy

@stonebig
Copy link

Shouldn't "jupyterlab-widgets-1.0.0a2" be a dependancy of Jupyterlab-3.0.0b8 ?

@ellisonbg ellisonbg self-assigned this Sep 22, 2020
@jasongrout
Copy link
Contributor

Shouldn't "jupyterlab-widgets-1.0.0a2" be a dependancy of Jupyterlab-3.0.0b8 ?

No, we haven't decided that widgets is a dependency of jlab.

@bollwyvl
Copy link
Contributor Author

Welp, that's working, though I haven't gotten up to porting any widgets, the real proof of the pudding!

On the extension DX front, in the context of porting jupyterlab_graphviz (which has an extension, a mimextension and a codemirror mode)

  • I've seen some issues with "exotic" loaders that used to work, e.g. worker-loader... the Compiling step of labextension build just hangs until node runs me out of memory
    • to be fair, it's a 1.5mb emscripten, but these things happen...
    • i've been able to work around it with file-loader
  • accessing CodeMirror (e.g. defineMode, defineMime, modeInfo) doesn't seem to get the same copy as lab core
    • my extension's import 'codemirror' doesn't see ipythongfm
    • doing Mode.ensure always comes back with text/plain
  • debugging the latter is a bear, as I haven't gotten the hang of the new convolutions webpack puts stuff through
    • i can work up a minimal repro case, if that helps, unless there is magic sauce to say I WANT THE CODEMIRROR

@jasongrout
Copy link
Contributor

Thanks. Good point about codemirror. We really need a better story about interacting with codemirror in general - we keep working around that it is not exposed to extensions, nominally being behind an abstraction layer that people keep wanting to break through.

We may want to expose codemirror as a singleton shared package in core JupyterLab. This would be one more step to exposing codemirror as the real editor.

Or perhaps the codemirror extension should just expose the global codemirror object it uses through the extension system, and extensions that want to do stuff with codemirror can just optionally depend on that.

@jasongrout
Copy link
Contributor

@bollwyvl - do you want to experiment with exporting THE codemirror from the codemirror extension? Perhaps create a new tokens.ts file in the codemirror package, then a new plugin in the codemirror-extension package that provides the token to the system. The token can provide the right CodeMirror object.

@jasongrout
Copy link
Contributor

On the categories issue, here is what the modal command palette looks like with categories:

Screen Shot 2020-09-23 at 4 23 37 PM

Screen Shot 2020-09-23 at 4 23 58 PM

If you hover over a category, a filter icon appears off to the right, but clicking on it does not filter, instead it dismisses the floating window.

Here is what it looks like without categories. Notice it is much denser, and the command names still seem to be pretty descriptive:

Screen Shot 2020-09-23 at 4 24 24 PM

Screen Shot 2020-09-23 at 4 24 13 PM

I initially thought it would be bad to lose those categories, but now it does seem better to me that the categories are hidden.

Note that the category hiding is done with CSS.

When I talked with Brian about it, he suggested that we have the category as a prefix on the command, but that would also require more fundamental changes in Lumino, so having a prefix isn't a possibility before the 3.0 release.

@bollwyvl
Copy link
Contributor Author

PR up:

#9067

@ellisonbg
Copy link
Contributor

ellisonbg commented Sep 24, 2020 via email

@bollwyvl
Copy link
Contributor Author

Sure. As long as the command palette is pluggable and API stable (which I assume does still include the categories), nothing is lost for experimentation.

Given the wider space afforded this dialog, it could probably get away with taking/allocating space for the categories:
Screenshot from 2020-09-23 21-43-41

  • A note: it's very hard to use the browser inspector to select the modal command palette.

@jasongrout
Copy link
Contributor

Are there still categories when it is in the sidebar?

@ellisonbg
Copy link
Contributor

ellisonbg commented Sep 24, 2020 via email

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Oct 1, 2020

The CodeMirror blocker (#9067) is cleared up as of 3.0.0rc2 🎉 thanks for the quick review, @jasongrout

The border on top of the current menus is 👍

Some of the other points from #9044 (comment) (pain of debugging minified lab assets, etc.) are still there, but not stopping development.

Screenshot from 2020-09-30 21-07-09

@jasongrout
Copy link
Contributor

The CodeMirror blocker (#9067) is cleared up as of 3.0.0rc2 🎉 thanks for the quick review, @jasongrout

That's so great to hear!

The border on top of the current menus is 👍

Cool!

Some of the other points from #9044 (comment) (pain of debugging minified lab assets, etc.) are still there, but not stopping development.

Yeah, that's a longer-term issue to figure out. Make sure you are compiling extensions in jupyter labextension build --development True mode for debugging (see https://github.com/jupyterlab/extension-cookiecutter-ts/blob/d8c08687f8661545a65d65ab8eb9433267a45b35/%7B%7Bcookiecutter.python_name%7D%7D/package.json#L30) - the default is to compile into production mode, which is all minified, etc.

@jasongrout jasongrout reopened this Oct 1, 2020
@jasongrout
Copy link
Contributor

Accidentally closed - but let us know if everything is addressed and we can close anyway.

@jasongrout
Copy link
Contributor

The CodeMirror blocker (#9067) is cleared up as of 3.0.0rc2 🎉 thanks for the quick review, @jasongrout

As you might imagine, you aren't the only one wanting to add modes to CodeMirror. Do you think you could contribute a short example to the extension example repo showing how to add a codemirror mode? https://github.com/jupyterlab/extension-examples

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Oct 2, 2020

contribute a short example

Well, lazily, both the shortest and potentially most-reusable example would be a simple mode... i find if I'm stuck having to do a quick DSL mode, it can be easier to get started with that approach (e.g. Learn some regex, off I go!) than, say, even one of the simpler imperative modes like toml. It's also very nice for using named embedded modes. So I'd like to help example-readers-and-maybe-copy-pasters to also be lazier.

Here's my immediate laziness: to get that screenshot with the working mode, I presently I'm having to do some rather boorish stuff:

import * as simpleMode from 'codemirror/addon/mode/simple';
import * as MyCodeMirror from 'codemirror';

export function defineSomeMode(TheCodeMirror: any) {
  console.warn(MyCodeMirror.modeInfo); // usually 156
  console.warn(TheCodeMirror.modeInfo); // usually 158, because ipython(gfm)
  TheCodeMirror.simpleMode = (MyCodeMirror as any).simpleMode.bind(TheCodeMirror);
  TheCodeMirror.defineMode(MODE_NAME, function(config: any) {
    return (MyCodeMirror as any).simpleMode.apply(TheCodeMirror, [config, STATES]);
  });
  TheCodeMirror.defineMIME(t, MODE_NAME);
  TheCodeMirror.modeInfo.push({
    ext: EXTENSIONS,
    mime: MIME_TYPE,
    mode: MODE_NAME,
    name: MODE_NAME
  });
}

Anyhow, though a number of addons are added, already, I usually don't want to be that guy that pushes for a new dependency just to scratch my itch.

Even if we add addon/mode/simple to those "blessed" addons (PR #9123), we're really just kicking the can down the road until someone needs significantly more.

Luckily(!), a quick scan of jupyterlab-lsp doesn't reveal any addons (just about everything we do over there is bespoke) so none of this is a blocker to anything I'm working on, since the above workaround at least is possible now. But no doubt there are at least some other extensions out there that expect the CodeMirror extend-by-import contract to hold.

Anyhow, even if we don't pick up #9123, i can still take a look at an example!

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Oct 2, 2020

but let us know if everything is addressed and we can close anyway.

yeah, sorry for the poorly structured issue on my part! I'll go ahead and close this. I made a more focused issue (#9124) for the dangling CM parts.

@bollwyvl bollwyvl closed this as completed Oct 2, 2020
@jtpio
Copy link
Member

jtpio commented Oct 2, 2020

Some of the other points from #9044 (comment) (pain of debugging minified lab assets, etc.) are still there, but not stopping development.

@bollwyvl this PR would switch the default build script to build in development mode: jupyterlab/extension-cookiecutter-ts#98.

@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Apr 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

5 participants