mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-23 00:53:38 +02:00
Scroll just-submitted comment to viewport top with bottom spacer
After a reply is sent, find the new user message via its anchorId and scrollIntoView with block:start so the submitted comment lands at the top of the viewport — giving space below to watch the response stream in. Also render a 40dvh spacer below the thread so that scroll is available even right after posting. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
e7ef2a3903
commit
b0dde400a6
2 files changed
-3
No files matched your search
@@ -881,8 +881,6 @@ describe("IssueChatThread", () => {
|
||||
|
||||
const spacer = container.querySelector('[data-testid="issue-chat-bottom-spacer"]');
|
||||
expect(spacer).toBeNull();
|
||||
=======
|
||||
>>>>>>> Tune floating reply composer padding, offset, and initial height
|
||||
|
||||
act(() => {
|
||||
root.unmount();
|
||||
|
||||
@@ -2555,7 +2555,6 @@ export function IssueChatThread({
|
||||
spacerInitialReserveRef.current = 0;
|
||||
}
|
||||
}, [messages]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const composerElement = composerViewportAnchorRef.current;
|
||||
if (preserveComposerViewportRef.current) {
|
||||
|
||||
Reference in new issue
Block a user