Table listings: honor fields/field-display-names/field-links (bd-listing-table-fields-peg1w3b3) - #480
Merged
Merged
Conversation
…ields/field-display-names Plan skeleton + committed minimal repro (2-item table listing with fields: [title] and field-display-names). Reproduced at HEAD: output still renders Title|Date|Author with a Q-12-10 undefined-variable warning. Verdict: ready to design — mechanism choice (pre-rendered binding keys vs generated template source) pending user alignment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mechanism A (pre-rendered binding keys table-header/table-row), Q1-parity display names and cell rules (field-links, dotted-path extra lookup, presence-filtered default fields), pipe-escaping in cells. Interactive parity (sort-ui/hover/list.js classes) split to bd-bl1e00r6. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ing-table-fields-peg1w3b3) The built-in table listing templates hardcoded Title|Date|Author, ignoring fields:/field-display-names: and emitting Q-12-10 undefined-variable warnings for items lacking date/author. The binding now pre-renders listing.table-header and per-item table-row markdown from the listing config (Q1 parity: default display-name map with author overlay and raw-name fallback, field-links with table default [title, filename], dotted-path extra lookup, arrays joined ', ', image -> image-html, missing values -> empty cell, pipe/newline escaping); the templates shrink to interpolating those keys. Defaulted (non-explicit) field sets are presence-filtered against the items, and default column order is Q1's Date|Title|Author. Also fixes a latent row-merging bug: the doctemplate resolver chomps a partial's final newline, so the old $items:item-table()$ merged every item into a single table row; the listing template now iterates with $for(items)$ $it:item-table()$ $endfor$. New binding keys (additive to the L8 contract): listing.table-header, listing.field-links, item table-row. New config: field-links defaults (Option so explicit [] unlinks), fields_explicit flag. No snapshot changes. Full cargo xtask verify green. Follow-ups: bd-bl1e00r6 (interactive table parity), bd-0t4e07jk (bare-frontmatter listing fields). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The built-in table listing templates hardcoded
| Title | Date | Author |, ignoringfields:andfield-display-names:and emitting aQ-12-10undefined-variable warning per listing for items lacking date/author (real-world hit: Posit Connect docshow-to/index.md).The doctemplate language is logic-less, so dynamic columns come from Rust: the binding now pre-renders
listing.table-headerand a per-itemtable-rowmarkdown string (additive L8 binding keys), and the table templates shrink to interpolating them.Q1-parity semantics, per the design session recorded in
claude-notes/plans/2026-08-09-listing-table-fields.md:image → " ") overlaid withfield-display-names; unknown fields fall back to the raw field name.extralookup; arrays join", ";image→image-html; missing values → empty cell (no more Q-12-10).field-links: new config surface (was parsed but unused), table default[title, filename]; typedOptionso an explicitfield-links: []genuinely unlinks.fields:) are presence-filtered against the items — items with no authors ⇒ no Author column — and default order is Q1's Date | Title | Author.Latent bug also fixed
The doctemplate resolver chomps a partial's final newline (Pandoc
removeFinalNlparity), so the old$items:item-table()$merged every item into a single table row for any table listing with ≥2 items. The listing template now iterates with$for(items)$ $it:item-table()$ $endfor$; both e2e tests assert row structure.Verification
cargo xtask verify(incl. WASM leg) green.claude-notes/plans/listing-table-fields-investigation/repro/): single<th>How To</th>, one<tr>per item, linked titles, zero warnings. Also verified ondocs/errors/index.qmd(itself atype: tablelisting).wasm-quarto-hub-client/Cargo.lockdiff is the 0.13→0.14 workspace version bumps finally reaching the standalone lockfile (refreshes only when the WASM leg builds).Follow-ups filed
listing-item.extra:opt-in — design decision pending).🤖 Generated with Claude Code