Commit d4253b3
authored
Scroll to latest on channel switch instead of remounting the scroller
Keying the provider by channelId re-fired the initial end-scroll but
rebuilt the entire feed subtree (rows, observers, reply polling) on every
switch, making channel changes feel sluggish. Replace the key with a
headless LandAtLatestOnChannelChange component that imperatively calls
scrollToEnd in a layout effect when the channel id changes — same commit
as the swapped rows, before paint, no remount.
Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad11 parent f6f2bb8 commit d4253b3
1 file changed
Lines changed: 21 additions & 5 deletions
Lines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
631 | 650 | | |
632 | 651 | | |
633 | 652 | | |
| |||
716 | 735 | | |
717 | 736 | | |
718 | 737 | | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
| 738 | + | |
| 739 | + | |
724 | 740 | | |
725 | 741 | | |
726 | 742 | | |
| |||
0 commit comments