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: Add architecture document #949

Merged
merged 10 commits into from
Nov 7, 2024
Merged

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Oct 22, 2024

- Provide details about the overall high-level architecture of deephaven.ui
- Diagram a couple work flows
@mofojed mofojed self-assigned this Oct 22, 2024
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Show resolved Hide resolved
plugins/ui/docs/architecture.md Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
plugins/ui/docs/architecture.md Show resolved Hide resolved
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved
dsmmcken
dsmmcken previously approved these changes Nov 6, 2024
plugins/ui/docs/architecture.md Outdated Show resolved Hide resolved

### Render context

Each component renders in its own render context, which helps keep track of state and side effects. While rendering components, "hooks" are used to manage state and other side effects. The magic part of hooks is they work based on the order they are called within a component. When a component is rendered, a new context is set, replacing the existing context. When the component is done rendering, the context is reset to the previous context. This allows for nested components to have their own state and side effects, and for the parent component to manage the state of the child components, re-using the same context when re-rendering a child component.
Copy link
Contributor

Choose a reason for hiding this comment

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

should you define hooks more explicitly before discussing their magic?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm they likely deserve their own instructional page, in the hooks folder. Right now I have pages for specific hooks (use_state, use_effect, use_memo) but having a top level hooks pages similar to the React docs would be handy.
I'll capture this as part of #996

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good to me!

@mofojed mofojed merged commit 6ae6493 into deephaven:main Nov 7, 2024
17 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.

General deephaven.ui docs (Architecture)
4 participants