Skip to content

Conversation

Gauss-Taylor-Euler
Copy link
Contributor

@Gauss-Taylor-Euler Gauss-Taylor-Euler commented Jun 27, 2025

Increased the width of main-panel(#761)

Addressing #761 .

mainpanelwidthdemo.mp4

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.

Copy link
Contributor

Binder 👈 Launch a Binder on branch Gauss-Taylor-Euler/jupytergis/panel_notebook_width

Copy link
Contributor

github-actions bot commented Jun 27, 2025

Integration tests report: appsharing.space

@mfisher87 mfisher87 added the enhancement New feature or request label Jun 27, 2025
@mfisher87
Copy link
Member

@Gauss-Taylor-Euler I sent you an invite to the org which should grant you triage role, granting the permissions to edit labels on PRs. @martinRenou should we grant greater access than this?

@mfisher87 mfisher87 changed the title Increased the width of main-panel(#761) Increased the width of main-panel Jun 27, 2025
});

resizeObserver.observe(el);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! But is there any way this can be done with CSS only?

Copy link
Contributor Author

@Gauss-Taylor-Euler Gauss-Taylor-Euler Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the problem is that we are constrained by the parent (main-panel ) and only in recent version of css can we select the parent with a specific child (with :has so that it won't affect other plugin } but this is not availlable on firefox for now .I tried other workaround , this is the least ugly way I found to do it , maybe there is a better way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like :has is supported in modern versions of FireFox -- caniuse gives it a "baseline" rating.

I think #main-panel > #child-id selector would also work? I'm sure I'm missing something though :)

Copy link
Contributor Author

@Gauss-Taylor-Euler Gauss-Taylor-Euler Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is another plugin , is setting constraint on #main-panel (~1200px) those constraint are passed down to our components .We need to change #main-panel because if we don't our elements will be limited by its width so modifying , main-panel children only won't work. Another problem is that we don't want to do it in all cases for instance when a notebook is run the default is good so simply modifying #main-panel won't work.Another problem and this is why there is a resize observer , is that the plugin do it multiple times, and because we do it programatically after the plugin we also need to modify other element than just #main-panel.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, gotcha. We need to change the parent IFF it contains our component. Thanks for explaining!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also surprised it wasn't possible with CSS only, I briefly tried this:

#main-panel:has(.jGIS-toolbar-widget) {
  max-width: 100% !important;
  width: 100% !important;
  left: 0px !important;
}

Seems to work fine until you resize the page dynamically, then the map doesn't take the right space, so using the resize observer may be the only way indeed.

@mfisher87 mfisher87 changed the title Increased the width of main-panel Increased the width of main-panel in notebook viewer Jun 27, 2025
@Gauss-Taylor-Euler
Copy link
Contributor Author

@Gauss-Taylor-Euler I sent you an invite to the org which should grant you triage role, granting the permissions to edit labels on PRs. @martinRenou should we grant greater access than this?

Thank you ! I don't really know what do you mean by the org ? I don't see any notifications , Is it normal ?

@mfisher87
Copy link
Member

mfisher87 commented Jun 27, 2025

The GeoJupyter GitHub org! You should have a notification email about the invite, but if not, check here: https://github.com/settings/organizations or here: https://github.com/orgs/geojupyter/invitation

@Gauss-Taylor-Euler
Copy link
Contributor Author

The GeoJupyter GitHub org! You should have a notification email about the invite, but if not, check here: https://github.com/settings/organizations or here: https://github.com/orgs/geojupyter/invitation

Ah okay, I see , thank you, I joined.

Co-authored-by: martinRenou <[email protected]>
Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinRenou martinRenou merged commit 40e915b into geojupyter:main Jun 30, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants