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

docs: Add the ui.table spec #82

Merged
merged 12 commits into from
Oct 31, 2023
Merged

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Oct 5, 2023

  • Includes a whole bunch of method specifications and deprecations
  • Closes Spec ui.table #78

- Includes a whole bunch of methods and deprecations
@mofojed mofojed self-assigned this Oct 5, 2023
@mofojed mofojed changed the title Add the ui.table spec docs: Add the ui.table spec Oct 5, 2023
@mofojed mofojed requested a review from rcaudy October 5, 2023 17:38
- Also specified that we will not be adding dropColumnFormats functionality (not sure it's necessary ... )
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
Comment on lines 969 to 972
##### context_menu

Add custom items to the context menu. You can provide a list of actions that always appear, or a callback that can process the selected rows and send back menu items asynchronously.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we have an option for both row and header context menu items?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I wasn't sure exactly how we want to structure this. With a callback, you can see what cell the user has clicked on (or header/row). I'll clarify that the CellIndex will be sent instead of just the RowIndex. Then, using a callback you can use the context to determine whether to return an action or not.

I don't know if we want to have convenience parameters for actions that will always get added to certain spots (cell_menu_items, column_header_menu_items, row_header_menu_items, etc).

plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
Comment on lines +1158 to +1160
##### quick_filter

Add a quick filter for the UI to apply to the table.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to allow applying advanced filters? Or do we want to move in a direction of just "filters" where "advanced filters" are just a builder for something you could do in the filter language that quick filters use. Or can you not do the advanced filter operations in our quick filter language?

Copy link
Contributor

Choose a reason for hiding this comment

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

I intend to move the existing UI to be serialized as quick filters.

Copy link
Contributor

Choose a reason for hiding this comment

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

plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
jnumainville
jnumainville previously approved these changes Oct 9, 2023
- `search_display_mode` => `can_search`, a more concise name
- `show_totals` => `aggregations`, since it's about setting aggregations and that's how we show it in the side bar
- Replace format_columns with color_column, color_row, and format instead
- Rather than having one method that accepts everything, break it out into what is expected instead
jnumainville
jnumainville previously approved these changes Oct 11, 2023

<!-- TODO: For ranges, such as "In Between", how should we specify that? Should we define a quick filter format for that? (e.g. `(5, 20)`, and `[5, 20]`, matching how you'd notate an interval) -->
<!--
TODO: We also don't allow conditional formatting that sets a colour on one column depending on the value on another column; eg. `source.format_columns(["A = B > 2 ? BLUE : NO_FORMATTING"])`
Copy link
Member Author

Choose a reason for hiding this comment

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

@dsmmcken I have questions about these color_column methods if we're going this route - using this kind of API (which conforms to our current UI), we simply would not be able to do some of the kinds of formatting that are in our examples right now (e.g. colour one column based on the value in another column). Is that functionality we should build into the UI and allow more flexibility programmatically?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is that functionality we should build into the UI and allow more flexibility programmatically?

Probably. I wonder if there's a more raw version of the UI that makes sense in those cases. I haven't given detailed thought how to handle this, other than conceptually ui.table is intended to reflect state in the UI. Where as users may use more free-form formatting as part of queries. It is similar to where vs quick_filters in a way yes, however I don't think this would be an adequate replacement for format_columns if it was so striped down. This will be tricky.

- Have custom types defined in a common area
- Add `selection_mode` API
- Change all constants to SCREAMING_SNAKE_CASE, as per PEP8
- Update `context_menu` to use it's own type instead of using `SelectionMode` so it's a little clearer
@mofojed
Copy link
Member Author

mofojed commented Oct 31, 2023

Add in state of partition table selection as an option on ui.table as well.

@mofojed mofojed merged commit f885ea0 into deephaven:main Oct 31, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spec ui.table
4 participants