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

feat: Use useWidget hook to load widgets #502

Merged
merged 11 commits into from
Jun 14, 2024
Merged

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented May 30, 2024

- Simplifies a lot of the logic in WidgetHandler
- Don't need to pass through the `fetch` function anymore
- Haven't tested from Enterprise yet
Copy link
Contributor

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

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

Haven't tested this yet, but just noticed a few small things

plugins/ui/src/js/src/widget/WidgetHandler.tsx Outdated Show resolved Hide resolved
plugins/ui/src/js/src/widget/WidgetHandler.tsx Outdated Show resolved Hide resolved
@mofojed
Copy link
Member Author

mofojed commented May 31, 2024

e2e tests won't work until I've pushed the web-client-ui changes and deephaven-core has been updated.

mofojed added a commit to deephaven/web-client-ui that referenced this pull request Jun 4, 2024
- Hook for loading a widget that makes it easy to use
- `ObjectManager` context allows for implementation to handle loading
the object
- On Core side, we have a very simple `ObjectManager`, as we just have
one connection
- On Enterprise side, the `ObjectManager` provided to the context
manager will need to handle fetching from queries, and will be able to
handle more scenarios (such as when a query is restarting)
- Use with deephaven/deephaven-plugins#502
mofojed added a commit to mofojed/web-client-ui that referenced this pull request Jun 4, 2024
- Hook for loading a widget that makes it easy to use
- `ObjectManager` context allows for implementation to handle loading
the object
- On Core side, we have a very simple `ObjectManager`, as we just have
one connection
- On Enterprise side, the `ObjectManager` provided to the context
manager will need to handle fetching from queries, and will be able to
handle more scenarios (such as when a query is restarting)
- Use with deephaven/deephaven-plugins#502
mofojed added a commit to deephaven/web-client-ui that referenced this pull request Jun 4, 2024
- Hook for loading a widget that makes it easy to use
- `ObjectManager` context allows for implementation to handle loading
the object
- On Core side, we have a very simple `ObjectManager`, as we just have
one connection
- On Enterprise side, the `ObjectManager` provided to the context
manager will need to handle fetching from queries, and will be able to
handle more scenarios (such as when a query is restarting)
- Use with deephaven/deephaven-plugins#502
@mofojed mofojed requested a review from mattrunyon June 6, 2024 17:20
Copy link
Contributor

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

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

Needs the package versions updated and conflict fixed

@mofojed mofojed requested a review from mattrunyon June 13, 2024 13:14
Copy link
Contributor

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

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

Just a few small things

plugins/ui/src/js/src/widget/WidgetHandler.tsx Outdated Show resolved Hide resolved
plugins/ui/src/js/src/widget/WidgetHandler.tsx Outdated Show resolved Hide resolved
- Doesn't show the full message until you click the Info button
- Reload button only visible if added as an action
- Conform WidgetError to Error type
- Also fix up error type to pass back a `name` like other errors in JS
@mofojed mofojed requested a review from mattrunyon June 14, 2024 15:20
@mattrunyon
Copy link
Contributor

mattrunyon commented Jun 14, 2024

Needs some max-height or shrinking on the error message. If panels are relatively small the disconnected overlay breaks out of the panel (see bottom right panels in this screenshot)

Also, there is some inconsistency around some of the styling it seems between the panels and tables. The text stands out more on a table than the other panels. This might just be the styling for iris-grid though and not something we care about right now

image

@mofojed
Copy link
Member Author

mofojed commented Jun 14, 2024

Yea for the other panels that'll need to be taken care of when we move them to use useWidget (part of the core-plugins-refactor changes).

- Get scrolling if it is too big for the component
@mofojed mofojed merged commit d9d1e5e into deephaven:main Jun 14, 2024
13 checks passed
mofojed added a commit to mofojed/deephaven-plugins that referenced this pull request Jun 14, 2024
- Needs deephaven/web-client-ui#2030
- Uses the `useWidget` hook defined in
deephaven/web-client-ui#2030 to load widgets
- Allows for the errors/fetch implementation to be defined at the top
level
- Needed for DH-16737
- Tested in Core with a bunch of widgets, works as expected
- Unit tests added
mofojed added a commit that referenced this pull request Jun 14, 2024
- Needs deephaven/web-client-ui#2030
- Uses the `useWidget` hook defined in
deephaven/web-client-ui#2030 to load widgets
- Allows for the errors/fetch implementation to be defined at the top
level
- Needed for DH-16737
- Tested in Core with a bunch of widgets, works as expected
- Unit tests added
bmingles added a commit that referenced this pull request Jun 17, 2024
Rollup and esbuild optional dependencies were removed from the
package-lock by this PR:
#502

Adding them back to top level `optionalDependencies` to ensure they are
available

For reference to get this list I:
1. used `vscode` file history to find the package-lock.json diff that
removed the dependencies.
2. copy / pasted the removed blocks of `esbuild` and `rollup`
dependencies into a new `.json` file
3. Used `jq` to flatten the names + versions `cat myfile.json | jq
'with_entries(.value = .value.version)'`
4. Tweak / copy / pasted into optionalDependencies

resolves #560
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.

None yet

2 participants