Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Tweak timeline card layout #7743

Merged
merged 2 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 30 additions & 3 deletions res/css/views/right_panel/_TimelineCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,43 @@ limitations under the License.

.mx_BaseCard_header {
margin: 5px 0 9px 0;

.mx_BaseCard_close {
margin: 8px;
right: 0;
}
}

.mx_AutoHideScrollbar {
padding-right: 10px;
width: calc(100% - 10px);
}

// Style to optimize the layout for the right panel area
.mx_NewRoomIntro {
margin-left: 36px;
}

.mx_EventTile_content {
margin-right: 0;
}

.mx_EventTile:not([data-layout="bubble"]) .mx_EventTile_line {
padding-left: 36px;
padding-right: 36px;
}

.mx_EventTile:not([data-layout="bubble"]) .mx_ReactionsRow {
padding-left: 36px;
padding-right: 36px;
}

.mx_GroupLayout .mx_EventTile > .mx_SenderProfile {
margin-left: 36px;
}

.mx_EventTile:not([data-layout="bubble"]) .mx_EventTile_avatar {
top: 12px;
left: 0px;
left: -3px;
}

.mx_CallEvent_wrapper {
Expand All @@ -62,6 +74,7 @@ limitations under the License.
margin: 4px;
}
}

.mx_EventTile:not([data-layout="bubble"]) .mx_MessageTimestamp {
right: -4px;
left: auto;
Expand All @@ -70,18 +83,32 @@ limitations under the License.
.mx_EventTile:not([data-layout="bubble"]) .mx_EventTile_msgOption {
margin-right: 2px;
}

.mx_EventListSummary:not([data-layout=bubble]) .mx_EventTile_line {
padding-left: 36px;
}

.mx_GroupLayout .mx_EventTile .mx_EventTile_line {
padding-bottom: 8px;
}

.mx_EventTile_readAvatars {
top: -10px;
}

// mx_EventTile_info
.mx_EventTile:not([data-layout="bubble"]).mx_EventTile_info .mx_EventTile_line {
padding-left: 36px;
}

.mx_EventTile:not([data-layout="bubble"]).mx_EventTile_info .mx_EventTile_avatar {
left: 18px;
}

.mx_WhoIsTypingTile {
margin-left: -12px;
}

.mx_WhoIsTypingTile_avatars {
flex-basis: 48px; // 12 + 36
Copy link
Member

Choose a reason for hiding this comment

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

could this comment get a bit more detail as to what 12 and 36 represent

}
}
2 changes: 1 addition & 1 deletion res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ $left-gutter: 64px;
}

.mx_EventListSummary:not([data-layout=bubble]) .mx_EventTile_line {
padding-left: calc($left-gutter);
padding-left: $left-gutter;
}

/* all the overflow-y: hidden; are to trap Zalgos -
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_WhoIsTypingTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.

/* position the indicator in the same place horizontally as .mx_EventTile_avatar. */
.mx_WhoIsTypingTile_avatars {
flex: 0 0 83px; // 18 + 65
flex: 0 0 82px; // 18 + 64
Copy link
Member

Choose a reason for hiding this comment

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

likewise here

Copy link
Member

Choose a reason for hiding this comment

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

Also this seems to affect more than just the timeline card, is that intentional and tested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's intentional, I noticed while working on this that the typing tile in the main timeline was 1px out of alignment.

text-align: center;
}

Expand Down