-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…round `Sidebar` class Also `Sidebar` can now tagify itself
Failures in the last commit are unrelated to this PR -- they're about the deprecation of the |
If the `id` is randomly generated, we need to use the same `id` for the sidebar and collapse tags. Prior to this commit, we'd generate two random ids.
wch
reviewed
Feb 22, 2024
Co-authored-by: Winston Chang <winston@stdout.org>
…bar when/as needed
wch
approved these changes
Feb 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Requested changes were implemented
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brings in the latest updates from bslib:
Some changes to call out in particular:
ui.sidebar()
is now a very thin wrapper aroundui.Sidebar
. Basically,ui.sidebar()
passes everything to theSidebar
class, gatheringargs
andkwargs
intoSidebar(children=args, attributes=kwargs)
.ui.Sidebar()
now has a.tagify()
method and is responsible for building the sidebar and collapse toggle tags.ui.sidebar(open=)
can be"desktop" | "open" | "closed" | "always"
, or can take a newSidebarOpen()
object, wheredesktop
andmobile
initial states can be set separately, e.g.ui.sidebar(open=ui.SidebarOpen(desktop="open", mobile="always")
.The new default for
open
isNone
, allowing higher-level functions, such aspage_sidebar()
andpage_navbar()
, to modify thesidebar
before it's used bylayout_sidebar()
. The primary motivation for this is to have page-level sidebars default toSidebarOpen(desktop="open", mobile="always")
while internal (e.g. card-level) sidebars will use the previous default ofopen="desktop"
-- equivalent toSidebarOpen(desktop="open", mobile="closed")
.Cards received some accessibility updates: the full screen toggle button is now keyboard accessible and is also available on mobile devices.