Skip to content

B2view improvements: CTable filtering is here!#661

Merged
FrancescAlted merged 14 commits into
mainfrom
b2view-improvements
Jun 12, 2026
Merged

B2view improvements: CTable filtering is here!#661
FrancescAlted merged 14 commits into
mainfrom
b2view-improvements

Conversation

@FrancescAlted

@FrancescAlted FrancescAlted commented Jun 12, 2026

Copy link
Copy Markdown
Member

Many improvements in navigation for the data panel. Now it is possible to do complex filters on ctable objects.

In detail:

b2view: packaging & defaults

  • b2view ships with blosc2 by default — textual/rich moved into core dependencies and the [tui] extra was removed; new "Command line tools" section in the README and a full getting-started walkthrough (doc/getting_started/b2view.rst: sample store, panels, key reference, dim mode, CLI options).
  • The terminal owns the mouse by default, so native text selection/copy works; --mouse opts into capture (click-to-focus, wheel scrolls the data grid by half a page, paging at the edges).

Data panel: filtering (the headline feature)

  • f — row filtering for CTables: takes the same string expressions as CTable.where() (dotted nested names, and/or) and pages through the matching view; verified on the 24.3M-row chicago-taxi store (67 matches, instant).
  • / — column filtering: narrows visible columns by case-insensitive substring; column paging and the c goto-column modal operate on the subset.
  • Filters combine freely, persist per node for the session, show in the data header with unfiltered totals, and escape clears one layer per press (dim mode → rows → columns).

Data panel: rendering & navigation

  • Adaptive column fit: two-pass measured-width column windows replacing a fixed chars/column estimate, with re-fit on terminal resize and panel maximize/restore.
  • Aligned float formatting: uniform decimals per column so decimal points line up.
  • Navigation keys: c goto-column (index, exact name, or unique prefix), s/e first/last column window, cursor column preserved across row paging/jumps, and dim-mode movements now clamp at boundaries instead of wrapping.
  • ? help screen listing all keys grouped by area, plus the data-panel hint bar (filter: f(rows) /(cols) | rows: t/b/g | cols: s/e/c).

Testing & housekeeping

  • First automated test suite for b2view: Pilot-driven keyboard journeys against a deterministic generated store (tui marker), plus render unit tests — 11 tests total, all passing.
  • A CTable regression test (sort_by on an unprojected view must not gather all columns), todo/b2view.md tracker with done/pending items, and updated install docs (pip install . --group test).

Filters use the same string expressions as CTable.where() (dotted
nested names, and/or) and page through the matching view; escape or
an empty expression restores the full table, and each node remembers
its filter for the session.
`f` takes the same string expressions as CTable.where() (dotted nested
names, and/or) and pages through the matching view; `/` narrows the
visible columns by case-insensitive substring, and column paging plus
the `c` goto-column modal operate on that subset.  Both filters combine
freely, are remembered per node for the session, and are shown in the
data header along with the unfiltered totals; escape clears one layer
per press (dim mode, then rows, then columns).
@FrancescAlted FrancescAlted changed the title B2view improvements B2view improvements: CTable filtering is here! Jun 12, 2026
Importing textual works on Pyodide, but instantiating an App selects a
terminal driver and the Linux driver needs termios, which Emscripten
does not provide.  Guard with blosc2.IS_WASM, like the other wasm
exclusions in the test suite.
@FrancescAlted FrancescAlted merged commit 2434e06 into main Jun 12, 2026
7 of 16 checks passed
@FrancescAlted FrancescAlted deleted the b2view-improvements branch June 12, 2026 12:16
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.

1 participant