Skip to content

feat(filter): apply one row alone and keep one record of what the filter bar runs - #4460

Merged
datlechin merged 6 commits into
mainfrom
feat/filter-panel-revamp
Nov 24, 2026
Merged

datlechin merged 6 commits into
mainfrom
feat/filter-panel-revamp

Conversation

@datlechin

@datlechin datlechin commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Each filter row has a play toggle: on runs only that row, checked or not, and leaves every checkbox alone; off runs the checked rows again. Option-Command-Return in a row's value field does the same, and the context menu item stays.
  • One record of what the grid runs, TabFilterState.applied (AppliedFilters: rows, logic mode, the row applied alone). It replaces FilterCommit plus executedFilters, which could disagree. Every change to it goes through one path in FilterCoordinator: discard guard, build the query, then write state, save and rerun.
  • The header says "Not applied", "Changes not applied" or "Only one filter applied". Clear is now Turn Off. Remove All Filters asks first and closes the bar.
  • Row buttons follow NSRuleEditor: remove, then add, and add inserts below the row. The three row buttons are borderless, so the busiest MongoDB row still fits the 400 pt pane. Unchecked rows are no longer dimmed. The grip is line.3.horizontal. Move Up and Move Down stay as accessibility actions only.
  • Filter settings moved to their own page, Settings > Data > Filters, which ⋯ > Filter Settings… opens.
  • Return in a value field reruns the current mode, so a row applied alone stays alone. Apply and Command-Return run the checked rows.
  • Fixed with it:
    • Search All Rows was dropped by the next page, sort, refresh or count.
    • Turn Off, Apply, the status bar and the row total read the unapplied draft as if it ran.
    • Removing a row wrote the panel before the discard guard, then reran the whole draft instead of what was running.
    • Reopening a table ran the saved draft, not what it was showing. The saved file now carries what ran and still writes isApplied for the previous stable.
    • Remove All left an empty bar with no way to add a row.
    • A suggestion list that AppKit closed still took Down and Return.
    • Presets lost Match all or Match any.
    • Hidden columns were missing from the column menu, and a filter on one is now typed from the schema.
    • Renaming or dropping a column in the Structure tab, including through a table rebuild, left filters on the old name.
    • Preset write failures were silent. "1 filters applied" now reads "1 filter applied", and several strings were localized.
  • Tests changed because the behavior changed on purpose: CellFilterStateTests.searchAllRowsGivesWay, turnedOffRowsStayOff, TabFilterStateTests.appliedIsASnapshotOfTheDraft, the FilterRestoreTests removal tests, tabSwitchSavesTheRowsAroundARowAppliedAlone, and FilterBarReturnUITests, which now finds Turn Off.

Docs: TableProApp/docs#278

Test plan

  • Unit plan: 33,470 passed, 0 failed (the full run before the last review round). After that round, the filter, column fetch and structure suites ran again: 228 passed.
  • New tests cover each fixed bug above, the applied-alone transitions and status, saving and restoring applied (with a file written before it existed), Option-Command-Return with Caps Lock or fn held, and rows fitting 400 pt.
  • A local build drives a seeded SQLite table: three rows, Match any, the third unchecked. Apply shows South, East and West. Play on the title row shows only West and the status.
Light Dark
Before Before Before dark
After, applied After After dark
After, one row alone After alone After alone dark
Settings > Data > Filters Filter settings Filter settings dark

Fixes #4456

@datlechin
datlechin merged commit 22e7e2d into main Nov 24, 2026
11 checks passed
@datlechin
datlechin deleted the feat/filter-panel-revamp branch November 27, 2026 16:38
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.

Add an Individual Apply Button for Each Filter Row

1 participant