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
|
@ -45,7 +45,7 @@ function getOrCreateContainer(): HTMLDivElement {
|
|||
|
||||
const ARIA_MENU_ITEM_ROLES = new Set(["menuitem", "menuitemcheckbox", "menuitemradio"]);
|
||||
|
||||
interface IPosition {
|
||||
export interface IPosition {
|
||||
top?: number;
|
||||
bottom?: number;
|
||||
left?: number;
|
||||
|
@ -430,7 +430,11 @@ export type AboveLeftOf = IPosition & {
|
|||
|
||||
// Placement method for <ContextMenu /> to position context menu right-aligned and flowing to the left of elementRect,
|
||||
// and either above or below: wherever there is more space (maybe this should be aboveOrBelowLeftOf?)
|
||||
export const aboveLeftOf = (elementRect: DOMRect, chevronFace = ChevronFace.None, vPadding = 0): AboveLeftOf => {
|
||||
export const aboveLeftOf = (
|
||||
elementRect: DOMRect,
|
||||
chevronFace = ChevronFace.None,
|
||||
vPadding = 0,
|
||||
): AboveLeftOf => {
|
||||
const menuOptions: IPosition & { chevronFace: ChevronFace } = { chevronFace };
|
||||
|
||||
const buttonRight = elementRect.right + window.pageXOffset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue