Repository navigation
Semibold table headers; heading copy button next to the title - #40
Merged
Merged
Conversation
The table view always asked for a semibold header, but the renderer's explicit run fonts won and headers drew regular. TableTextBuilder now raises header runs to semibold (weight only goes up: bold stays bold, italic and monospaced keep their face; a family without semibold falls back to its bold through a descriptor, safe off-main). Attributes only, so search and copy read the same characters, and the measurer lays out the same string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since v1.11 (headings became NSTextView-backed) the hover-to-copy button sat at the column's right edge, far from short headings. It is still an overlay (no HStack sibling of the representable), now offset by the title's widest laid-out line + the 1.10 spacing, clamped to the row: a pure function in BlockLayout.Heading of the same string the title shows, cached per (content version, level, scale, fonts, title, width). Row height and the title's wrap width are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The copy button's offset cache converted the heading string again for every new wrap width, so a live-resize step cost a conversion plus a layout per visible heading. The converted title is now cached once per layout key and only the used width per wrap width: a resize step is one TextKit layout. The key (BlockLayout.Heading.titleLayoutKey) holds only what decides the width - title, level, zoom, document fonts. contentVersion is gone, so a reload, a Source Edit save or a theme switch no longer misses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button now lies on the title's text view, so its I-beam showed over the icon. Re-set the arrow on every move over the button (the text view updates its cursor on mouse moves too). Checked on a build: arrow over the icon, I-beam over the title text, the click still copies the section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
CI gate for local commits on
main;mainwill be fast-forwarded to this branch once CI is green.TableTextBuilder.raiseToHeaderWeight): the table view always asked for it, but the renderer's explicit run fonts won and headers drew regular. Weight only goes up (bold stays bold, italic and monospaced keep their face; a family without semibold falls back to bold through a descriptor, safe off-main). Attributes only, so search and copy are unchanged.BlockLayout.Heading, cached per title/level/scale/fonts and width), arrow cursor over the icon.Local: 756 tests, Release + Release-APPSTORE; reviewed; E2E on a separate build (button position for H1-H6, wrapped heading, zoom; title drag-select; copy click; cursor).