-
Notifications
You must be signed in to change notification settings - Fork 15
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
docs: use_render_queue, use_liveness_scope, use_table_listener docs #1044
base: main
Are you sure you want to change the base?
Conversation
mofojed
commented
Nov 26, 2024
- Adding some more missing hooks documentation
- Closes docs: use_liveness_scope #823, closes deephaven.ui hooks documentation #659
- Adding some more missing hooks documentation - Closes deephaven#823, closes deephaven#659
- Remove the API reference to use_render_queue. The autodoc doesn't work correctly if the function has no parameters - Remove redundant information from the README at the base - Update signature for use_table_listener
@@ -0,0 +1,31 @@ | |||
# use_row_data | |||
|
|||
`use_row_data` lets you use the data of the first row of a table. This is useful when you want to listen to an updating table and use the data in your component. |
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 not entirely clear what the format of a row of data is here by just looking at the document. Perhaps a contrast with use_row_list
as someone would likely be trying to figure out which they want of those two.
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'll specify one returns a dictionary and the other returns a list in the intro paragraph.
Co-authored-by: margaretkennedy <[email protected]>
my_toast_table = toast_table(_source) | ||
``` | ||
|
||
The above example listens to table updates and displays a toast message when the table updates. The `toast` function must be triggered on the render thread, whereas the listener is not fired on the render thread. Therefore, you must use the render queue to trigger the toast. |
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 would useful to define toast or link to its docs - comes out of nowhere.
@@ -0,0 +1,84 @@ | |||
# use_table_listener | |||
|
|||
`use_table_listener` lets you listen to a table for updates. This is useful when you want to listen to a table and perform an action when the table updates. |
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.
The "this is an advanced feature" caveat should be mentioned in the paragraph, IMO. Stop someone in their tracks before getting to UI recommendations.
Co-authored-by: margaretkennedy <[email protected]>
- Specify list or dict for the row_data vs row_list methods - Add link to toast - Add warning in the use_table_listener hook intro paragraph