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

Sync with latest bslib sidebar and card changes #1129

Merged
merged 70 commits into from
Feb 23, 2024
Merged

Conversation

gadenbuie
Copy link
Collaborator

@gadenbuie gadenbuie commented Feb 15, 2024

Brings in the latest updates from bslib:

Some changes to call out in particular:

  1. ui.sidebar() is now a very thin wrapper around ui.Sidebar. Basically, ui.sidebar() passes everything to the Sidebar class, gathering args and kwargs into Sidebar(children=args, attributes=kwargs).

  2. ui.Sidebar() now has a .tagify() method and is responsible for building the sidebar and collapse toggle tags.

  3. ui.sidebar(open=) can be "desktop" | "open" | "closed" | "always", or can take a new SidebarOpen() object, where desktop and mobile initial states can be set separately, e.g. ui.sidebar(open=ui.SidebarOpen(desktop="open", mobile="always").

  4. The new default for open is None, allowing higher-level functions, such as page_sidebar() and page_navbar(), to modify the sidebar before it's used by layout_sidebar(). The primary motivation for this is to have page-level sidebars default to SidebarOpen(desktop="open", mobile="always") while internal (e.g. card-level) sidebars will use the previous default of open="desktop" -- equivalent to SidebarOpen(desktop="open", mobile="closed").

  5. Cards received some accessibility updates: the full screen toggle button is now keyboard accessible and is also available on mobile devices.

…round `Sidebar` class

Also `Sidebar` can now tagify itself
@gadenbuie
Copy link
Collaborator Author

Failures in the last commit are unrelated to this PR -- they're about the deprecation of the .utcnow() method in the datetime module.

@gadenbuie gadenbuie requested a review from wch February 22, 2024 15:36
shiny/ui/_sidebar.py Outdated Show resolved Hide resolved
shiny/ui/_sidebar.py Outdated Show resolved Hide resolved
shiny/ui/_sidebar.py Outdated Show resolved Hide resolved
shiny/ui/_sidebar.py Outdated Show resolved Hide resolved
shiny/ui/_sidebar.py Outdated Show resolved Hide resolved
@gadenbuie gadenbuie requested a review from wch February 22, 2024 21:10
Copy link
Collaborator

@wch wch left a comment

Choose a reason for hiding this comment

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

Looks good!

@gadenbuie gadenbuie dismissed schloerke’s stale review February 23, 2024 15:03

Requested changes were implemented

@gadenbuie gadenbuie merged commit ccd5d2f into main Feb 23, 2024
26 checks passed
@gadenbuie gadenbuie deleted the sync-bslib-0-6-1-dev branch February 23, 2024 15:05
schloerke added a commit that referenced this pull request Feb 27, 2024
* main:
  Update `@render.data_frame` renderer to work properly with fill/fillable (#1126)
  Don't error on malformed date input (#1139)
  fix(nav_panel): Add `.bslib-gap-spacing` if nav panel is fillable (#1154)
  feat: Add `ui.input_dark_mode()` (#1149)
  chore(make): Add `make docs` and `make docs-preview` (#1150)
  Sync with latest bslib sidebar and card changes (#1129)
  docs(input_task_button): Add to reference index, also update methods for action button/link (#1151)
  chore(make): Update check and check-fix to replicate CI (#1148)
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

Successfully merging this pull request may close these issues.

None yet

3 participants