feat: Add ObjectFetcher context and useObjectFetcher hook#1753
Merged
mofojed merged 13 commits intodeephaven:mainfrom Feb 2, 2024
Merged
feat: Add ObjectFetcher context and useObjectFetcher hook#1753mofojed merged 13 commits intodeephaven:mainfrom
mofojed merged 13 commits intodeephaven:mainfrom
Conversation
- Register a context that will fetch an object given the provided object metadata - Make the metadata parameter required for the useDeferredApi calls
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1753 +/- ##
==========================================
+ Coverage 46.06% 46.10% +0.03%
==========================================
Files 626 627 +1
Lines 37596 37622 +26
Branches 9460 9470 +10
==========================================
+ Hits 17319 17345 +26
Misses 20222 20222
Partials 55 55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
mattrunyon
requested changes
Jan 29, 2024
- Added JSDocs and some tests
- Add VariableDescriptor type and fix typings of getObject methods - Use VariableDescriptor type instead of defining a ObjectMetadata type
- Removing `fetch` from props - means panel should always be serializable - Use VariableDescriptor name
- Move ConnectionContext to app-utils - Clean up types around metadata
- Most annoyingly, have the `VariableDescriptor` which includes both the name and ID (so we have the metadata we need to display a table title), but then sanitize the object before we fetch from the API - Get the naming for `widget` in the open panel event
mattrunyon
requested changes
Feb 1, 2024
- Change up how typing is on the ObjectFetcher generic - Downside is now there's casting at the ObjectFetcherContext.Provider level - wonder if there's some other way to resolve it
mattrunyon
approved these changes
Feb 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VariableDescriptorto fetch an objectVariableDescriptorobject will be extended to include connection information (such as which query/session the variable is from)BREAKING CHANGE:
useConnectionis moved fromjsapi-componentspackage toapp-utilspackageWidgetDefinitionhas been renamed toWidgetDescriptor