-
Notifications
You must be signed in to change notification settings - Fork 46
[DX-720] Enable nested tables to contain multiple types #3186
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7285a58 to
780c960
Compare
GregHolmes
left a comment
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.
LGTM
aralovelace
left a comment
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.
hi @m-hulbert just few feedback and suggestion. let me know what you think?
| | Parameter | Required | Description | Type | | ||
| | --- | --- | --- | --- | | ||
| | data | Optional | JSON-serializable data to associate with the user's presence. | <Table id='PresenceData'/> or String | | ||
| | data | Optional | JSON-serializable data to associate with the user's presence. | <Table id='PresenceEvent'/> or <Table id='IsUserPresentParameters'/> or <Table id='PresenceMember'/> | |
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.
duplicate data field?
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 made this data up for testing - will remove the file before I merge 🙂
| | Parameter | Required | Description | Type | | ||
| | --- | --- | --- | --- | | ||
| | events | Required | The event type(s) to subscribe to. | <Table id='PresenceEventType'/> or PresenceEventType[] | | ||
| | listener | Required | Callback function invoked when matching presence events occur. | (event: <Table id='PresenceEvent'/>) =\> void | |
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.
wondering if this =\> does it need to be => ?
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.
Yep you're right but this was just mock data to test it for now.
| {/* Expanded: button attached to nested container */} | ||
| {refExpanded && ( | ||
| <div className="mt-3 border border-neutral-400 dark:border-neutral-900 rounded-lg overflow-hidden"> | ||
| {/* Hide button as header of the container */} |
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.
would the comment should be Show button ? since its a show component below?
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.
Good point - have fixed in 381338d
| </div> | ||
| ))} | ||
| return ( | ||
| <React.Fragment key={id}> |
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.
does the table need to add a bit of spaces on the top ? or this is ok?
<div className="mt-2"> {/* Add wrapper with margin */}
<NestedTableExpandButton ... />
</div>
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 think it's ok - do you think it needs a bit more?
Description
The nested table component introduced in #3130 didn't allow for multiple tables to be reference in a cell, nor for a table + text when a property could be of different types.
This PR adds that functionality and also adds a unit test for nested tables in general.
You can temporarily test it here.
Checklist