Skip to content

Feat/configurable columns refactor - #3

Merged
falbany merged 13 commits into
mainfrom
feat/configurable-columns-refactor
Aug 7, 2026
Merged

falbany merged 13 commits into
mainfrom
feat/configurable-columns-refactor

Conversation

@falbany

@falbany falbany commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Merge branch 'feat/configurable-columns-refactor'

Enhance configurable columns with built-in macros, friendly headers, and stretch control

What's New for Users

Built-in column macros — Instead of writing regex patterns, simply use
keywords like match: version, match: date, match: git_commit,
match: type, match: filename, or match: extension to auto-extract
common metadata from filenames.

Friendly column headers — Give your columns custom display names with
the name: field. The internal column key stays the same, but the GUI
shows your friendly label in the column header.

Column stretch control — Control how columns resize with the
stretch: true/false field. Make the File column expand to fill space,
or keep version/date columns at a fixed width.

Simplified transform syntax — Use {group:1} instead of \g<1> for
backreferences in the transform field. Both syntaxes are supported.

Example

columns:
  File:
    name: File
    width: 600
    stretch: true
    match: '.*'
    transform: '{group:0}'
    priority: 100

  Version:
    name: Version
    width: 100
    stretch: false
    match: version           # built-in macro
    transform: '{group:1}'
    priority: 10

Migration

Existing configs using expression/group are automatically migrated.
See docs/superpowers/columns-refactoring-guide.md for details.

Verification

  • 734 tests passing (13 pre-existing failures unrelated to this change)
  • All documentation updated (template, column library, guides in EN/FR)

f.albany added 13 commits August 7, 2026 14:14
…eadings

- ui.py: column loop now zips column_headers + column_widths + column_stretches
- main_window.py: _sort_treeview heading update uses column_headers
- Update test fixtures to set column_headers/column_stretches alongside
  column_names/column_widths
- tests/test_config_exports.py: verify ColumnConfiguration/AppConfig field exports
- docs/superpowers/columns-refactoring-guide.md: migration guide for
  expression/group -> match/transform/stretch/name
…rmat

- template.py: columns section uses match/transform/stretch/name;
  escape {group:N} as {{group:N}} for str.format() compatibility
- column-library.md: all 30+ column definitions migrated from
  expression/group to match/transform with name/stretch
- columns-guide.en.md + .fr.md: field reference table and examples
  updated to new schema
- README.md: column example updated to new format
re.Pattern.expand() uses \\g<N> or \\1 syntax, not {group:N}.
Add a regex substitution to translate {group:N} -> \\g<N> before
calling expand(), so the template/docs syntax works correctly.
Backward compatible with \\g<N> and \\1 syntax.

Add 5 tests covering {group:0}, {group:1}, multi-group, and
backward compat with \\g<N> and \\1.
The _reset_treeview method was using column_names (section names) for
heading text instead of column_headers (friendly names from the name:
field). This caused the GUI to display section names instead of the
user-friendly names configured via the name: field.
Add Transform Backreference Syntax section to both EN and FR
columns guides, documenting {group:N}, \\g<N>, and \\N syntaxes.
Document all 6 built-in keywords (version, date, git_commit, type,
filename, extension) with regex patterns and usage examples in both
EN and FR columns guides, plus column-library.md.
@falbany
falbany merged commit 732f5a6 into main Aug 7, 2026
@falbany
falbany deleted the feat/configurable-columns-refactor branch August 7, 2026 13:44
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