Align Transactions/Source Document headings vertically

.pdf-col-head centers "Source Document" within a 26px row (height set
by its zoom-control buttons). .txn-col-head's own row collapsed to just
its h2's line-box once its actions moved out, losing that same
centering offset, so "Transactions" sat a few px higher. Gave both
rows an explicit min-height:26px so they match in every state,
including before any file loads.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
JasonFraser 2026-10-30 13:33:58 -04:00
parent f7fcec404a
commit 329152c8fe
2 changed files with 41 additions and 7 deletions

View File

@ -2684,11 +2684,29 @@ duplicate above); the `app` container rebuilt each time, and the served bundle
hash-matched against the local build output and confirmed to contain `txn-actions-row`/
`txn-actions-right` while `txn-col-head-actions` no longer appears anywhere. No
backend touched - pure template reordering + CSS, so `backend/measure.py` doesn't
apply. **Not machine-verified:** the actual rendered alignment/spacing in a real
browser - Claude-in-Chrome still did not connect (tried again both passes) - same
standing limitation as every other UI-only change in this project; this one in
particular needs the user's own look, since it's a pure visual-alignment request and
the first pass already shipped a misread of it once.
apply.
**Third pass, same day: the two headings were still a few pixels off vertically.**
Root cause, reasoned through rather than guessed at a pixel offset: `.pdf-col-head`
is `align-items:center` with the zoom-control buttons (26px tall, the tallest thing
that can appear in that row) as a sibling, so "Source Document" sits vertically
CENTERED within a 26px-tall row, a few px below the row's own top edge. Once
`.txn-col-head`'s own actions moved out (the second-pass fix above), that row had
NOTHING but its own h2 left in it - its height collapsed to the h2's own shorter
line-box, with no centering offset at all, so "Transactions" sat flush at the row's
top while "Source Document" sat a few px lower. Fixed with `min-height:26px` on
BOTH `.pdf-col-head` and `.txn-col-head` (not just the one that looked wrong) -
guarantees the same row height, and therefore the same centered text position, in
EVERY state, including before any file is even loaded (when `.pdf-col-head`'s own
zoom controls aren't rendered yet either, `v-if="previewUrl"` - without this fix on
both sides, the two headings would have realigned differently depending on whether
a document was loaded, not just whether Transactions had actions beside it).
Verified: `npm run build` passes; the `app` container rebuilt, and the served CSS
bundle (hash-matched against the local build) confirmed to contain both new
`min-height:26px` rules. **Not machine-verified:** the actual rendered alignment in
a real browser - Claude-in-Chrome still did not connect (tried a third time) - same
standing limitation as every other UI-only change in this project.
**Governing rule: never silently correct or exclude data.** This shows up in several
concrete places, not just as an abstract principle:

View File

@ -444,8 +444,19 @@ tr.editing td{ background:rgba(37,99,235,.03); }
own padding, taller than .txn-col's own flat height and visibly
mismatched. 102.5vh = the original 82vh increased 25% per request. */
.pdf-col{ flex:0 0 40%; min-width:260px; display:flex; flex-direction:column; height:102.5vh; }
/* min-height:26px (the zoom-control buttons' own height, the tallest
thing that can appear in this row) keeps "Source Document" vertically
centered at the SAME position whether or not those buttons are
present yet (before a file loads, this row would otherwise collapse
to just the h2's own shorter line-box) - and, matched on
.txn-col-head below, is what actually lines "Source Document" up
with "Transactions": that row has nothing BUT its own h2 now (its
actions moved below, see .txn-actions-row), so without an explicit
min-height here too, its line-box-only height would sit a few px
higher than this row's centered text. */
.pdf-col-head{
display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; flex-shrink:0;
display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;
min-height:26px; flex-shrink:0;
}
.pdf-col-head h2{ margin-bottom:0; }
/* Replaces the old native <iframe> viewer - pdf.js renders each page to
@ -571,8 +582,13 @@ tr.editing td{ background:rgba(37,99,235,.03); }
flex:1 1 auto; min-width:260px; display:flex; flex-direction:column; height:102.5vh;
container-type:inline-size; container-name:txncol;
}
/* min-height:26px matches .pdf-col-head's own (see that rule's comment)
- this row holds nothing but its own h2 now, whose line-box alone is
shorter than 26px, so without this it sits a few px ABOVE "Source
Document" (which centers within its own, taller zoom-controls row)
instead of level with it. */
.txn-col-head{
display:flex; align-items:center; margin-bottom:18px; flex-shrink:0;
display:flex; align-items:center; margin-bottom:18px; min-height:26px; flex-shrink:0;
}
.txn-col-head h2{ margin-bottom:0; }
/* Move to project (left) / Flagged only, Next flagged, Hide Source Doc