Skip to content

feat: First pass of ui.table functionality#95

Merged
mofojed merged 3 commits intodeephaven:mainfrom
mofojed:ui-plugin-table-only
Nov 6, 2023
Merged

feat: First pass of ui.table functionality#95
mofojed merged 3 commits intodeephaven:mainfrom
mofojed:ui-plugin-table-only

Conversation

@mofojed
Copy link
Member

@mofojed mofojed commented Oct 25, 2023

  • Basic ui.table on_row_double_press functionality added
  • Does not include the JS side that can handle the ui.table for now

- Basic ui.table on_row_double_press functionality added
- Does not include the JS side that can handle the ui.table for now
@mofojed mofojed requested a review from jnumainville October 25, 2023 19:37
@mofojed mofojed self-assigned this Oct 25, 2023

self.source = empty_table(100).update(["X = i", "Y = i * 2"])

def expect_render(self, ui_table, expected_props: dict[str, Any]):
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing type for ui_table

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm actually not really sure how to type this properly - if I import the type to early, I get an error when writing the tests (because importing deephaven before the server starts causes an error). Any idea how I should handle this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can do this with postponed evaluation (PEP 563). Try importing from __future__ import annotations
https://stackoverflow.com/questions/70883599/type-hints-for-types-from-modules-which-may-not-be-loaded

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I've cleaned this up, though my editor is still complaining about it...

- Some tests were failing, incorrectly named functions
- Added type annotation for UITable
@mofojed mofojed requested a review from jnumainville November 6, 2023 14:25
@mofojed mofojed merged commit 09136a5 into deephaven:main Nov 6, 2023
@mofojed mofojed mentioned this pull request Jan 9, 2024
20 tasks
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.

2 participants