Skip to content

Commit 39b1401

Browse files
Copilotjwunderl
andcommitted
Add scrollable description container to fix Share button visibility
Co-authored-by: jwunderl <[email protected]>
1 parent baf2c96 commit 39b1401

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

theme/home.less

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@
317317
color: var(--pxt-neutral-foreground3);
318318
margin-bottom: 1rem;
319319
}
320+
.description-container {
321+
max-height: 8rem;
322+
overflow-y: auto;
323+
margin-bottom: 0.5rem;
324+
}
320325
.detail {
321326
color: var(--pxt-neutral-foreground3);
322327
}
@@ -639,14 +644,6 @@
639644
}
640645
}
641646
.detailview {
642-
.column.six.wide .yt-button.button.large,
643-
.column.six.wide button.home-share-button.button.large {
644-
display: block;
645-
width: 100%;
646-
margin-bottom: 0.5rem;
647-
font-size: 1rem;
648-
padding: 0.7rem 1rem;
649-
}
650647
.actions .card-action {
651648
max-width: 10rem;
652649
.button.attached .icon:not(.xicon) {
@@ -785,14 +782,6 @@
785782
}
786783

787784
.detailview {
788-
.column.six.wide .yt-button.button.large,
789-
.column.six.wide button.home-share-button.button.large {
790-
display: block;
791-
width: 100%;
792-
margin-bottom: 0.5rem;
793-
font-size: 0.9rem;
794-
padding: 0.5rem 0.75rem;
795-
}
796785
.column:first-child {
797786
height: auto;
798787
overflow: visible;

webapp/src/projects.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,11 +1232,13 @@ export class ProjectsDetail extends data.Component<ProjectsDetailProps, Projects
12321232
{tags && <div className="ui labels">
12331233
{tags.map(tag => <div className={`ui ${tagColors[tag] || ''} label`}>{pxt.Util.rlf(tag)}
12341234
</div>)}</div>}
1235-
{descriptions && descriptions.map((desc, index) => {
1236-
return <p key={`line${index}`} className="detail">
1237-
{desc}
1238-
</p>
1239-
})}
1235+
<div className="description-container">
1236+
{descriptions && descriptions.map((desc, index) => {
1237+
return <p key={`line${index}`} className="detail">
1238+
{desc}
1239+
</p>
1240+
})}
1241+
</div>
12401242
{!!cardType && youTubeWatchUrl && this.isYouTubeOnline() &&
12411243
// show youtube card
12421244
// thumbnail url `https://img.youtube.com/vi/${youTubeId}/default.jpg`

0 commit comments

Comments
 (0)