rstudio / rstudio/bslib

Remove margin/padding when layout_sidebar() is root element of a page_navbar nav_panel

Open
#635 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
569
Forks
72
Avg merge
1d 2h
Merged PRs (30d)
5

Description

Hi there.

Firstly many thanks for all the great progress on bslib. I really like the option of being able to have various page layouts within a page_navbar including some with sidebars and some without.

However, as you can currently see on your Multi-page varied layout example, when a layout_sidebar is provided as the root UI element of a nav_panel inside a page_navbar there is a noticeable amount of padding around it. I don't think this is desirable as sidebar layouts should ideally be flush to the edges of the page, like they are when a global sidebar is set in page_navbar.

Is there an easy workaround to achieve this or is possible to make this the default behaviour in the package?

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Multi-page varied layout example and inspect how layout_sidebar() is nested as the root element of a page_navbar nav_panel. Reproduce the unwanted padding, then verify that the layout is flush to the page edges while global sidebar behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
bootstrap, scss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.