This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 819
Improve reply rendering #3553
Merged
t3chguy
merged 114 commits into
matrix-org:develop
from
maunium:compact-reply-rendering
Jul 15, 2021
Merged
Improve reply rendering #3553
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
d282675
Improve reply rendering
tulir a8c5574
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 03d36f3
Fix lint errors
tulir 26a4a23
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 03299a2
Fix import/export things
tulir e64ff0f
Change score color to match sender name
tulir 9b023fb
Add missing semicolon
tulir 25af263
Make image reply rendering even more compact
tulir ec7acd1
Fix rendering reply after event is decrypted
tulir da3bd5e
Disable pointer events inside replies
tulir 6b96a16
Add absolute max height and some improvements for <pre> replies
tulir e7ad9b8
Fix stylelint issue and update header
tulir b554d59
Prevent reply thumbnail image from overflowing
tulir 4e5680d
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir dfe277b
Remove unnecessary right margin in reply blockquote
tulir c604837
Fix dispatcher import in ReplyTile.js
tulir 4521e9f
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir db5121a
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 75a0178
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 987cdf1
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 2bb7b65
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir dfcf701
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 8c8b46b
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 99717db
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir cdf8f09
Remove unused import and run yarn i18n
tulir c31967d
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir b8ef67e
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 09f9916
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 330f222
Remove redundant code and move presentableTextForFile out of MFileBody
tulir cc91945
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 059241b
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir cdd2773
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 9f66bd0
Remove extra space
tulir c1bc4b0
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 29eff06
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 5240209
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
tulir 598689b
Run eslint
tulir 38710ea
Export IProps
SimonBrandner 869f31d
Convert MImageBody to TS
SimonBrandner 969be09
Add a few things to IMediaEventContent
SimonBrandner 5f49b2d
Missing args
SimonBrandner 5d78eb4
Member delimiter rules
SimonBrandner 6645036
Convert MImageReplyBody to TS
SimonBrandner 0fe10e4
Fix replies to deleted messages
SimonBrandner 9a1b73f
Convert ReplyTile to TS
SimonBrandner 2308ed6
i18n
SimonBrandner e582b15
Fix redacted messages (again)
SimonBrandner 0d8f84c
Delete lozenge effect
SimonBrandner 259b36c
Remove unused code
SimonBrandner 090acc4
Unused import
SimonBrandner b7af39f
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
SimonBrandner 2e295a9
Don't export IProps
SimonBrandner 7bd7f70
Extend IDialogProps
SimonBrandner cbe94c3
Kill-off sdk.getComponent
SimonBrandner 5f81cfe
Nicer formatting
SimonBrandner ae5e10f
Burn sdk.getComponent
SimonBrandner 04098dc
Remove unnecessary constructor
SimonBrandner b5baf40
Don't use as
SimonBrandner 70e94f9
Formatting
SimonBrandner 8f8377a
Types
SimonBrandner 5fc3556
More TS
SimonBrandner 2a403f6
Remove additional ?
SimonBrandner bdbd03c
Types
SimonBrandner fa4977c
Use current target
SimonBrandner 6193bc2
Types
SimonBrandner 86580f3
current target
SimonBrandner af7769c
Types!
SimonBrandner 4cf4ab2
Return type
SimonBrandner e4d1859
Ret type
SimonBrandner ef1a1eb
TS
SimonBrandner 931bba7
Replaceable component
SimonBrandner 63ad952
EventType enum!
SimonBrandner 22b029d
Relation type
SimonBrandner 0bf595d
Enums
SimonBrandner b1fb089
More compact classNames
SimonBrandner c44de3b
Enums
SimonBrandner 069180b
Remove contructor
SimonBrandner 43cf7bc
Remove 0px
SimonBrandner e01d157
Formatting
SimonBrandner 562d43e
Font
SimonBrandner 9455a6d
Import replaceableComponent
SimonBrandner bc7a8f8
Handle redaction
SimonBrandner fca5125
Improve redacted body look
SimonBrandner 866a11d
Fix image alignment issues
SimonBrandner 75e7948
Handle event edits
SimonBrandner b4ae54d
Remove unused CSS
SimonBrandner 8fc90e1
Fix isInfoMessage regression
SimonBrandner d149cea
Remove unused CSS
SimonBrandner 8e456b0
More unused CSS
SimonBrandner 2660e25
Deduplicate some code
SimonBrandner 1ec4ead
Unused imports
SimonBrandner 8f831a8
Remove unused code
SimonBrandner 1bca537
Fix redacted messages for the 100th #*&@*%^ time
SimonBrandner 0bbdfef
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
SimonBrandner 9aae33e
Use string[]
SimonBrandner 74ff85a
Remove m.sticker since it's not a message type
SimonBrandner 58dedbe
Add missing type
SimonBrandner 7b35d2c
FORCED_IMAGE_HEIGHT into a const
SimonBrandner bde26a8
Omit onFinished
SimonBrandner 4afd985
Kill off _afterComponentWillUnmount
SimonBrandner 1835559
Fix senderProfile getting cutoff
SimonBrandner 586e85c
Use MFileBody in replies
SimonBrandner f26c75b
Use margin instead of padding
SimonBrandner ae4d8c2
It's not an override
SimonBrandner 04db6be
Remove stale comment
SimonBrandner 782563a
Override audio and video body with file body
SimonBrandner 6c801fe
Use MImageReplyBody for stickers
SimonBrandner 54d2784
Remove unused import
SimonBrandner acd37d2
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
SimonBrandner 7f9f2db
Merge remote-tracking branch 'upstream/develop' into compact-reply-re…
SimonBrandner 375e279
Add speaker icon
SimonBrandner 68640a4
Fix icon postion
SimonBrandner 88da0f4
Give audio and video replies an icon
SimonBrandner 5d0afdb
Don't show line number in replies
SimonBrandner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
Copyright 2019 Tulir Asokan <[email protected]> | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
.mx_ReplyTile { | ||
max-width: 100%; | ||
clear: both; | ||
padding-top: 2px; | ||
padding-bottom: 2px; | ||
font-size: 14px; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
position: relative; | ||
line-height: 16px; | ||
} | ||
|
||
.mx_ReplyTile > a { | ||
display: block; | ||
text-decoration: none; | ||
color: $primary-fg-color; | ||
} | ||
|
||
// We do reply size limiting with CSS to avoid duplicating the TextualBody component. | ||
.mx_ReplyTile .mx_EventTile_content { | ||
$reply-lines: 2; | ||
$line-height: 22px; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
text-overflow: ellipsis; | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: $reply-lines; | ||
line-height: $line-height; | ||
|
||
.mx_EventTile_body.mx_EventTile_bigEmoji { | ||
line-height: $line-height !important; | ||
// Override the big emoji override | ||
font-size: 14px !important; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
||
.mx_ReplyTile.mx_ReplyTile_info { | ||
padding-top: 0px; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
.mx_ReplyTile .mx_SenderProfile { | ||
color: $primary-fg-color; | ||
font-size: 14px; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
display: inline-block; /* anti-zalgo, with overflow hidden */ | ||
overflow: hidden; | ||
cursor: pointer; | ||
padding-left: 0px; /* left gutter */ | ||
padding-bottom: 0px; | ||
padding-top: 0px; | ||
margin: 0px; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
line-height: 17px; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/* the next three lines, along with overflow hidden, truncate long display names */ | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
max-width: calc(100% - 65px); | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
.mx_ReplyTile_redacted .mx_UnknownBody { | ||
--lozenge-color: $event-redacted-fg-color; | ||
--lozenge-border-color: $event-redacted-border-color; | ||
display: block; | ||
height: 22px; | ||
width: 250px; | ||
border-radius: 11px; | ||
background: | ||
repeating-linear-gradient( | ||
-45deg, | ||
var(--lozenge-color), | ||
var(--lozenge-color) 3px, | ||
transparent 3px, | ||
transparent 6px | ||
); | ||
box-shadow: 0px 0px 3px var(--lozenge-border-color) inset; | ||
} | ||
|
||
.mx_ReplyTile_sending.mx_ReplyTile_redacted .mx_UnknownBody { | ||
opacity: 0.4; | ||
} | ||
|
||
.mx_ReplyTile_contextual { | ||
opacity: 0.4; | ||
} | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
Copyright 2019 Tulir Asokan <[email protected]> | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import MImageBody from './MImageBody'; | ||
|
||
export default class MImageReplyBody extends MImageBody { | ||
onClick(ev) { | ||
ev.preventDefault(); | ||
} | ||
|
||
wrapImage(contentUrl, children) { | ||
return children; | ||
} | ||
|
||
// Don't show "Download this_file.png ..." | ||
getFileBody() { | ||
return null; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.