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

Add widget for name_filter #11455

Merged
merged 9 commits into from
Oct 31, 2024
Merged

Conversation

radeusgd
Copy link
Member

Pull Request Description

Important Notes

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.

@radeusgd radeusgd added the CI: No changelog needed Do not require a changelog entry for this PR. label Oct 30, 2024
@radeusgd radeusgd self-assigned this Oct 30, 2024
@radeusgd
Copy link
Member Author

image

Builds a widget intended to be used for `name_filter` of `File.list` and
its siblings that allows to filter file names by file format.
name_filter_widget -> Widget =
known_patterns = File_Format.all.flat_map .get_name_patterns
Copy link
Contributor

Choose a reason for hiding this comment

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

Does File_Format.all still include Auto_Detect?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes:

all = [Auto_Detect] + format_types

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I had missed that you added get_name_patterns to that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, I thought that since Auto_Detect will accept any file from the known formats, we could define its set of patterns as a union of known formats' patterns. This also comes in handy because we wanted the "All known formats" entry in the dropdown.

@radeusgd radeusgd added the CI: Ready to merge This PR is eligible for automatic merge label Oct 31, 2024
@mergify mergify bot merged commit aad1107 into develop Oct 31, 2024
36 checks passed
@mergify mergify bot deleted the wip/radeusgd/11310-format-name-patterns branch October 31, 2024 14:05
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.

Populate Data.list name filter from File_Format.name_patterns
3 participants