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

feat: First pass of ui.table functionality #95

Merged
merged 3 commits into from
Nov 6, 2023

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
plugins/ui/src/deephaven/ui/_internal/utils.py Outdated Show resolved Hide resolved
plugins/ui/src/deephaven/ui/components/panel.py Outdated Show resolved Hide resolved

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
9 checks passed
@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