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

Toggle buttons for clipplane and wireframe do not toggle in JupyterLite #488

Open
SylvainCorlay opened this issue Oct 16, 2024 · 22 comments
Milestone

Comments

@SylvainCorlay
Copy link
Member

We could decide to make the clipping toolbar icon should appear as toggled when clipping is enabled.

@martinRenou
Copy link
Member

This was implemented in #441 and it looks like it's not working anymore?

@martinRenou martinRenou added this to the 3.0.0 milestone Oct 16, 2024
@martinRenou martinRenou changed the title The clipping icon is really a toggle Toggle buttons for clipplane and wireframe do not toggle anymore Oct 16, 2024
@martinRenou
Copy link
Member

I wonder if the switch to reactive toolbar may broke it #455

@SylvainCorlay
Copy link
Member Author

Maybe @brichet would know if the reactive toolbar does not support toggled buttons.

@arjxn-py
Copy link
Member

arjxn-py commented Oct 16, 2024

Hi there, I tried reproducing this on my end and It works fine for me (I'm at the latest commit)

Maybe can you try reproducing?

toggle.mov

EDIT: Yes, I just realised and checked that it's not working on jupyterlite deployment

@brichet
Copy link

brichet commented Oct 16, 2024

Maybe @brichet would know if the reactive toolbar does not support toggled buttons.

AFAIK the reactive toolbar handles the buttons in the same way as the regular toolbar, storing only those that overflow into a popup toolbar.

@SylvainCorlay
Copy link
Member Author

EDIT: Yes, I just realised and checked that it's not working on jupyterlite deployment

Indeed. Although I can see the class change on the button.

@martinRenou
Copy link
Member

So this may be JupyterLite not bringing the Lumino CSS for lm-mod-toggled!

@SylvainCorlay
Copy link
Member Author

So this may be JupyterLite not bringing the Lumino CSS for lm-mod-toggled!

Ping @jtpio

@jtpio
Copy link
Contributor

jtpio commented Oct 17, 2024

hmm strange that JupyterLite would not include this rule, since it should include the Lumino CSS by default.

Are you able to check the rule is available when using regular JupyterLab, and not with JupyterLite? (for example via the elements tab of the dev tools)

@arjxn-py
Copy link
Member

Are you able to check the rule is available when using regular JupyterLab, and not with JupyterLite? (for example via the elements tab of the dev tools)

Hi @jtpio, yes this is available on regular JupyterLab, this clip is of JupyterLab running locally.

@jtpio
Copy link
Contributor

jtpio commented Oct 17, 2024

I mean can you point at the specific CSS rule? (so it's easier to check why it would be missing in lite)

@arjxn-py
Copy link
Member

arjxn-py commented Oct 17, 2024

It should be lm-mod-toggled

toggle.mov

@jtpio
Copy link
Contributor

jtpio commented Oct 17, 2024

For the class yes. But what is the expected CSS rule?

@arjxn-py
Copy link
Member

For the class yes. But what is the expected CSS rule?

This is the only rule we could find in lumino -

https://github.com/jupyterlab/lumino/blob/10ee22d2a93ae618f36c5ba380337bc440106399/packages/default-theme/style/menu.css#L75-L77

@jtpio
Copy link
Contributor

jtpio commented Oct 17, 2024

So to echo the question above:

Are you able to check the rule is available when using regular JupyterLab, and not with JupyterLite? (for example via the elements tab of the dev tools)

Is this rule on the page for JupyterLab, and not for JupyterLite?

@arjxn-py
Copy link
Member

I cannot see this exact rule but there are significant differences between how lab is rendering the button and how lite is. One of the major one is that in jupyterlab button is jp-button but in jupyterlite it's only button and i also cannot notice styles being modified in lite

JupyterLab

Screen.Recording.2024-10-17.at.14.52.04-1.mov

JupyterLite

Screen.Recording.2024-10-17.at.14.56.15-1.mov

@jtpio
Copy link
Contributor

jtpio commented Oct 17, 2024

I cannot see this exact rule but there are significant differences between how lab is rendering the button and how lite is.

Even by searching for lm-mod-toggled on the "Elements" tab? Probably there should then be some references to it in the <style> elements.

@arjxn-py
Copy link
Member

I cannot see this exact rule but there are significant differences between how lab is rendering the button and how lite is.

Even by searching for lm-mod-toggled on the "Elements" tab? Probably there should then be some references to it in the <style> elements.

Can't find one in local jupyterlab:

con.mov

But in jupyterlite, is this it? -
Image

@martinRenou martinRenou changed the title Toggle buttons for clipplane and wireframe do not toggle anymore Toggle buttons for clipplane and wireframe do not toggle in JupyterLite Oct 17, 2024
@jtpio
Copy link
Contributor

jtpio commented Oct 17, 2024

One of the major one is that in jupyterlab button is jp-button but in jupyterlite it's only button

Indeed. It looks related to the changes in JupyterLab w.r.t the toolbar buttons. Maybe there is a @jupyterlab package in JupyterLite that was not updated to the latest version?

@martinRenou martinRenou removed the bug label Oct 17, 2024
@martinRenou
Copy link
Member

Even though it is visible in JupyterLab, I personally find the shadow styling a bit ugly:

Image

I'd like to suggest to apply a background-color: var(--jp-layout-color3); to the toggled button instead of a shadow:

Image

That's just a personal preference.

@SylvainCorlay
Copy link
Member Author

Will the "bug" be resolved in a future version of JupyterLite ?

The CSS change could be submitted upstream in Lab.

@arjxn-py
Copy link
Member

Will the "bug" be resolved in a future version of JupyterLite ?

From a conversation with @martinRenou on video, Yes

The CSS change could be submitted upstream in Lab.

Sounds good, happy to do that if I'm good to do that, please let know if someone else shall do it.

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

No branches or pull requests

5 participants