zed/crates/csv_preview
Oleksandr Kholiavko d9e35975c2
csv_preview: Add row filtering feature (#60339)
# Objective

CSV feature needs row filtering feature by column values. This PR
provides base implementation of it with barebones ui.

> NOTE: Sleek UI with search & proper scrolling hanling is implemented
in next PR. It's stacked on top to reduce review scope

## Solution

- New `FilterEntry` / `FilterEntryState` model in
`table_data_engine/filtering_by_column.rs` tracking per-column
applied/candidate filter values
- Filtering runs in the background (`feat: Implement background
filtering`) so large CSVs don't block the UI thread while a filter is
applied
- Filter menu entries reflect live counts and support a configurable
sort order (`FilterSortOrder`, added in `renderer/settings.rs` /
`settings.rs`)
- Filter/sort trigger buttons on column headers are hidden until hover,
using `GradientFade` (new in `ui/src/components/gradient_fade.rs`) to
fade content behind them

## Testing

Filter chain tested on csv fixtures with multiple filters applied
sequentially columns.

## Self-Review Checklist: (todo)

- [ ] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines) (out of scope of this pr)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

<img width="664" height="249" alt="image"
src="https://github.com/user-attachments/assets/0e9b0a91-1a27-4e0f-a8d4-fdce36735131"
/>

<img width="663" height="205" alt="image"
src="https://github.com/user-attachments/assets/0428f5c6-6aaa-4891-b010-ca79803f6613"
/>

---

Release Notes:

- Added initial row filtering UI & logic
2026-07-08 15:54:36 +00:00
..
src csv_preview: Add row filtering feature (#60339) 2026-07-08 15:54:36 +00:00
Cargo.toml csv_preview: Add settings UI panel with debug tools during development (#53496) 2026-05-13 00:44:26 +00:00
LICENSE-GPL