Skip to content
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

Merged
merged 20 commits into from
Jan 8, 2025

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Nov 26, 2024

- 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
plugins/ui/docs/hooks/use_row_data.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_render_queue.md Show resolved Hide resolved
plugins/ui/docs/hooks/use_liveness_scope.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_liveness_scope.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_liveness_scope.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_render_queue.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_render_queue.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_table_listener.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_table_listener.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_table_listener.md Outdated Show resolved Hide resolved
mofojed and others added 2 commits December 12, 2024 09:31
- 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
plugins/ui/docs/hooks/use_row_data.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_table_listener.md Outdated Show resolved Hide resolved
plugins/ui/docs/hooks/use_table_listener.md Outdated Show resolved Hide resolved
mofojed and others added 2 commits December 16, 2024 16:44
- There was already a note in the introduction for the only recommendation we were providing
@@ -0,0 +1,62 @@
# use_liveness_scope
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for @dsmmcken: When Salmon goes live, will these headings have to change the docs syntax:

---
id: whatever
title: whatever
sidebar_label: ...
---

And if so, is there a transition tool that will make changing them quick?


## Refactoring to avoid liveness scope

In the above example, we could refactor the component to avoid using `use_liveness_scope` by deriving the table from state instead of setting it directly:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is the better approach? If this is better than using a liveness scope, then why present the first example at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kind of an escape hatch if you need it. Ideally you refactor such that you don't need to use it.

Copy link
Contributor

@jjbrosnan jjbrosnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two overarching comments:

  • Link to other docs (use_state, toast, etc.) every time you mention a method in backticks.
  • Some images or GIFs would be greatly beneficial to these docs, so I could actually see what happens without having to start up a server myself to run code.

mofojed and others added 5 commits December 18, 2024 14:05
- The empty set seemed to be an odd choice. Default to `None` for the table data hooks.
- Add explanation for sentinel object
- Add examples with null value
@mofojed mofojed requested a review from jjbrosnan December 18, 2024 19:41
jnumainville
jnumainville previously approved these changes Dec 18, 2024
@mofojed
Copy link
Member Author

mofojed commented Dec 19, 2024

@jnumainville I noticed the docs failing when I try to autodoc the use_render_queue method. Seems like it doesn't like methods that don't have parameters. Filed a ticket: https://deephaven.atlassian.net/browse/DH-18247

@mofojed mofojed dismissed stale reviews from margaretkennedy and jnumainville via 20179a0 December 19, 2024 15:31
@mofojed mofojed merged commit abd691e into deephaven:main Jan 8, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: use_liveness_scope deephaven.ui hooks documentation
4 participants