feat: add undefined type option#1026
Merged
wusteven815 merged 16 commits intoDec 16, 2024
Merged
Conversation
Contributor
Author
|
Example: from deephaven import ui
@ui.component
def nullish_calendar():
return ui.flex(
ui.calendar(value=ui.types.Undefined),
ui.calendar(value=None),
)
calendar_test = nullish_calendar()
|
mattrunyon
reviewed
Nov 18, 2024
mofojed
previously requested changes
Nov 19, 2024
Co-authored-by: Mike Bender <mikebender@deephaven.io>
mattrunyon
reviewed
Nov 19, 2024
bmingles
reviewed
Nov 20, 2024
bmingles
reviewed
Nov 20, 2024
bmingles
previously requested changes
Nov 20, 2024
Contributor
bmingles
left a comment
There was a problem hiding this comment.
Code changes look good to me. I like how this approach simplifies things. Left 1 comment to update comment block with new _nullable_props arg. Also would be good to put something about this in the UI docs.
mofojed
reviewed
Nov 20, 2024
Member
mofojed
left a comment
There was a problem hiding this comment.
@wusteven815 as @bmingles suggested let's add a couple docs for this as well.
- An example to
picker.mdshowing the use ofNonevsUndefined - A subsection in
architecture.mdcomponents, named "Props" where we detail how we're mapping React JS props to Python args in general (children are mapped to positional args, other props are mapped to keyword args, along with a couple small examples), then a subsection within that for "Handlingnullvs.undefined" and detail how the issue (JS hasnull/undefined, some components require that differentiation, Python only hasNone), and how we're addressing it.
bmingles
reviewed
Nov 20, 2024
bmingles
reviewed
Nov 20, 2024
bmingles
previously requested changes
Nov 20, 2024
Contributor
bmingles
left a comment
There was a problem hiding this comment.
Suggested changes for controlled vs uncontrolled description / examples.
Co-authored-by: Brian Ingles <github@emeraldwalk.com>
mofojed
reviewed
Nov 21, 2024
mofojed
previously requested changes
Nov 28, 2024
Co-authored-by: Mike Bender <mikebender@deephaven.io>
mofojed
previously approved these changes
Dec 10, 2024
Co-authored-by: margaretkennedy <82049573+margaretkennedy@users.noreply.github.com>
mofojed
approved these changes
Dec 13, 2024
margaretkennedy
approved these changes
Dec 16, 2024
This file contains hidden or 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
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.
nullfromundefined#549Undefinedobject for nullable props_nullable_propspassed tocomponent_element/BaseElementNonewill be translated tonullandUndefinedwill not exist in the props object