Skip to content

Commit

Permalink
fix: vertical spacing between items (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinAoki authored Dec 13, 2022
1 parent b5be6f4 commit 7daa2c2
Show file tree
Hide file tree
Showing 18 changed files with 158 additions and 165 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ export const CollapsibleFormWidget = ({
intl,
}) => (
<Collapsible.Advanced
className="collapsible-card rounded mx-4 my-3 px-3 py-2 text-primary-500"
className="collapsible-card rounded mx-4 my-3 p-4 text-primary-500"
defaultOpen
open={isError || undefined}
>
<Collapsible.Trigger
className="collapsible-trigger d-flex border-0 align-items-center"
style={{ justifyContent: 'unset' }}
>
<Collapsible.Visible whenClosed>
<Collapsible.Visible whenClosed className="p-0 pb-3">
<div className="d-flex flex-column flex-grow-1">
<div className="d-flex flex-grow-1 w-75 x-small">{title}</div>
<div className={`${fontSize}`}>{subtitle}</div>
{subtitle ? <div className={`${fontSize} mt-3`}>{subtitle}</div> : null}
</div>
<div className="d-flex flex-row align-self-start">
{isError && <Icon className="alert-icon" src={Info} />}
<IconButton alt={intl.formatMessage(messages.expandAltText)} src={ExpandMore} iconAs={Icon} variant="dark" />
</div>
</Collapsible.Visible>
<Collapsible.Visible whenOpen>
<Collapsible.Visible whenOpen className="p-0">
<div className="d-flex flex-grow-1 w-75 x-small">{title}</div>
<div className="align-self-start">
<IconButton alt={intl.formatMessage(messages.collapseAltText)} src={ExpandLess} iconAs={Icon} variant="dark" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const DurationWidget = ({
subtitle={getTotalLabel(duration.formValue.startTime, duration.formValue.stopTime, true)}
>
<FormattedMessage {...messages.durationDescription} />
<Form.Row className="mt-4">
<Form.Row className="mt-4.5">
<Form.Group as={Col}>
<Form.Control
floatingLabel={intl.formatMessage(messages.startTimeLabel)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,19 @@ export const LicenseDetails = ({
}) => (
level !== LicenseLevel.course && details && license !== 'select' ? (
<div className="x-small border-primary-100 border-bottom m-0">
<Form.Group>
<div>
<Form.Group className="pb-2">
<div className="mb-3">
<FormattedMessage {...messages.detailsSubsectionTitle} />
</div>

{license === LicenseTypes.allRightsReserved
? (
<div className="mt-2">
<FormattedMessage {...messages.allRightsReservedSectionMessage} />
</div>
)
: null}
{license === LicenseTypes.allRightsReserved ? (
<FormattedMessage {...messages.allRightsReservedSectionMessage} />
) : null}

{license === LicenseTypes.creativeCommons
? (
<Stack gap={3}>
<div className="border-primary-100 border-bottom py-3">
<Stack gap={4}>
<div className="border-primary-100 border-bottom pb-4">
<Form.Group>
<ActionRow>
<Icon className="text-primary-500" src={Attribution} />
Expand All @@ -67,7 +63,7 @@ export const LicenseDetails = ({
<FormattedMessage {...messages.attributionSectionDescription} />
</div>
</div>
<div className="border-primary-100 border-bottom py-3">
<div className="border-primary-100 border-bottom pb-4">
<Form.Group>
<ActionRow>
<Icon src={Nc} />
Expand All @@ -92,7 +88,7 @@ export const LicenseDetails = ({
<FormattedMessage {...messages.noncommercialSectionDescription} />
</div>
</div>
<div className="border-primary-100 border-bottom py-3">
<div className="border-primary-100 border-bottom pb-4">
<Form.Group>
<ActionRow>
<Icon src={Nd} />
Expand Down Expand Up @@ -145,9 +141,7 @@ export const LicenseDetails = ({
</div>
</div>
</Stack>
)
: null}

) : null}
</Form.Group>
</div>
) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export const LicenseDisplay = ({
return (
<Stack gap={3}>
<div className="x-small"><FormattedMessage {...messages.displaySubsectionTitle} /></div>
<div className="small border border-gray-300 rounded pt-2 px-3 pb-3">
<div className="small border border-gray-300 rounded p-4">
<LicenseBlurb license={license} details={details} />
<div className="x-small">{licenseDescription}</div>
<div className="x-small mt-3">{licenseDescription}</div>
</div>
<Hyperlink
className="text-primary-500 x-small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const LicenseSelector = ({
/>
) : null }
</Form.Row>
<div className="x-small mt-2">{levelDescription}</div>
{license === LicenseTypes.select ? null : <div className="border-primary-100 mt-3 border-bottom" />}
<div className="x-small mt-3">{levelDescription}</div>
{license === LicenseTypes.select ? null : <div className="border-primary-100 mt-4 border-bottom" />}
</Form.Group>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ exports[`LicenseDetails snapshots snapshots: renders as expected with level set
<div
className="x-small border-primary-100 border-bottom m-0"
>
<Form.Group>
<div>
<Form.Group
className="pb-2"
>
<div
className="mb-3"
>
<FormattedMessage
defaultMessage="License Details"
description="Title for license detatils subsection"
id="authoring.videoeditor.license.detailsSubsection.title"
/>
</div>
<Stack
gap={3}
gap={4}
>
<div
className="border-primary-100 border-bottom py-3"
className="border-primary-100 border-bottom pb-4"
>
<Form.Group>
<ActionRow>
Expand Down Expand Up @@ -51,7 +55,7 @@ exports[`LicenseDetails snapshots snapshots: renders as expected with level set
</div>
</div>
<div
className="border-primary-100 border-bottom py-3"
className="border-primary-100 border-bottom pb-4"
>
<Form.Group>
<ActionRow>
Expand Down Expand Up @@ -82,7 +86,7 @@ exports[`LicenseDetails snapshots snapshots: renders as expected with level set
</div>
</div>
<div
className="border-primary-100 border-bottom py-3"
className="border-primary-100 border-bottom pb-4"
>
<Form.Group>
<ActionRow>
Expand Down Expand Up @@ -150,23 +154,23 @@ exports[`LicenseDetails snapshots snapshots: renders as expected with level set
<div
className="x-small border-primary-100 border-bottom m-0"
>
<Form.Group>
<div>
<Form.Group
className="pb-2"
>
<div
className="mb-3"
>
<FormattedMessage
defaultMessage="License Details"
description="Title for license detatils subsection"
id="authoring.videoeditor.license.detailsSubsection.title"
/>
</div>
<div
className="mt-2"
>
<FormattedMessage
defaultMessage="You reserve all rights for your work."
description="All Rights Reserved section message"
id="authoring.videoeditor.license.allRightsReservedSectionMessage"
/>
</div>
<FormattedMessage
defaultMessage="You reserve all rights for your work."
description="All Rights Reserved section message"
id="authoring.videoeditor.license.allRightsReservedSectionMessage"
/>
</Form.Group>
</div>
`;
Expand All @@ -177,8 +181,12 @@ exports[`LicenseDetails snapshots snapshots: renders as expected with level set
<div
className="x-small border-primary-100 border-bottom m-0"
>
<Form.Group>
<div>
<Form.Group
className="pb-2"
>
<div
className="mb-3"
>
<FormattedMessage
defaultMessage="License Details"
description="Title for license detatils subsection"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with default pr
/>
</div>
<div
className="small border border-gray-300 rounded pt-2 px-3 pb-3"
className="small border border-gray-300 rounded p-4"
>
<injectIntl(ShimmedIntlComponent)
details={Object {}}
license="all-rights-reserved"
/>
<div
className="x-small"
className="x-small mt-3"
>
FormattedMessage component with license description
</div>
Expand Down Expand Up @@ -54,14 +54,14 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
/>
</div>
<div
className="small border border-gray-300 rounded pt-2 px-3 pb-3"
className="small border border-gray-300 rounded p-4"
>
<injectIntl(ShimmedIntlComponent)
details={Object {}}
license="all-rights-reserved"
/>
<div
className="x-small"
className="x-small mt-3"
>
FormattedMessage component with license description
</div>
Expand Down Expand Up @@ -94,14 +94,14 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
/>
</div>
<div
className="small border border-gray-300 rounded pt-2 px-3 pb-3"
className="small border border-gray-300 rounded p-4"
>
<injectIntl(ShimmedIntlComponent)
details={Object {}}
license="creative-commons"
/>
<div
className="x-small"
className="x-small mt-3"
>
FormattedMessage component with license description
</div>
Expand Down Expand Up @@ -136,14 +136,14 @@ exports[`LicenseDisplay snapshots snapshots: renders as expected with level set
/>
</div>
<div
className="small border border-gray-300 rounded pt-2 px-3 pb-3"
className="small border border-gray-300 rounded p-4"
>
<injectIntl(ShimmedIntlComponent)
details={Object {}}
license="all-rights-reserved"
/>
<div
className="x-small"
className="x-small mt-3"
>
FormattedMessage component with license description
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with block lev
/>
</Form.Row>
<div
className="x-small mt-2"
className="x-small mt-3"
>
<FormattedMessage
defaultMessage="This license is set specifically for this video"
Expand All @@ -53,7 +53,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with block lev
/>
</div>
<div
className="border-primary-100 mt-3 border-bottom"
className="border-primary-100 mt-4 border-bottom"
/>
</Form.Group>
`;
Expand Down Expand Up @@ -90,7 +90,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with default p
</Form.Control>
</Form.Row>
<div
className="x-small mt-2"
className="x-small mt-3"
>
<FormattedMessage
defaultMessage="This license currently set at the course level"
Expand All @@ -99,7 +99,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with default p
/>
</div>
<div
className="border-primary-100 mt-3 border-bottom"
className="border-primary-100 mt-4 border-bottom"
/>
</Form.Group>
`;
Expand Down Expand Up @@ -148,7 +148,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with library l
/>
</Form.Row>
<div
className="x-small mt-2"
className="x-small mt-3"
>
<FormattedMessage
defaultMessage="This license currently set at the library level"
Expand All @@ -157,7 +157,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with library l
/>
</div>
<div
className="border-primary-100 mt-3 border-bottom"
className="border-primary-100 mt-4 border-bottom"
/>
</Form.Group>
`;
Expand Down Expand Up @@ -194,7 +194,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with no licens
</Form.Control>
</Form.Row>
<div
className="x-small mt-2"
className="x-small mt-3"
>
<FormattedMessage
defaultMessage="This license currently set at the course level"
Expand All @@ -203,7 +203,7 @@ exports[`LicenseSelector snapshots snapshots: renders as expected with no licens
/>
</div>
<div
className="border-primary-100 mt-3 border-bottom"
className="border-primary-100 mt-4 border-bottom"
/>
</Form.Group>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports[`LicenseWidget snapshots snapshots: renders as expected with default pro
title="License"
>
<Stack
gap={3}
gap={4}
>
<injectIntl(ShimmedIntlComponent)
level="course"
Expand All @@ -45,7 +45,7 @@ exports[`LicenseWidget snapshots snapshots: renders as expected with default pro
}
/>
<div
className="border-primary-100 border-bottom"
className="border-primary-100 border-bottom my-2"
/>
<Button
className="text-primary-500 font-weight-bold justify-content-start pl-0"
Expand Down Expand Up @@ -85,7 +85,7 @@ exports[`LicenseWidget snapshots snapshots: renders as expected with isLibrary t
title="License"
>
<Stack
gap={3}
gap={4}
>
<injectIntl(ShimmedIntlComponent)
level="library"
Expand Down Expand Up @@ -133,7 +133,7 @@ exports[`LicenseWidget snapshots snapshots: renders as expected with licenseType
title="License"
>
<Stack
gap={3}
gap={4}
>
<injectIntl(ShimmedIntlComponent)
level="block"
Expand Down
Loading

0 comments on commit 7daa2c2

Please sign in to comment.