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

Dynamic widget improvements to Table.filter. #12032

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

jdunkerley
Copy link
Member

@jdunkerley jdunkerley commented Jan 9, 2025

Pull Request Description

  • Only shows relevant filter conditions for the selected columns.
  • Only show relevant columns and constants for the right hand side.
2025-01-09_15-53-41.mp4

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@jdunkerley jdunkerley added the CI: No changelog needed Do not require a changelog entry for this PR. label Jan 9, 2025
builder.append (Option "Equals" "..Equal" [["to", column_chooser]])
builder.append (Option "Not Equals" "..Not_Equal" [["to", column_chooser]])

if column_value_type != Value_Type.Boolean then
Copy link
Member

Choose a reason for hiding this comment

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

We have a method on Value_Type that checks this condition more precisely, would be better to use it:

Suggested change
if column_value_type != Value_Type.Boolean then
if column_value_type.has_ordering then

Copy link
Member Author

Choose a reason for hiding this comment

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

Want to exclude Boolean here as well (it has an ordering) but have updated.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh, I forgot that Boolean has ordering then. Hmm. Perhaps then column_value_type.has_ordering && column_value_type != Value_Type.Boolean to exclude the boolean explicitly?

Copy link
Member

@radeusgd radeusgd left a comment

Choose a reason for hiding this comment

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

This is really great, I'm very happy we are finally getting this improvement.

I added a few small suggestions.

As expected, I'm slightly concerned with the lack of tests. Is there no way to mock the cache? If not possible, do we have some ticket tracking this? As it would be good to have at least some tests for this at least at some point.

I guess many of our widgets do not really have tests, but the logic here is more complicated than before, so it would be great to have at least some sanity checks.

@jdunkerley jdunkerley added the CI: Ready to merge This PR is eligible for automatic merge label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants