Add ability to expand and collapse long quoted messages (#6701)
In case where we had a very long message the experience of going between messages to see the full quote isn't very nice on desktop, therefore this commit adds a button with additional hotkey to normalize the experience a bit. Fixes https://github.com/vector-im/element-web/issues/18884
This commit is contained in:
parent
e5f2a06102
commit
0cfa2a58c7
12 changed files with 153 additions and 64 deletions
|
@ -138,6 +138,7 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
|
|||
// If it's less than 30% we don't add the expansion button.
|
||||
// We also round the number as it sometimes can be 29.99...
|
||||
const percentageOfViewport = Math.round(pre.offsetHeight / UIStore.instance.windowHeight * 100);
|
||||
// TODO: additionally show the button if it's an expanded quoted message
|
||||
if (percentageOfViewport < 30) return;
|
||||
|
||||
const button = document.createElement("span");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue