Skip to content

Commit a197874

Browse files
Copilotabchatrajwunderl
authored
Fix Share button visibility in iPad portrait mode with long descriptions (microsoft#11048)
* Initial plan * Fix Share button cut off in iPad portrait mode Co-authored-by: abchatra <6107272+abchatra@users.noreply.github.com> * Add responsive button styling for mobile devices Co-authored-by: abchatra <6107272+abchatra@users.noreply.github.com> * Remove !important and increase CSS specificity Co-authored-by: abchatra <6107272+abchatra@users.noreply.github.com> * Add scrollable description container to fix Share button visibility Co-authored-by: jwunderl <5615930+jwunderl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: abchatra <6107272+abchatra@users.noreply.github.com> Co-authored-by: jwunderl <5615930+jwunderl@users.noreply.github.com> Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
1 parent 1df6a6c commit a197874

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎theme/home.less‎

Lines changed: 5 additions & 0 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
}

‎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)