Skip to content

Commit 12fbe7e

Browse files
authored
fix: Discussions UI fixes on mobile resolutions (#689)
1 parent 7db4fde commit 12fbe7e

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

src/discussions/common/AuthorLabel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const AuthorLabel = ({
9999

100100
return showUserNameAsLink
101101
? (
102-
<div className={className}>
102+
<div className={`${className} flex-wrap`}>
103103
<Link
104104
data-testid="learner-posts-link"
105105
id="learner-posts-link"
@@ -112,7 +112,7 @@ const AuthorLabel = ({
112112
{labelContents}
113113
</div>
114114
)
115-
: <div className={className}>{authorName}{labelContents}</div>;
115+
: <div className={`${className} flex-wrap`}>{authorName}{labelContents}</div>;
116116
};
117117

118118
AuthorLabel.propTypes = {

src/discussions/discussions-home/DiscussionSidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const DiscussionSidebar = ({ displaySidebar, postActionBarRef }) => {
5050
'd-none': !displaySidebar,
5151
'd-flex overflow-auto box-shadow-centered-1': displaySidebar,
5252
'w-100': !isOnDesktop,
53-
'sidebar-desktop-width': isOnDesktop && !isOnXLDesktop,
53+
'w-25 sidebar-desktop-width': isOnDesktop && !isOnXLDesktop,
5454
'w-25 sidebar-XL-width': isOnXLDesktop,
5555
'min-content-height': !enableInContextSidebar,
5656
})}

src/discussions/post-comments/comments/comment/Reply.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const Reply = ({ responseId }) => {
131131
className="bg-light-300 pl-4 pt-2.5 pr-2.5 pb-10px flex-fill"
132132
style={{ borderRadius: '0rem 0.375rem 0.375rem' }}
133133
>
134-
<div className="d-flex flex-row justify-content-between" style={{ height: '24px' }}>
134+
<div className="d-flex flex-row justify-content-between">
135135
<AuthorLabel
136136
author={author}
137137
authorLabel={authorLabel}

src/index.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ header {
230230

231231
.sidebar-desktop-width {
232232
min-width: 29rem !important;
233+
234+
@include media-breakpoint-down(lg) {
235+
min-width: 25rem !important;
236+
}
233237
}
234238

235239
.sidebar-XL-width {
@@ -480,6 +484,10 @@ code {
480484
display: flex;
481485
}
482486
}
487+
488+
.pgn__avatar {
489+
flex-shrink: 0;
490+
}
483491
}
484492

485493
.spinner-dimensions {
@@ -560,7 +568,7 @@ code {
560568
}
561569

562570
.author-name {
563-
line-height: 1;
571+
line-height: 1.5;
564572
word-break: break-all;
565573
}
566574

0 commit comments

Comments
 (0)