Repository navigation
Commit e233cdb
feat: rich-text send-options preview (long-press Send)
Reconnect ChatSendMessageRichTextPreview to the live ChatInputContent so the
long-press-Send options screen renders the message as the InstantPage that will
actually be sent. The preview was passing richTextPreview: nil after the
RichTextEditor migration replaced the markdown-text send path with the structural
ChatInputContent model; the gating now mirrors the real send paths (new message:
ChatControllerNode; edit: ChatControllerLoadDisplayNode) via a file-private
makeRichTextSendPreview helper. Plain / entity-expressible content keeps the
existing flat-text morph.
Morph: the plain-text path morphs a flat-text copy of the live field, which can't
represent rich structure (headings/lists/tables). The rich path instead captures a
pixel snapshot of the live input field (before the screen hard-hides it) and
crossfades it into the InstantPageV2View as the bubble settles, falling back to the
flat-text crossfade if snapshotView returns nil.
Clipping: the extracted page content is clipped to the bubble's inner corner radius
(15pt, matching the real rich bubble's image.defaultCornerRadius) within the
tail-excluded content rect [1, width-7], so images/tables round to the bubble and
stay clear of the outgoing tail.
Documented in docs/richtext-composer.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5a8afc1 commit e233cdb
4 files changed
Lines changed: 91 additions & 10 deletions
File tree
- docs
- submodules
- ChatSendMessageActionUI/Sources
- TelegramUI/Sources/Chat
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
193 | 218 | | |
194 | 219 | | |
195 | 220 | | |
| |||
Lines changed: 46 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
694 | 695 | | |
695 | 696 | | |
696 | 697 | | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
701 | 704 | | |
702 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
703 | 710 | | |
704 | 711 | | |
705 | 712 | | |
| |||
709 | 716 | | |
710 | 717 | | |
711 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
712 | 723 | | |
713 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
714 | 736 | | |
715 | 737 | | |
716 | 738 | | |
| 739 | + | |
| 740 | + | |
717 | 741 | | |
718 | 742 | | |
719 | 743 | | |
| |||
749 | 773 | | |
750 | 774 | | |
751 | 775 | | |
752 | | - | |
753 | 776 | | |
754 | | - | |
755 | 777 | | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
756 | 796 | | |
757 | 797 | | |
758 | 798 | | |
| |||
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
176 | | - | |
| 186 | + | |
| 187 | + | |
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
| |||
288 | 299 | | |
289 | 300 | | |
290 | 301 | | |
291 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
292 | 308 | | |
293 | 309 | | |
294 | 310 | | |
| |||
0 commit comments