HomePhabricator
Diffusion Comm 1862947bac25

[web] Scrolling to the edited message when it overflows

Tags
None
Referenced Files
F564724: edit-no-scroll.mov
Jul 13 2023, 2:52 AM
File Not Attached
F564723: edit-scroll.mov
Jul 13 2023, 2:52 AM
File Not Attached
Subscribers
None

Description

[web] Scrolling to the edited message when it overflows

Summary:
Currently, if the user wants to edit a message which overflows (near the top or bottom of the ChatMessageList), the edit box may also overflow.
This diff addresses that, if the message edit box may overflow, we first scroll so that the edited message is in the center, and then open the edit box.

Test Plan:
Run the app on Chrome, and checked:

  • entered edit mode for a message which overflows, checked if the browser scrolled to it, and opened the edit box,
  • entered edit mode for a message in the middle, checked if the edit box was opened instantly and without scrolling,
  • added new lines for the edited message, and checked if it still fits in the container.

Videos:

Reviewers: michal, inka, ashoat

Reviewed By: inka, ashoat

Subscribers: kamil, ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D8027

Details

Provenance
kosmydel <kukubaczek@gmail.com>Authored on May 30 2023, 4:38 AM
kosmydel <104823336+kosmydel@users.noreply.github.com>Committed on Jul 13 2023, 2:51 AM
Reviewer
inka
Differential Revision
D8027: [web] Scrolling to the edited message when it overflows
Parents
rCOMM98ea2834e2b6: [lib] Enable new id schema
Branches
Unknown
Tags
Unknown