Skip to content

fix: DH-17076 LayoutHints on TreeTables were not being applied#2041

Merged
mofojed merged 3 commits intodeephaven:mainfrom
mofojed:2035-rollup-layout-hints
Jun 3, 2024
Merged

fix: DH-17076 LayoutHints on TreeTables were not being applied#2041
mofojed merged 3 commits intodeephaven:mainfrom
mofojed:2035-rollup-layout-hints

Conversation

@mofojed
Copy link
Copy Markdown
Member

@mofojed mofojed commented May 29, 2024

- Related to DH-17076
- Needed a Core patch: deephaven/deephaven-core#5543
- Tested using both the Python and Groovy snippets from the ticket
- Fixes deephaven#2035
@mofojed mofojed requested a review from mattrunyon May 29, 2024 14:46
@mofojed mofojed self-assigned this May 29, 2024
Copy link
Copy Markdown
Collaborator

@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.

Did you want to merge the DHC change before merging this? Or order shouldn't matter?

Also, did you want to put the Jira ticket in the title so we know when it goes into DHE?

Comment thread packages/iris-grid/src/IrisGridTreeTableModel.ts Outdated
@mofojed mofojed changed the title fix: LayoutHints on TreeTables were not being applied fix: DH-17076 LayoutHints on TreeTables were not being applied May 29, 2024
@mofojed mofojed requested a review from mattrunyon May 29, 2024 18:06
@mofojed
Copy link
Copy Markdown
Member Author

mofojed commented May 29, 2024

@mattrunyon order shouldn't matter here, I added feature detection as well.

Copy link
Copy Markdown
Collaborator

@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 2 small things

Comment thread packages/iris-grid/src/IrisGridTreeTableModel.test.ts Outdated
Comment on lines +65 to +73
test('layoutHints property does not exist should not crash', () => {
const columns = irisGridTestUtils.makeColumns();
const table = irisGridTestUtils.makeTreeTable(columns, columns, 100, []);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (table as any).layoutHints;
const model = new IrisGridTreeTableModel(dh, table);

expect(model.layoutHints).toEqual(undefined);
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This test is identical to the test above it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not quite. undefined vs. property not existing, it is technically different. e.g.

var o = { foo: 'bar', fiz: undefined }
var o2 = { ...o }
delete o2.fiz

console.log(o.hasOwnProperty('fiz')) // true
console.log(o2.hasOwnProperty('fiz')) //false

Comment thread packages/iris-grid/src/IrisGridTreeTableModel.ts
@mofojed mofojed merged commit 2977dd2 into deephaven:main Jun 3, 2024
@mofojed mofojed deleted the 2035-rollup-layout-hints branch June 3, 2024 13:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Column grouping layout hints are ignored on rollup tables

2 participants