Commit fca651b
committed
msglist: Split into back-to-back slivers
Thanks to all the preparatory changes we've made in this commit
series and those that came before it, this change should have only
subtle effects on user-visible behavior.
This therefore serves as a testing ground for all the ways that the
message list's scrolling behavior can become more complicated when
two (nontrivial) slivers are involved. If we find a situation where
the behavior does change noticeably (beyond what's described below),
that will be something to investigate and fix.
In particular:
* The sticky headers should behave exactly as they did before,
even when the sliver boundary lies under the sticky header,
thanks to several previous commit series.
* On first loading a given message list, it should start out
scrolled to the end, just as before.
* When already scrolled to the end, the message list should stay
there when a new message arrives, or a message is edited, etc.,
even if the (new) latest message is taller than it was.
This commit adds a test to confirm that.
Subtle differences include:
* When scrolled up from the bottom and a new message comes in,
the behavior is slightly different from before. The current
exact behavior is something we probably want to change anyway,
and I think the new behavior isn't particularly better or worse.
* The behavior upon overscroll might be slightly different;
I'm not sure.
* When a new message arrives, the previously-latest message gets a
fresh element in the tree, and any UI state on it is lost. This
happens because it moves between one sliver-list and the other,
and the `findChildIndexCallback` mechanism only works within a
single sliver-list.
This causes a couple of visible glitches, but they seem tolerable.
This will also naturally get fixed in the next PR or two toward
#82: we'll start adding new messages to the bottom sliver, rather
than having them push anything from the bottom to the top sliver.
Known symptoms of this are:
* When the user has just marked messages as read and a new message
arrives while the unread markers are fading, the marker on the
previously-latest message will (if it was present) abruptly
vanish while the others smoothly continue fading.
We have a test for the smooth fading, and it happened to test
the latest message, so this commit adjusts the test to avoid
triggering this issue.
* If the user had a spoiler expanded on the previously-latest
message, it will reset to collapsed.1 parent 271c55e commit fca651b
File tree
2 files changed
+95
-18
lines changed- lib/widgets
- test/widgets
2 files changed
+95
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
584 | 583 | | |
585 | 584 | | |
586 | 585 | | |
587 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
588 | 597 | | |
589 | 598 | | |
590 | 599 | | |
| |||
606 | 615 | | |
607 | 616 | | |
608 | 617 | | |
609 | | - | |
| 618 | + | |
| 619 | + | |
610 | 620 | | |
611 | 621 | | |
612 | | - | |
| 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 | + | |
613 | 661 | | |
614 | 662 | | |
615 | 663 | | |
616 | | - | |
| 664 | + | |
617 | 665 | | |
618 | | - | |
| 666 | + | |
619 | 667 | | |
620 | | - | |
| 668 | + | |
621 | 669 | | |
622 | | - | |
| 670 | + | |
623 | 671 | | |
624 | 672 | | |
625 | 673 | | |
626 | 674 | | |
627 | 675 | | |
628 | 676 | | |
629 | 677 | | |
630 | | - | |
| 678 | + | |
631 | 679 | | |
632 | 680 | | |
633 | 681 | | |
| |||
643 | 691 | | |
644 | 692 | | |
645 | 693 | | |
646 | | - | |
| 694 | + | |
647 | 695 | | |
648 | 696 | | |
649 | 697 | | |
650 | 698 | | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
| 699 | + | |
| 700 | + | |
657 | 701 | | |
658 | 702 | | |
659 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
456 | 481 | | |
457 | 482 | | |
458 | 483 | | |
| |||
1490 | 1515 | | |
1491 | 1516 | | |
1492 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1493 | 1524 | | |
1494 | | - | |
| 1525 | + | |
| 1526 | + | |
1495 | 1527 | | |
1496 | 1528 | | |
1497 | 1529 | | |
| |||
1515 | 1547 | | |
1516 | 1548 | | |
1517 | 1549 | | |
| 1550 | + | |
1518 | 1551 | | |
1519 | 1552 | | |
1520 | 1553 | | |
1521 | | - | |
| 1554 | + | |
1522 | 1555 | | |
1523 | 1556 | | |
1524 | 1557 | | |
| |||
0 commit comments