Size the citation chip icon from the font's point size - #3
Open
curusarn wants to merge 6 commits into
Open
Conversation
Better Stack patches on top of 21893c1: three additive config seams the iOS app needs for web-parity chat rendering. Defaults preserve upstream behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jApPFeZUN7G2g2kWJC4Ur
CitationConfig gains citationImage, an optional (destination) -> MDImage? closure resolved once per attachment and composited ahead of the title, sized to the chip font's cap height and tinted to match the resolved text color in each appearance. Ignored by CitationConfig's Hashable/Equatable (a function value can't be compared), same treatment TextContextMenuItem already gives its own image field. Default nil keeps every existing call site source-compatible.
Citation chips visibly ride high on their line when taller than the line box — the existing font.descender baselineOffset only accounts for the glyph descender space, not a chip's own extra height. Add CitationConfig.citationBaselineAdjustment (points, default 0) applied additively to the existing offset in both call sites (Paragraph+'s buildParagraphContent and TableView's applyTypographyThemingAndGetContent). Default 0 keeps today's behavior byte-identical; hosts opt in per render config to pull a chip back toward the line's vertical center. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…default off) The table tap-to-expand and its copy/download buttons were shown whenever a MarkdownController was attached — which hosts do for context-menu routing, so they couldn't get the menu without the table chrome. Gate both behind a new MarkdownTableTextStyle.showsActionButtons (default false); attaching a listener no longer implies table buttons. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FdgmrPkDKRvT6uu4JzNdNg
[Fable] Table copy/download controls are opt-in (default off)
…eight A cap-height box left the icon at about half the label's height once the glyph's own padding inside its viewbox was subtracted; web draws a text-size icon beside the label. 1.15x the point size (16pt at 13.5pt), still capped by the text's line height. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PjDUZsPjzUx6tcSvCe1cr2
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.
Claude summary
Brief
Implementation changes
InlineCitationAttachment.iconScaleis the one knob; the layout math is unchanged otherwise.03d74ae(the revision the iOS app pins) so the app can pin this commit directly; it also applies cleanly on main.🤖 Generated with Claude Code
https://claude.ai/code/session_01PjDUZsPjzUx6tcSvCe1cr2