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

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

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

mofojed
Copy link
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
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?

packages/iris-grid/src/IrisGridTreeTableModel.ts Outdated Show resolved Hide resolved
@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
Member Author

mofojed commented May 29, 2024

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

Copy link
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

packages/iris-grid/src/IrisGridTreeTableModel.test.ts Outdated Show resolved Hide resolved
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
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
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

@mofojed mofojed merged commit 2977dd2 into deephaven:main Jun 3, 2024
12 checks passed
@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