Commit graph

1426 commits

Author SHA1 Message Date
83f209e44a chore: bump version to 1.2 2026-06-30 15:01:22 +03:00
PAVEL IVANOV
f6bb33d193 chore: prepare wintergram 1.1 release 2026-06-15 21:46:25 -07:00
Ilya Laktyushin
e0f4655cc5 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-05-29 09:24:16 +02:00
Ilya Laktyushin
3e6363abf9 Various improvements 2026-05-28 16:50:05 +02:00
isaac
8dbbf0f715 Rich-bubble text selection (post-V2 fix)
Design and plan, then implementation: include the details title in
selectableTextItems, restore V2 text selection in the rich bubble,
drop the InstantPageMultiTextAdapter init parameter-name split, and
split LinkHighlightingNode modern-path groups on disjoint rects.
Also includes the IP V2 inline-formula baseline alignment design doc.
2026-05-20 00:33:47 +08:00
isaac
b1aab0839c LinkHighlightingNode: ceil instead of floor for stair-step radii
drawRectsImageContent's modern path computed nextRadius and
prevRadius as min(outerRadius, floor(|Δx| * 0.5)). When |Δx| < 2
the floor produces 0 and the addArc call becomes a no-op,
leaving an unsmoothed corner at the stair-step. Replace floor
with ceil so any non-zero edge mismatch rounds up to at least
1 px. Exact-equality cases (Δx == 0) are unaffected — they take
the else branch with a straight addLine.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 11:46:38 +02:00
isaac
d1c5d66bd3 LinkHighlightingNode: fix X-edge snap unreachable after midY snap
In drawRectsImageContent's modern path the snap loop runs midY
trimming first, leaving rects[i].maxY == rects[i+1].minY for
adjacent line rects. The X-edge snap guard then evaluated
rects[i].insetBy(dx: 0.0, dy: 1.0).intersects(rects[i+1]) — but
positive dy shrinks the rect, so after the trim the guarded
rectangle no longer intersects its neighbor (CGRect.intersects
requires positive-area overlap). Flip dy to -1.0 so the temp
rect grows and touching neighbors satisfy the guard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 11:44:05 +02: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
999aac6eb3 ListView: cap pin-to-edge item visible portion at half area
When a pinToEdgeWithInset item is taller than half of the visible
area (visibleSize.height - insets.top - insets.bottom), cap its
visible portion at halfArea. The remaining height extends past
visibleSize - insets.bottom into the bottom-inset region (occluded
by overlay UI like the chat input panel).

A new private helper `pinToEdgeBottomExtension(forPinnedHeight:)`
returns max(0, pinnedHeight - halfArea). Three sites consume it:
- calculatePinToEdgeTopInset caps the pinned item's contribution
  to totalAboveAndPinned via `pinnedHeight - extension`.
- replayOperations isPinToEdgeTarget anchors the pinned item's
  apparent maxY at visibleSize - insets.bottom + extension.
- isStrictlyScrolledToPinToEdgeItem matches the new anchor.

Both isPinToEdgeTarget and isStrictlyScrolledToPinToEdgeItem fire
when either calculatePinToEdgeTopInset() > 0 OR extension > 0, so
the cap also applies when items above the pinned item overflow
the visible area (in which case calculatePinToEdgeTopInset returns
0 but extension is still positive).

When the pinned item fits within halfArea, extension == 0 and
behavior is identical to before this change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 00:36:33 +02:00
isaac
f25d0776c7 Visual improvements 2026-05-02 00:36:33 +02:00
isaac
266b1c5941 Fix ListViewProtocol 2026-04-30 14:43:41 +04:00
isaac
7ef7f16727 Improve animations 2026-04-30 12:56:55 +04:00
isaac
1c27b2c426 Animation and cleanup 2026-04-29 23:35:19 +04:00
Ilya Laktyushin
d574182374 Markdown improvements 2026-04-27 18:45:30 +02:00
isaac
e9d958809a Fix 2026-04-26 02:46:44 +04:00
isaac
68a95f53f2 Various improvements 2026-04-24 23:21:05 +04:00
isaac
524c29cbe3 Various improvements 2026-04-22 00:32:34 +04:00
isaac
a053909b87 Fix crash 2026-04-20 21:06:20 +02:00
Isaac
8edaa79eda Merge commit '23c4d94748' 2026-04-19 23:54:22 +02:00
Isaac
791bb62148 Display/ListView: snap-scroll to pinned item + synchronous history transactions
Adds an experimentalSnapScrollToPinnedItem path that resnaps scroll to
the first pinToEdgeWithInset item after inset/visible-size updates and
on empty itemNodes. Promotes ListViewItem to AnyObject and adds a
pinToEdgeWithInset protocol requirement with a default of false.

Also runs chat history transactions synchronously when updating scroll
around correlated messages, and tightens beganInteractiveDragging weak-
self handling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:45:18 +02:00
Isaac
4bd54b9771 Display/ListView: pin first pinToEdgeWithInset item to bottom edge
Introduces a pin-to-edge mode for list items: items whose
pinToEdgeWithInset flag is true are pinned to the bottom edge of the
visible area, with the list geometry (pin inset, scrollToItem,
inset-transition offsetFix, visible-size updates) adjusted to handle
this new mode consistently.

Collected from spec, plan, and 12 iterative fixes during
implementation that refined pin-inset helpers, scroll landings, and
transition math. Pin-inset computation uses frame.size.height;
scrollToItem lands on the item's pinned position via apparentBounds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:45:13 +02:00
Ilya Laktyushin
c9b76c9294 Various fixes 2026-04-19 14:17:48 +02:00
Ilya Laktyushin
8f1e024aef Various fixes 2026-04-15 23:12:53 +02:00
Isaac
976c2de599 Temp 2026-04-14 15:33:19 +02:00
Isaac
430ea53ed8 Add per-character glyph rects to InteractiveTextNodeLine and implement reveal animation
- Replace characterToGlyphMapping with characterRects ([CGRect]?) on InteractiveTextNodeLine
- Add computeCharacterRects flag to InteractiveTextNodeLayoutArguments
- Compute actual glyph bounding boxes via CTFontGetBoundingRectsForGlyphs during layout
- Implement computeRevealedLines, layoutForCharacterCount, sizeForCharacterCount
- Implement updateRevealCharacterCount to distribute character budget across content item layers
- Update snippet layers to animate per-character rects with SnippetLayer tracking character index
- Mask limit driven by lowest animating snippet index for correct reveal ordering
- Fix listViewAnimationCurveEaseIn to match iOS default ease-in curve (0.42, 0.0, 1.0, 1.0)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 15:31:49 +02:00
Isaac
d575824ab4 Various improvements 2026-04-10 14:30:23 +02:00
Isaac
d89a4a79cf Various improvements 2026-04-07 16:48:11 +02:00
Isaac
34477605b1 Various improvements 2026-03-31 20:24:24 +08:00
Isaac
fe791128d6 Various improvements 2026-03-27 00:46:53 +08:00
Isaac
93bf472472 Text selection 2026-03-24 22:51:44 +08:00
Isaac
bc7858ad2b AI editing 2026-03-20 18:23:45 +01:00
Isaac
a2d5c530a5 Various improvements 2026-03-18 00:27:13 +01:00
Isaac
72fbe5d7a7 Various improvements 2026-03-13 14:54:44 +01:00
Isaac
18201ca830 Refactor 2026-03-10 08:54:43 +01:00
Isaac
9a4327116d Refactor 2026-03-10 00:38:36 +01:00
Isaac
bb23c6f653 Various improvements 2026-03-06 18:13:48 +01:00
Ilya Laktyushin
d9d1210c1d Various improvements 2026-02-19 21:53:26 +04:00
Isaac
26cc304ca0 Fix bg 2026-02-17 10:19:02 +04:00
Isaac
157a7a978d Glass 2026-02-13 17:08:48 +04:00
Isaac
2a317d87d2 Upgrade SpaceWarpNode 2026-02-13 12:23:53 +04:00
Isaac
dde740bfe8 Various improvements 2026-02-11 22:04:54 +04:00
Isaac
1bb139ff32 Various improvements 2026-02-03 20:17:44 +08:00
Ilya Laktyushin
226200c8c9 Various improvements 2026-02-02 04:11:51 +04:00
Ilya Laktyushin
8be8491b84 Various improvements 2026-01-26 02:16:22 +04:00
Ilya Laktyushin
0d12dd29ad Various improvements 2026-01-25 22:17:49 +04:00
Isaac
ca6fdc1629 Glass 2026-01-25 00:31:18 +08:00
Isaac
6ad2622b30 Various updates 2026-01-24 00:35:42 +08:00
Isaac
2db08cde89 Glass 2026-01-13 19:21:49 +04:00
Isaac
0f5a019f04 Glass updates 2026-01-11 21:01:45 +04:00
Isaac
4e45d5f27c Built time 2025-12-30 15:16:10 +08:00