You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Really enjoy working with ui.card() - would love if one of the two ideas could be implemented below:
ui.card_body() Noticed this in experimental so just showing support for it making it to the core package one day.
ui.card(..., on_full_screen: Callable = func)
Sometimes my cards have a lot of text or would benefit from having additional, more detailed content than available in the rendered card. I was wondering if there could be an additional argument passed to ui.card() called on_fullscreen that, when the card enters full_screen mode, renders additional, more detailed content.
Example
fromhtmltools._coreimportTagdefrender_additional_detail() ->Tag:
# include tables, plots, etc.returnui.div(...)
ui.card(
# render in full screen or not-------ui.card_header('Header'),
ui.p('initially rendered body'),
ui.card_footer('Footer'),
# ---------------------------------full_screen=True,
# render when in full screen-------on_full_screen=render_additional_detail# ---------------------------------
)
Possible implementation of both ideas
I think something like this could work to implement both ideas (could also alleviate need for callable like above).
ui.card(
ui.card_header('Header'),
ui.card_body('some text'), # appears in rendered cardui.card_body('magic text', full_screen_only=True), # appears only in `full_screen` mode# ... additional card body elements, like tables, plots, etc.ui.card_footer('Footer'),
full_screen=True
)
Let me know if either of these are already implemented and I'm missing something. Thanks!
The text was updated successfully, but these errors were encountered:
Really enjoy working with
ui.card()
- would love if one of the two ideas could be implemented below:ui.card_body()
Noticed this in
experimental
so just showing support for it making it to the core package one day.ui.card(..., on_full_screen: Callable = func)
Sometimes my cards have a lot of text or would benefit from having additional, more detailed content than available in the rendered card. I was wondering if there could be an additional argument passed to
ui.card()
calledon_fullscreen
that, when the card entersfull_screen
mode, renders additional, more detailed content.Example
I think something like this could work to implement both ideas (could also alleviate need for callable like above).
Let me know if either of these are already implemented and I'm missing something. Thanks!
The text was updated successfully, but these errors were encountered: