Improve Link Preview Sizing
Update linkpreviewer to minimise the number of resizes. - There is now a placeholder loading element to hold space while the data is obtained - The component starts with a set size but can be expanded to see the whole item. - The expand/contract button is only visible on hover - The default size is picked to show 3 lines of text (1 heading and 2 description, 2 heading and 1 description, etc) This is designed to help with the timeline scroll jumping CCBUG: 463235 by minimizing the amount of resizing for items in the timeline. Before  After when compressed  After When expanded  After Loading 
This commit is contained in:
@@ -29,14 +29,8 @@ TimelineContainer {
|
||||
messageId: model.eventId
|
||||
visible: currentRoom.chatBoxEditId === model.eventId
|
||||
}
|
||||
Loader {
|
||||
id: linkPreviewLoader
|
||||
LinkPreviewDelegate {
|
||||
Layout.fillWidth: true
|
||||
active: !currentRoom.usesEncryption && model.display && model.display.includes("http")
|
||||
visible: Config.showLinkPreview && active
|
||||
sourceComponent: LinkPreviewDelegate {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user