Commit graph

31 commits

Author SHA1 Message Date
isaac
1872832e28 Improve InstantPage V2 layout: true font-height line boxes + code-block style
- layoutTextItem now sizes a text item to the true font line height (A + D)
  instead of the cap box: the line stack starts at lineBoxTopInset (the
  ascender headroom, max(0, fontAscent - fontLineHeight)) and the returned
  height is padded by the last line's descender. Inter-line advance is
  unchanged and per-line frames stay the cap box, so the baseline draw,
  decorations, reveal mask, and inline attachments translate consistently;
  the page grows.
- Size inline custom emoji to ~the font line height
  (font.ascender - font.descender + 4*pointSize/17) so they fit the taller
  line box instead of overflowing it; the line is not inflated.
- Add a dedicated code-block text style for rich messages (monospace font +
  codeBlock theme attribute) threaded through the rich-data bubble and send
  preview; unify the bubble code-block/separator colors.
- Adjust inter-block spacings and assorted V2 layout/divider details.
- Document the true-font-height box and emoji sizing in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:33:01 +02:00
isaac
e8de87dc7b InstantPage V2: render server-sent thinking blocks
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 18:47:03 +02:00
isaac
28763bb92d InstantPage blockQuote: nested-blocks payload
Upgrade InstantPageBlock.blockQuote from (text, caption) to
(blocks: [InstantPageBlock], caption). Legacy inbound shapes (API
pageBlockBlockquote, Postbox "t", FlatBuffers text) lift into
[.paragraph(text)]; outbound stays on the legacy wire constructor for
empty/single-paragraph quotes and uses pageBlockBlockquoteBlocks
otherwise. V1/V2 renderers recurse into child blocks with a fixed 10pt
inter-child gap; markdown forward/reverse, entity-expressibility, and
preview text updated. pullQuote is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 01:00:47 +02:00
isaac
81e3be1923 InstantPage list checkboxes (task-list style): parse, serialize, render
Add a first-class `checked: Bool?` to InstantPageListItem (orthogonal to the
ordered-list `num`), replacing the prior sentinel-string-in-num prototype.

- Data model: enum third associated value on .text/.blocks; Postbox + a new
  FlatBuffers `checkState` tri-state field (0=nil,1=unchecked,2=checked,
  backward-compatible); Equatable.
- Transmission: read/write the native API `checkbox`=flags.0 / `checked`=flags.1
  bits on all four PageListItem / PageListOrderedItem constructors, so checkbox
  state survives the server round-trip for sender and recipients.
- Markdown: forward parser routes detected `[ ]`/`[x]` into `checked` (keeping
  the real number for ordered items); reverse converter emits `- [ ]`/`- [x]`
  so editing a rich message round-trips.
- Display: V1 + V2 layout detect via `item.checked`; the V2 renderer draws real
  CheckNode artwork (was a placeholder); preview text shows a checkbox glyph
  instead of leaking the old sentinel.

Spec: docs/superpowers/specs/2026-05-27-instantpage-list-checkbox-design.md
Plan: docs/superpowers/plans/2026-05-27-instantpage-list-checkbox.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 16:44:47 +02:00
isaac
13a153aff2 WIP 2026-05-20 00:33:08 +08:00
isaac
fdb2f369ec Rich bubble: scrollToAnchor + getAnchorRect
Adds a base getAnchorRect on ChatMessageBubbleContentNode, the rich-bubble
override (including titleHeight in details recursion), bubble-item
forwarding to content nodes, ChatControllerInteraction.scrollToMessageIdWithAnchor,
and a scrollToAnchor that lands the anchor at the top of the content area /
its line. Threads anchor/scroll params through ChatController and related
call sites.
2026-05-02 00:36:34 +02:00
isaac
d83734eb46 Various improvements 2026-04-28 19:00:04 +04:00
Ilya Laktyushin
d574182374 Markdown improvements 2026-04-27 18:45:30 +02:00
Ilya Laktyushin
9c15b8c27d Various improvements 2026-04-25 17:32:26 +02:00
Ilya Laktyushin
f41630083a Various improvements 2026-04-24 03:16:14 +02:00
Isaac
1fb93ab298 Various improvements 2025-02-25 14:46:07 +00:00
Ilya Laktyushin
2a7d1938d7 Various improvements 2025-01-28 21:57:30 +04:00
Ilya Laktyushin
5978a5278d Local instant view 2024-08-29 11:44:05 +04:00
Ilya Laktyushin
5470ba80ec Various improvements 2024-06-07 09:51:45 +04:00
Ali
af8474aca5 [WIP] Quotes and link previews 2023-10-18 01:11:23 +04:00
Ali
a753d71cd7 [WIP] Quotes 2023-10-13 15:24:53 +04:00
Ali
ceda80c3a5 [WIP] Stories 2023-06-13 14:18:16 +03:00
Ali
6a548e11a6 Refactoring [skip ci] 2023-04-19 23:47:38 +04:00
Ilya Laktyushin
6a3f3cf8c1 Make instant view classes public for browser ui integration 2023-03-17 23:56:15 +04:00
Ali
614c74b0b0 [WIP] Modern cache 2022-12-17 00:17:31 +04:00
Ali
2d66131682 Refactoring 2021-08-04 01:30:57 +02:00
Ali
1a04fb4408 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00
Ali
7bed1728bb Refactor string generation 2021-07-20 11:57:50 +02:00
Ilya Laktyushin
e00eeec6ae Update API 2020-10-23 00:55:07 +04:00
Ilya Laktyushin
f2ad10b937 Update API 2020-10-15 23:06:09 +04:00
Ilya Laktyushin
2de452f166 Instant View: add webpage preview file in media map 2020-08-30 00:02:48 +03:00
Ilya Laktyushin
e27d764dae Update themes 2019-12-24 23:03:40 +03:00
Ali
a66f13d969 Support PixelDimensions 2019-11-03 00:44:55 +04:00
Peter
10692a323e Refactor SyncCore 2019-10-21 16:58:00 +04:00
Ilya Laktyushin
01e5c3db3c Cloud themes improvements 2019-08-27 21:16:45 +03:00
Peter
f151d907d2 Refactor InstantPageUI and related modules 2019-08-12 21:15:45 +03:00
Renamed from submodules/TelegramUI/TelegramUI/InstantPageLayout.swift (Browse further)