-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: disclosure #1068
base: main
Are you sure you want to change the base?
feat: disclosure #1068
Conversation
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.
You'll need to update plugins/ui/src/js/package.json
to use the v102 versions of the @deephaven/
packages that include Disclosure to fix the build errors.
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.
Should add Disclosure to e2e tests as well. Would be cool to add your own e2e test instead of the render_all catchall.
my_disclosure_disabled = ui.disclosure( | ||
title="Heading", panel="Content", default_expanded=True | ||
) | ||
``` |
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.
Add some examples using disclosure_title
and disclosure_panel
, showing off disclosures with different levels in the disclosure_title
, and a disclosure_panel
with some padding.
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.
Added this code snippet as an example but investigating why they all render with the same style. When inspecting the elements they are rendering as H1, H2, H3,... respectively. Style overwriting seems to be coming from elsewhere
from deephaven import ui
@ui.component
def ui_disclosure_title_levels():
return [
ui.disclosure(
ui.disclosure_title("H1", level=1),
ui.disclosure_panel("Content", margin="10px"),
),
ui.disclosure(
ui.disclosure_title("H2", level=2),
ui.disclosure_panel("Content", margin="10px"),
),
ui.disclosure(
ui.disclosure_title("H3", level=3),
ui.disclosure_panel("Content", margin="10px"),
),
ui.disclosure(
ui.disclosure_title("H4", level=4),
ui.disclosure_panel("Content", margin="10px"),
),
ui.disclosure(
ui.disclosure_title("H5", level=5),
ui.disclosure_panel("Content", margin="10px"),
),
ui.disclosure(
ui.disclosure_title("H6", level=6),
ui.disclosure_panel("Content", margin="10px"),
),
]
my_disclosure_title_levels = ui_disclosure_title_levels()
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.
Hmm it looks like that's actually an issue in React spectrum.
In which case, remove this example, don't bother mentioning level
, create a follow up ticket that tracks a ticket I filed against React-spectrum: adobe/react-spectrum#7671
my_disclosure_disabled = ui.disclosure( | ||
title="Heading", panel="Content", default_expanded=True | ||
) | ||
``` |
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.
Hmm it looks like that's actually an issue in React spectrum.
In which case, remove this example, don't bother mentioning level
, create a follow up ticket that tracks a ticket I filed against React-spectrum: adobe/react-spectrum#7671
Closes #1037
Web-client-ui PR that exports Accordion and Disclosure is merged. Not sure if it was already a part of the release though