-
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
refactor: Cleanup component mappings and utils (python side) #523
refactor: Cleanup component mappings and utils (python side) #523
Conversation
SPECTRUM_ELEMENT_TYPE_PREFIX | ||
) | ||
name.startsWith(SPECTRUM_ELEMENT_TYPE_PREFIX) && | ||
name.substring(SPECTRUM_ELEMENT_TYPE_PREFIX.length) in |
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 check since the components are no longer differentiated by .spectrum
namespace. All of this code will get removed in next PR anyway.
|
||
|
||
def spectrum_element(name: str, /, *children: Any, **props: Any) -> BaseElement: | ||
def base_element(name: str, /, *children: Any, **props: Any) -> BaseElement: |
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.
I'd probably just call this component_element
and then have this used by all the other components as well (action_group, action_menu, list_view, etc) that are defining the full type currently.
|
||
function RadioGroup({ | ||
onFocus: serializedOnFocus, | ||
onBlur: serializedOnBlur, | ||
orientation: orientationMaybeUppercase, |
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.
What are we doing this for? I think should be part of a separate PR if this is something we want to handle.
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.
It's for consistency with other components + docs where most of our string enumerations are uppercase. I just missed it on radio PR and slipped it in. Doesn't have to be in this PR
tests/ui.spec.ts-snapshots/UI-all-components-render-1-chromium-linux.png
Outdated
Show resolved
Hide resolved
I addressed review comments. Split out #536 to separate the RadioGroup orientation prop |
d4088a8
to
a7ee2fe
Compare
…eephaven#523)" This reverts commit 195f334.
- Need to revert some changes that require a newer version of @deephaven/components so that we can publish a version for Enterprise V+ - Will publish and then add these back to main - **Revert "refactor: Cleanup component mappings and utils (python side) (#523)"** - **Revert "feat: Make RadioGroup orientation prop case insensitive (#536)"** - **Revert "feat: ui.checkbox, ui.button, ui.button_group, ui.radio, ui.radio_group, ui.icon (#512)"** - **Revert "chore: Update DH packages to ^0.81.1 jsapi-types to ^1.0.0-dev0.34.3 (#511)"** - Tested with a V+ branch on Enterprise and v0.78 of `@deephaven` packages
…78 (#550)" (#551) - This reverts commit 27414e1. - Adds back the following reverted changes: - **Revert "refactor: Cleanup component mappings and utils (python side) (#523)"** - **Revert "feat: Make RadioGroup orientation prop case insensitive (#536)"** - **Revert "feat: ui.checkbox, ui.button, ui.button_group, ui.radio, ui.radio_group, ui.icon (#512)"** - **Revert "chore: Update DH packages to ^0.81.1 jsapi-types to ^1.0.0-dev0.34.3 (#511)"**
This is the first of 2 PRs to simplify our DH UI component mappings since we no longer have the Spectrum dependency. This one addresses the python modules + minimal re-mapping in the JS to make it still work. The next one will cleanup the .js side more holistically.
resolves #425