Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust column size to avoid player overflow on browser resize #6088

Merged
merged 1 commit into from
Oct 28, 2024
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
4 changes: 2 additions & 2 deletions app/javascript/components/MediaObjectRamp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Ramp = ({
startCanvasId={startCanvasId}
startCanvasTime={startCanvasTime}>
<Row className="ramp--all-components ramp--itemview">
<Col sm={8}>
<Col sm={12} md={9}>
{(cdl.enabled && !cdl.can_stream)
? (<React.Fragment>
<div dangerouslySetInnerHTML={{ __html: cdl.embed }} />
Expand Down Expand Up @@ -160,7 +160,7 @@ const Ramp = ({
)
}
</Col>
<Col sm={(sections_count == 0) ? 12 : 4} className="ramp--tabs-panel">
<Col sm={12} md={3} className="ramp--tabs-panel">
{cdl.enabled && <div dangerouslySetInnerHTML={{ __html: cdl.destroy }} />}
<Tabs>
<Tab eventKey="details" title="Details">
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/components/PlaylistRamp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ const Ramp = ({
emptyManifestMessage='This playlist currently has no playable items.'
startCanvasId={startCanvasId}>
<Row className="ramp--all-components ramp--playlist">
<Col sm={8}>
<Col sm={12} md={8}>
<MediaPlayer enableFileDownload={false} enablePlaybackRate={true} />
{playlist_item_ids?.length > 0 && (
<Card className="ramp--playlist-accordion">
<Card className={`ramp--playlist-accordion ${IS_MOBILE ? 'mobile-view' : ''}`}>
<Card.Header>
<h4>{activeItemTitle}</h4>
{activeItemSummary && <div>{activeItemSummary}</div>}
Expand Down Expand Up @@ -194,7 +194,7 @@ const Ramp = ({
</Card>
)}
</Col>
<Col sm={4} className={`ramp--playlist-items-column ${IS_MOBILE ? 'mobile-view' : ''}`}>
<Col sm={12} md={4} className={`ramp--playlist-items-column ${IS_MOBILE ? 'mobile-view' : ''}`}>
<Row>
<Col sm={6}>
<AutoAdvanceToggle />
Expand Down
9 changes: 9 additions & 0 deletions app/javascript/components/Ramp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,15 @@
}

.ramp--playlist-accordion {
// Set accordion with to fit player's minimum width
min-width: 490px;
&.mobile-view {
min-width: 380px;
}

border-radius: 0 0 0.25em 0.25em;
border-top: none;

.accordion .card {
border: none;
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
Expand Down