Skip to content

feat(file_browser): add filter param for regex and callable filtering#9667

Open
kratos0718 wants to merge 2 commits into
marimo-team:mainfrom
kratos0718:feat/file-browser-filter-param
Open

feat(file_browser): add filter param for regex and callable filtering#9667
kratos0718 wants to merge 2 commits into
marimo-team:mainfrom
kratos0718:feat/file-browser-filter-param

Conversation

@kratos0718
Copy link
Copy Markdown

Closes #8399

📝 Summary

Adds a filter keyword argument to mo.ui.file_browser() so users can filter files using regex patterns or custom functions — not just file extensions.

Three ways to use it:

  • Regex string: filter=r"^train_"
  • Compiled pattern: filter=re.compile(r"\.csv$", re.IGNORECASE)
  • Callable: filter=lambda p: p.stat().st_size > 1_000_000

Directories are always shown for navigation. Works together with filetypes and ignore_empty_dirs.

Merge Checklist

  • I have read the contributor guidelines
  • Documentation has been updated (docstring updated)
  • Tests have been added (8 new tests, 79 total pass)
  • AI generated code reviewed line-by-line by the PR author

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment May 22, 2026 4:05pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@kratos0718
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Closes marimo-team#8399

Signed-off-by: Abhinav Tarigoppula <abhinav@Abhinavs-MacBook-Air.local>
@kratos0718 kratos0718 force-pushed the feat/file-browser-filter-param branch from 0c837e0 to 4888d06 Compare May 22, 2026 16:01
@kratos0718
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@kratos0718 kratos0718 marked this pull request as ready for review May 26, 2026 15:38
@kratos0718
Copy link
Copy Markdown
Author

Hi, just following up on this PR.
All checks are passing and CLA is signed.
Happy to make any requested changes!

@kratos0718
Copy link
Copy Markdown
Author

Hi! Just checking in — all automated checks are passing and CLA is signed. Happy to make any requested changes or incorporate feedback. Thanks for your time!

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.

file browser should have more flexible filtering

1 participant