Telegram-iOS/submodules/InstantPageUI/Sources
isaac a731f8bdc0 Implement textDate autoformatter for InstantPage V2 rich bubbles
Render RichText.textDate (API constructor textDate(flags, text, date)) as a
locale/timezone-correct, relative-aware, tappable date inside V2 rich-message
bubbles, reusing the existing stringForEntityFormattedDate autoformatter.

- Model: add RichText.textDate(text📅format:) with Postbox coding,
  FlatBuffers schema (RichText.fbs; flatc regenerates), Equatable and plainText;
  parse flags->DateTimeFormat? at the API boundary (flags==0 => nil, matching
  the messageEntityFormattedDate convention) with a symmetric apiRichText()
  round-trip. The new case is handled in every exhaustive RichText switch
  (SyncCore, ApiUtils, InstantPageTextItem, InstantPageAnchorPath,
  InstantPagePreviewText, BrowserReadability, BrowserMarkdown).
- Render: attributedStringForRichText gains an optional formatDate closure;
  the V2 layout builds it from the message's strings/dateTimeFormat and threads
  it to every text-building call site, formatting the timestamp and tagging the
  run with TelegramTextAttributes.Date.
- Tappable: the Date attribute is added to linkSelectionRects hit-testing and
  mapped in the rich bubble's entityTapContent to the existing .date tap action
  (opens the date context menu).
- Live update: the V2 layout accumulates a page-wide formattedDateUpdatePeriod
  (>=10s) for relative dates; the rich bubble schedules a refresh timer on it,
  recreating it only when the period changes. The currentPageLayout cache is
  bypassed for relative-date pages so the timer-driven relayout actually
  re-formats the date.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:45:48 +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 Implement textDate autoformatter for InstantPage V2 rich bubbles 2026-06-04 13:45:48 +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 Various settings UI improvements 2021-10-25 19:16:03 +04:00
InstantPageSettingsButtonItemNode.swift
InstantPageSettingsFontFamilyItemNode.swift
InstantPageSettingsFontSizeItemNode.swift Various settings UI improvements 2021-10-25 19:16:03 +04:00
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 Implement textDate autoformatter for InstantPage V2 rich bubbles 2026-06-04 13:45:48 +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 Implement textDate autoformatter for InstantPage V2 rich bubbles 2026-06-04 13:45:48 +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 Refactor SyncCore back into TelegramCore 2021-07-21 21:43:20 +02:00