Telegram-iOS/submodules/InstantPageUI/Sources
isaac a81d0ee944 Anchor navigation in InstantPage V2 / rich-content bubbles
Tapping an intra-message #fragment link in a rich-data bubble now scrolls
the chat so the matching anchor lands just below the content-area top,
expanding any enclosing collapsed <details> first. Anchors come from
server/AI-sent InstantPages (block .anchor or inline RichText.anchor); the
compose path is unchanged.

- InstantPageV2View.anchorFrame(name:) resolves an anchor's frame in the
  live layout (text/codeBlock/thinking/details/table), mirroring findTextItem.
- instantPageAnchorPath(in:name:) is a pure model walk returning the
  <details>-sibling-ordinal path to an anchor; its recursion set matches
  exactly the containers the V2 layout flattens through layoutBlock
  (.blockQuote/.cover/.list .blocks), keeping ordinals consistent with the
  layout's detailsIndexCounter.
- InstantPageV2View.firstCollapsedDetails(forOrdinalPath:) maps that path to
  the first not-yet-expanded details' live index (read, never reproduced).
- The rich bubble fills the two stubbed seams: getAnchorRect, and a
  fragment-link route in tapActionAtPoint that drives a resolve -> expand ->
  scroll state machine (pendingScrollAnchor + progress guard + a
  post-relayout hook). Taps are gated off while the message streams.

Verified by the full Bazel build; runtime behavior not yet exercised.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 01:11:27 +02:00
..
InstantImageGalleryItem.swift InstantPageUI: fix photo gallery open transition flying off-screen 2026-06-02 14:23:28 +02:00
InstantPageAnchorItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageAnchorPath.swift Anchor navigation in InstantPage V2 / rich-content bubbles 2026-06-04 01:11:27 +02:00
InstantPageArticleItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageArticleNode.swift Refactoring [skip ci] 2023-04-19 23:47:38 +04:00
InstantPageAudioItem.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageAudioNode.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageChecklistMarkerItem.swift Various improvements 2026-04-25 17:32:26 +02:00
InstantPageContentNode.swift Various improvements 2026-04-22 23:03:51 +02:00
InstantPageController.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
InstantPageControllerNode.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageDetailsItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageDetailsNode.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageExternalMediaResource.swift Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
InstantPageFeedbackItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageFeedbackNode.swift Temp 2024-11-27 17:37:21 +04:00
InstantPageFormulaItem.swift Markdown improvements 2026-04-27 18:45:30 +02:00
InstantPageGalleryController.swift Postbox refactor waves 138–276: 168-commit squash 2026-05-05 00:44:27 +02:00
InstantPageGalleryFooterContentNode.swift Postbox -> TelegramEngine wave 6: unused import Postbox batch sweep 2026-04-19 23:46:13 +02:00
InstantPageImageItem.swift InstantPage V2: media rendering (image / video / map / cover) 2026-05-20 00:33:28 +08:00
InstantPageImageNode.swift InstantPage V2: media rendering (image / video / map / cover) 2026-05-20 00:33:28 +08:00
InstantPageItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageLayout.swift Improve InstantPage V2 layout: true font-height line boxes + code-block style 2026-06-01 17:33:01 +02:00
InstantPageLayoutSpacings.swift Update layout 2026-06-02 17:49:01 +02:00
InstantPageLinkSelectionView.swift
InstantPageMath.swift InstantPage V2: formula display 2026-05-20 00:33:18 +08:00
InstantPageMedia.swift Various improvements 2026-04-22 23:03:51 +02:00
InstantPageMediaOpen.swift InstantPage V2: media rendering (image / video / map / cover) 2026-05-20 00:33:28 +08:00
InstantPageMediaPlaylist.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageMultiTextAdapter.swift Custom emoji in markdown rich messages (send + round-trip) 2026-05-31 17:51:37 +02:00
InstantPageNavigationBar.swift Accessibility improvements 2023-02-06 19:58:06 +04:00
InstantPageNode.swift Various improvements 2026-04-22 23:03:51 +02:00
InstantPagePeerReferenceItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPagePeerReferenceNode.swift Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
InstantPagePlayableVideoItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPagePlayableVideoNode.swift Postbox -> TelegramEngine waves 46-93 (squashed) 2026-04-25 20:48:15 +04:00
InstantPageReferenceController.swift Various improvements 2025-02-25 14:46:07 +00:00
InstantPageReferenceControllerNode.swift Various improvements 2026-05-28 16:50:05 +02:00
InstantPageRenderer.swift Anchor navigation in InstantPage V2 / rich-content bubbles 2026-06-04 01:11:27 +02:00
InstantPageScrollableNode.swift Web app improvements 2024-07-02 21:03:22 +04:00
InstantPageSettingsBacklightItemNode.swift
InstantPageSettingsButtonItemNode.swift
InstantPageSettingsFontFamilyItemNode.swift
InstantPageSettingsFontSizeItemNode.swift
InstantPageSettingsItemNode.swift
InstantPageSettingsItemTheme.swift Temp 2025-09-12 10:54:22 +02:00
InstantPageSettingsNode.swift Refactoring [skip ci] 2023-04-19 23:47:38 +04:00
InstantPageSettingsSwitchItemNode.swift
InstantPageSettingsThemeItemNode.swift Temp 2025-09-12 10:54:22 +02:00
InstantPageShapeItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageSlideshowItem.swift Various improvements 2026-04-22 23:03:51 +02:00
InstantPageSlideshowItemNode.swift Various improvements 2026-04-22 23:03:51 +02:00
InstantPageStoredState.swift Refactoring [skip ci] 2023-04-19 23:47:38 +04:00
InstantPageSubContentNode.swift Various improvements 2026-04-22 23:03:51 +02:00
InstantPageTableItem.swift InstantPage tables: stroke all borders in one path 2026-05-02 10:58:18 +02:00
InstantPageTextItem.swift Improve InstantPage V2 layout: true font-height line boxes + code-block style 2026-06-01 17:33:01 +02:00
InstantPageTextSelectionNode.swift Context menu pagination 2023-10-24 12:59:28 +04:00
InstantPageTextStyleStack.swift Rich bubble: scrollToAnchor + getAnchorRect 2026-05-02 00:36:34 +02:00
InstantPageTheme.swift Improve InstantPage V2 layout: true font-height line boxes + code-block style 2026-06-01 17:33:01 +02:00
InstantPageTile.swift Make instant view classes public for browser ui integration 2023-03-17 23:56:15 +04:00
InstantPageTileNode.swift Various improvements 2026-04-28 19:00:04 +04:00
InstantPageV2AudioContentNode.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageV2InlineImageView.swift InstantPage V2: render inline RichText images 2026-05-28 14:21:25 +02:00
InstantPageV2Layout.swift Update layout 2026-06-02 17:49:01 +02:00
InstantPageV2MediaViews.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageV2RevealCost.swift InstantPage V2: audio/music rendering, playback, and file-bubble styling 2026-06-02 17:44:45 +02:00
InstantPageV2SlideshowView.swift InstantPage V2: render collage & slideshow blocks 2026-06-02 13:50:40 +02:00
InstantPageWebEmbedItem.swift Local instant view 2024-08-29 11:44:05 +04:00
InstantPageWebEmbedNode.swift