fix: DH-22174: ui.table works with rollup and tree tables#1343
Open
mofojed wants to merge 6 commits intodeephaven:mainfrom
Open
fix: DH-22174: ui.table works with rollup and tree tables#1343mofojed wants to merge 6 commits intodeephaven:mainfrom
mofojed wants to merge 6 commits intodeephaven:mainfrom
Conversation
- I don't think formatting works yet
applyCustomColumns on a rollup TreeTable adds the column to the source rather than the aggregated output, so the if_ format column is not visible on the rollup itself and findColumn throws NoSuchElementException when the table is loaded. Validate up front in Python and raise ValueError when if_ is used with a RollupTable or TreeTable. Also throw a defensive error in the JS model if the case ever slips through. Remove the t_rollup_format_if test case that exercised the now-rejected combination.
|
ui docs preview (Available for 14 days) |
Split shared table proxy logic into a generic JsBaseTableProxy base class and add a dedicated JsTreeTableProxy for TreeTable (including rollup) so TreeTables no longer reuse JsTableProxy.
|
ui docs preview (Available for 14 days) |
jnumainville
requested changes
May 1, 2026
| def _validate_table_format(format_: list[TableFormat] | TableFormat) -> None: | ||
| def _validate_table_format( | ||
| format_: list[TableFormat] | TableFormat, | ||
| table: Table | RollupTable | TreeTable | UriElement | str, |
Collaborator
There was a problem hiding this comment.
Worth creating a type for all these, something like TableLike? In __init__ below too.
Comment on lines
+94
to
+109
| const { | ||
| frontColumns = null, | ||
| frozenColumns = null, | ||
| backColumns = null, | ||
| hiddenColumns = null, | ||
| columnGroups = null, | ||
| } = layoutHints; | ||
|
|
||
| this.layoutHints = { | ||
| frontColumns, | ||
| frozenColumns, | ||
| backColumns, | ||
| hiddenColumns, | ||
| columnGroups, | ||
| areSavedLayoutsAllowed: false, | ||
| }; |
Collaborator
There was a problem hiding this comment.
I know this was pretty much just moved... but could be this to remove some redundancy:
this.layoutHints = {
frontColumns: null,
frozenColumns: null,
backColumns: null,
hiddenColumns: null,
columnGroups: null,
...layoutHints,
areSavedLayoutsAllowed: false,
};
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
_ifconditional formatting when used with rollup tables. This will error early when validating the Python.