Skip to content

fix: contextual_help uses heading, content, footer props#945

Merged
wusteven815 merged 2 commits into
deephaven:mainfrom
wusteven815:926-wrap-contextual-help-children
Oct 21, 2024
Merged

fix: contextual_help uses heading, content, footer props#945
wusteven815 merged 2 commits into
deephaven:mainfrom
wusteven815:926-wrap-contextual-help-children

Conversation

@wusteven815
Copy link
Copy Markdown
Contributor

@wusteven815 wusteven815 commented Oct 18, 2024

BREAKING CHANGE: ui.contextual_help's signature replaces the *children prop with heading, content, and footer props, in that order. In parity with React Spectrum docs, the heading and content props are required and footer is optional.

Here are some examples of usages and how they might change:

# This is still valid
old = ui.contextual_help(
    ui.heading("My Heading"),
    ui.content("My content"),
    ui.footer("My footer")
)
# This is invalid
old = ui.contextual_help(ui.content("My content"))
# You must explicitly set heading to None
new = ui.contextual_help(None, ui.content("My content"))

@wusteven815 wusteven815 self-assigned this Oct 18, 2024
@wusteven815 wusteven815 marked this pull request as ready for review October 21, 2024 13:20
@wusteven815 wusteven815 requested review from a team, dgodinez-dh and dsmmcken and removed request for a team October 21, 2024 13:21
Comment thread plugins/ui/src/deephaven/ui/components/contextual_help.py
@wusteven815 wusteven815 merged commit d7bcc22 into deephaven:main Oct 21, 2024
@wusteven815 wusteven815 deleted the 926-wrap-contextual-help-children branch October 30, 2024 14:40
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.

ui.contextual_help content not rendering properly

3 participants