Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion res/css/structures/_FilePanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ limitations under the License.
position: initial;
font-size: $font-14px;
opacity: 1.0;
color: $event-timestamp-color;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

/* Overrides for the wrappers around the body tile */
Expand Down
5 changes: 5 additions & 0 deletions res/css/views/messages/_MessageTimestamp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ limitations under the License.
*/

.mx_MessageTimestamp {
--MessageTimestamp-max-width: 80px;

color: $event-timestamp-color;
font-size: $font-10px;
font-variant-numeric: tabular-nums;
display: block; // enable the width setting below
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because width declaration below is supposed to be enabled by default.

width: $MessageTimestamp_width;
white-space: nowrap;
user-select: none;
}
1 change: 0 additions & 1 deletion res/css/views/right_panel/_ThreadPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ limitations under the License.
}

.mx_MessageTimestamp {
font-size: $font-12px;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

color: $secondary-content;
}

Expand Down
5 changes: 5 additions & 0 deletions res/css/views/rooms/_EventBubbleTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ limitations under the License.
margin-left: var(--EventTile_bubble-margin-inline-start);
font-size: $font-14px;

.mx_MessageTimestamp {
width: unset; // Cancel the default width
max-width: var(--MessageTimestamp-max-width);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
before after


.mx_ThreadSummary {
clear: both;
width: fit-content;
Expand Down
12 changes: 3 additions & 9 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,8 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}

.mx_MessageTimestamp {
display: block;
white-space: nowrap;
left: 0px;
text-align: center;
user-select: none;
}

&.mx_EventTile_continuation .mx_EventTile_line {
Expand Down Expand Up @@ -850,8 +847,8 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}

.mx_MessageTimestamp {
max-width: 80px;
width: auto;
font-size: $font-12px;
max-width: var(--MessageTimestamp-max-width);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$MessageTimestamp_width is enabled here.

Before After
before after

position: initial;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
Expand Down Expand Up @@ -883,10 +880,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
padding-inline-end: 0;
}

.mx_MessageTimestamp {
font-size: $font-10px;
}

Copy link
Contributor Author

@luixxiul luixxiul Jun 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
before1 after1

// handling for hidden events (e.g reactions) in the thread view
&.mx_EventTile_info {
padding-top: 0;
Expand Down Expand Up @@ -1031,6 +1024,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss

.mx_MessageTimestamp {
top: 2px; // Align with mx_EventTile_content
position: absolute; // for IRC layout
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
before after

}

.mx_EventTile_senderDetails {
Expand Down
1 change: 0 additions & 1 deletion res/css/views/rooms/_IRCLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ $irc-line-height: $font-18px;
}

.mx_MessageTimestamp {
font-size: $font-10px;
text-align: right;
}

Expand Down
6 changes: 3 additions & 3 deletions res/css/views/rooms/_PinnedEventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ limitations under the License.

.mx_PinnedEventTile_footer {
grid-area: footer;
font-size: 10px;
font-size: $font-10px;
line-height: 12px;

.mx_PinnedEventTile_timestamp {
font-size: inherit;
line-height: inherit;
color: $secondary-content;
display: unset;
width: unset; // Cancel the default width value
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
before after

}

.mx_AccessibleButton_kind_link {
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/PinnedEventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class PinnedEventTile extends React.Component<IProps> {
</div>

<div className="mx_PinnedEventTile_footer">
<span className="mx_PinnedEventTile_timestamp">
<span className="mx_MessageTimestamp mx_PinnedEventTile_timestamp">
{ formatDate(new Date(this.props.event.getTs())) }
</span>

Expand Down