mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
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> |
||
|---|---|---|
| .. | ||
| InstantImageGalleryItem.swift | ||
| InstantPageAnchorItem.swift | ||
| InstantPageAnchorPath.swift | ||
| InstantPageArticleItem.swift | ||
| InstantPageArticleNode.swift | ||
| InstantPageAudioItem.swift | ||
| InstantPageAudioNode.swift | ||
| InstantPageChecklistMarkerItem.swift | ||
| InstantPageContentNode.swift | ||
| InstantPageController.swift | ||
| InstantPageControllerNode.swift | ||
| InstantPageDetailsItem.swift | ||
| InstantPageDetailsNode.swift | ||
| InstantPageExternalMediaResource.swift | ||
| InstantPageFeedbackItem.swift | ||
| InstantPageFeedbackNode.swift | ||
| InstantPageFormulaItem.swift | ||
| InstantPageGalleryController.swift | ||
| InstantPageGalleryFooterContentNode.swift | ||
| InstantPageImageItem.swift | ||
| InstantPageImageNode.swift | ||
| InstantPageItem.swift | ||
| InstantPageLayout.swift | ||
| InstantPageLayoutSpacings.swift | ||
| InstantPageLinkSelectionView.swift | ||
| InstantPageMath.swift | ||
| InstantPageMedia.swift | ||
| InstantPageMediaOpen.swift | ||
| InstantPageMediaPlaylist.swift | ||
| InstantPageMultiTextAdapter.swift | ||
| InstantPageNavigationBar.swift | ||
| InstantPageNode.swift | ||
| InstantPagePeerReferenceItem.swift | ||
| InstantPagePeerReferenceNode.swift | ||
| InstantPagePlayableVideoItem.swift | ||
| InstantPagePlayableVideoNode.swift | ||
| InstantPageReferenceController.swift | ||
| InstantPageReferenceControllerNode.swift | ||
| InstantPageRenderer.swift | ||
| InstantPageScrollableNode.swift | ||
| InstantPageSettingsBacklightItemNode.swift | ||
| InstantPageSettingsButtonItemNode.swift | ||
| InstantPageSettingsFontFamilyItemNode.swift | ||
| InstantPageSettingsFontSizeItemNode.swift | ||
| InstantPageSettingsItemNode.swift | ||
| InstantPageSettingsItemTheme.swift | ||
| InstantPageSettingsNode.swift | ||
| InstantPageSettingsSwitchItemNode.swift | ||
| InstantPageSettingsThemeItemNode.swift | ||
| InstantPageShapeItem.swift | ||
| InstantPageSlideshowItem.swift | ||
| InstantPageSlideshowItemNode.swift | ||
| InstantPageStoredState.swift | ||
| InstantPageSubContentNode.swift | ||
| InstantPageTableItem.swift | ||
| InstantPageTextItem.swift | ||
| InstantPageTextSelectionNode.swift | ||
| InstantPageTextStyleStack.swift | ||
| InstantPageTheme.swift | ||
| InstantPageTile.swift | ||
| InstantPageTileNode.swift | ||
| InstantPageV2AudioContentNode.swift | ||
| InstantPageV2InlineImageView.swift | ||
| InstantPageV2Layout.swift | ||
| InstantPageV2MediaViews.swift | ||
| InstantPageV2RevealCost.swift | ||
| InstantPageV2SlideshowView.swift | ||
| InstantPageWebEmbedItem.swift | ||
| InstantPageWebEmbedNode.swift | ||