Repository navigation
Commit 61c89e9
Chat: a bot's keyboard fills its height unless it asks to fit its rows, says its placeholder in the field, shows a selective one to whom it is for, and is answered in a group as a reply
Four things the official clients do with a bot's reply keyboard that tweb did not, and a bug of the tab's mirror
found on the way.
- Height: a keyboard that does not ask to be sized by its rows (no `resize`, most bots') is as tall as it may be -
the same 15rem, less on a short screen - its rows sharing that height and its buttons filling their row
(`.is-stretched`; desktop's `_maximizeSize`, iOS and Android make it the device keyboard's height). Rows that need
more are their own height and scroll as before; one with `resize` is sized by its rows as before.
- Placeholder: the markup's `placeholder` (a keyboard's or a force reply's) stands in the empty field instead of its
own words while the keyboard is open, or while the field answers the message that brought it (Android's rule).
The field's own wait under it in the IntlElement (`ChatInput.updateKeyboardPlaceholder`), and come back once it
goes or a language is applied over it. Not while a message is edited, and not where the field says more than that
it asks for a message (`yieldsToKeyboard`): it cannot send, a welcome template, an instruction, a story reply, or a
paid message's price, which is said before it is sent (Android). The bot's words go in their own direction.
- Selective: a markup that is `selective` applies to those its message is `mentioned` for - mentioned, or the
author of the message it answers (desktop's `mentionsMe`, Android's). Before, every one was dropped.
- A button pressed in a group sends its text as a reply to the keyboard's message, as desktop and Android do: a bot
in privacy mode is told only of what is meant for it. The field's own reply stays for the next message; a private
chat and an ephemeral keyboard are as they were.
- The tab's mirror of a history storage (`apiManagerProxy`) wrote the worker's value with a store setter, which merges
an object into the one there: a force reply after a keyboard kept the keyboard's rows and opened as that keyboard,
and a keyboard with no placeholder kept the one before's. An object now takes the place of the one there.
- Tests: the keyboard spec checks the stretched rows, the placeholder of a keyboard and of a force reply, and a
markup handed over by the mirror in place of another; its helper writes `resize` by default and replaces the
markup as the mirror now does. Unit tests for selective markups and the press in a group.
Left out on purpose: iOS closing the keyboard on a tap in the history (Android and desktop do not), and iOS putting
the reply into the field as a group's keyboard comes (desktop's reply on the press instead).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 182e6e9 commit 61c89e9
10 files changed
Lines changed: 318 additions & 43 deletions
File tree
- e2e
- src
- components
- chat
- wrappers
- lib
- appManagers
- scss/partials
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 373 | + | |
| 374 | + | |
392 | 375 | | |
393 | 376 | | |
394 | 377 | | |
| |||
602 | 585 | | |
603 | 586 | | |
604 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
605 | 692 | | |
606 | 693 | | |
607 | 694 | | |
| |||
642 | 729 | | |
643 | 730 | | |
644 | 731 | | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
645 | 736 | | |
646 | 737 | | |
647 | 738 | | |
| |||
653 | 744 | | |
654 | 745 | | |
655 | 746 | | |
656 | | - | |
| 747 | + | |
657 | 748 | | |
658 | 749 | | |
659 | 750 | | |
| |||
668 | 759 | | |
669 | 760 | | |
670 | 761 | | |
| 762 | + | |
| 763 | + | |
671 | 764 | | |
672 | 765 | | |
673 | | - | |
| 766 | + | |
| 767 | + | |
674 | 768 | | |
675 | 769 | | |
676 | 770 | | |
| |||
686 | 780 | | |
687 | 781 | | |
688 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
689 | 805 | | |
690 | 806 | | |
691 | 807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
644 | 648 | | |
645 | 649 | | |
646 | 650 | | |
| |||
1164 | 1168 | | |
1165 | 1169 | | |
1166 | 1170 | | |
| 1171 | + | |
1167 | 1172 | | |
1168 | 1173 | | |
1169 | 1174 | | |
1170 | 1175 | | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
1171 | 1181 | | |
1172 | 1182 | | |
1173 | 1183 | | |
| |||
3480 | 3490 | | |
3481 | 3491 | | |
3482 | 3492 | | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
3483 | 3497 | | |
3484 | 3498 | | |
3485 | 3499 | | |
3486 | 3500 | | |
3487 | 3501 | | |
3488 | 3502 | | |
| 3503 | + | |
3489 | 3504 | | |
3490 | 3505 | | |
3491 | 3506 | | |
3492 | 3507 | | |
3493 | 3508 | | |
| 3509 | + | |
3494 | 3510 | | |
3495 | 3511 | | |
3496 | 3512 | | |
| |||
3504 | 3520 | | |
3505 | 3521 | | |
3506 | 3522 | | |
| 3523 | + | |
3507 | 3524 | | |
3508 | 3525 | | |
3509 | 3526 | | |
| |||
3525 | 3542 | | |
3526 | 3543 | | |
3527 | 3544 | | |
| 3545 | + | |
| 3546 | + | |
3528 | 3547 | | |
3529 | 3548 | | |
3530 | 3549 | | |
| |||
3534 | 3553 | | |
3535 | 3554 | | |
3536 | 3555 | | |
| 3556 | + | |
3537 | 3557 | | |
3538 | 3558 | | |
3539 | | - | |
| 3559 | + | |
3540 | 3560 | | |
3541 | 3561 | | |
3542 | | - | |
3543 | | - | |
3544 | | - | |
3545 | | - | |
3546 | | - | |
| 3562 | + | |
3547 | 3563 | | |
3548 | 3564 | | |
3549 | | - | |
| 3565 | + | |
| 3566 | + | |
3550 | 3567 | | |
3551 | 3568 | | |
3552 | 3569 | | |
| |||
3557 | 3574 | | |
3558 | 3575 | | |
3559 | 3576 | | |
3560 | | - | |
3561 | | - | |
| 3577 | + | |
| 3578 | + | |
3562 | 3579 | | |
3563 | 3580 | | |
3564 | 3581 | | |
3565 | 3582 | | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
3566 | 3618 | | |
3567 | 3619 | | |
3568 | 3620 | | |
| |||
5706 | 5758 | | |
5707 | 5759 | | |
5708 | 5760 | | |
| 5761 | + | |
5709 | 5762 | | |
5710 | 5763 | | |
5711 | 5764 | | |
| |||
6092 | 6145 | | |
6093 | 6146 | | |
6094 | 6147 | | |
| 6148 | + | |
6095 | 6149 | | |
6096 | 6150 | | |
6097 | 6151 | | |
| |||
6130 | 6184 | | |
6131 | 6185 | | |
6132 | 6186 | | |
| 6187 | + | |
6133 | 6188 | | |
6134 | 6189 | | |
6135 | 6190 | | |
| |||
0 commit comments