notebook icon indicating copy to clipboard operation
notebook copied to clipboard

CSS issue when the Notebook windowing mode is set to `full`

Open jtpio opened this issue 5 months ago • 1 comments

Testing on the latest main, which includes the recent changes that landed in JupyterLab w.r.t windowing mode, it looks like the CSS is off:

image

This is likely related to an underlying DOM structure change, which affects the CSS customizations in Notebook.

jtpio avatar Feb 01 '24 14:02 jtpio

Adding to 7.1.x since full is not the default windowing mode.

jtpio avatar Feb 01 '24 14:02 jtpio

Marking as a "good first issue" if someone would like to have a look:

The windowing mode can be set to full via the settings editor:

image

This will also likely require tweaking some CSS depending on the DOM structure: https://github.com/jupyter/notebook/blob/main/packages/notebook-extension/style/base.css

jtpio avatar Feb 27 '24 22:02 jtpio

Hi @jtpio, I’m interested in contributing to JupyterLab, and I’d like some additional context regarding the issue related to cell alignment. From what I understand, the issue pertains to the misalignment of the cell box when windowing. Specifically, should the cell box be centered on the screen?

kgaurav8026 avatar Mar 07 '24 20:03 kgaurav8026

Yes it should be centered like when using the default mode:

image

jtpio avatar Mar 08 '24 09:03 jtpio

Hello, would it be possible to have this assigned to me?

Thanks

v-lozko avatar Mar 11 '24 13:03 v-lozko

Hello, would it be possible to have this assigned to me?

Thanks

I'm also working to resolve the issue. If you find a solution, you can submit a PR I guess. Assigning it won't be beneficial.

kgaurav8026 avatar Mar 11 '24 16:03 kgaurav8026

It will be so efforts arent duplicated, so work on it. if you can't/dont have time let me know and i can take a stab at it

v-lozko avatar Mar 11 '24 16:03 v-lozko

It will be so efforts arent duplicated, so work on it. if you can't/dont have time let me know and i can take a stab at it

Ok sure. I will let you know if I'm not able to complete it. I'm currently halfway there

kgaurav8026 avatar Mar 11 '24 16:03 kgaurav8026

Hi @v-lozko , i am finding it difficult to fix the bug. So you can start working on it if you want. Thanks

kgaurav8026 avatar Mar 13 '24 14:03 kgaurav8026

@v-lozko Also, if you are able to merge Kindly tell me the approach as i am keen on understanding how to tackle such issues in the future.

kgaurav8026 avatar Mar 15 '24 08:03 kgaurav8026

Hello @jtpio i can't seem to replicate the issue. This is the first issue i'm dealing with in Jupyter, but it definitely seems like i set up the environment correctly, and having changed my settings to full i do not have the CSS issue that you shared. it looks fine.

v-lozko avatar Mar 18 '24 20:03 v-lozko

I just tried from the latest commit (851a4beaae084a513ac7cf851292b7be1c87c198) and it still seems to be an issue:

image

jtpio avatar Mar 19 '24 08:03 jtpio

huh, i have windowing set to full image and here is what i'm seeing image

v-lozko avatar Mar 19 '24 13:03 v-lozko

Did you refresh the notebook page after changing the setting?

jtpio avatar Mar 19 '24 13:03 jtpio

yes, and i've tried reinstalling the build multiple times. i see you're using gitpod based on your url, could that be a possible source of the issue?

v-lozko avatar Mar 19 '24 13:03 v-lozko

Here is a screencast to reproduce the issue, testing on Binder with Notebook 7.1.2 from this gist: https://gist.github.com/jtpio/d368ab89cee5123ecee60683115e15f3

notebook-full-windowing-mode.webm

you're using gitpod based on your url, could that be a possible source of the issue?

This was tested in a fresh new environment on Gitpod, so not sure this is the reason. And it is also reproducible on Binder (which also creates a clean new environment).

jtpio avatar Mar 19 '24 14:03 jtpio

So i went out, got a new macbook as i was previously using a windows, set everything up and this time tried it both with chrome and safari as well as binder. i get the issue with safari and binder, but i am not able to repeat it on chrome. so at least this gives me a place to start

v-lozko avatar Mar 19 '24 21:03 v-lozko

Thanks @v-lozko for looking into this.

I also checked on Chromium (on Ubuntu) and it also seems to be the case:

image

jtpio avatar Mar 20 '24 07:03 jtpio

Thanks for your patience as well, I have been a bit busy these past couple days but had a chance to look into a little. I'm not certain its the DOM, as it seems the right margin for the windowed panel is being overridden by a style attribute coming from somewhere (which surprisingly isn't happening with chrome). I'll get it sorted in next day or so, someone much better versed in CSS will help me sort it out.

v-lozko avatar Mar 20 '24 20:03 v-lozko

Hi @v-lozko , I hope I can help on the CSS part in this issue, if there is a room for contribution please let me know. Thank you!

Dev-Akash avatar Mar 21 '24 02:03 Dev-Akash

Hey @Dev-Akash, I have put some time in already trying to resolve this and would like to see it through in next day or so. If I can't figure it out I can definitely let you know! I appreciate the offer

v-lozko avatar Mar 21 '24 17:03 v-lozko

Sure! @v-lozko. Thank you!

Dev-Akash avatar Mar 21 '24 17:03 Dev-Akash

@jtpio i submitted a PR here for this issue however i forgot to appropriately label it so its not tied to this issue. Is there a way to edit the labels post submittal of the PR?

v-lozko avatar Mar 22 '24 09:03 v-lozko

Is the issue solved yet? what is the progress?

tentomush1 avatar Apr 11 '24 15:04 tentomush1