Skip to content
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
5 changes: 3 additions & 2 deletions src/amo/components/RatingManager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ export class RatingManagerBase extends React.Component<InternalProps> {
/>
{/* eslint-enable react/no-danger */}
<div className="RatingManager-ratingControl">
{!this.isSignedIn() ? this.renderLogInToRate() : null}
{i18n.gettext('Click to rate:')}
{this.isSignedIn()
? i18n.gettext('Click to rate:')
: this.renderLogInToRate()}
{userReview && onDeleteScreen ? (
<AddonReviewManagerRating
className="RatingManager-AddonReviewManagerRating"
Expand Down
20 changes: 15 additions & 5 deletions src/amo/components/ShowMoreCard/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,27 @@
}
}

.AddonDescription,
.PermissionsCard {
.Card-contents {
border-radius: 0;
.AddonDescription {
.ShowMoreCard-contents {
// Keep in sync with `maxHeight` passed to the `ShowMoreCard` component in
// `Addon/index.js`
max-height: 230px;
}
}

.PermissionsCard {
.ShowMoreCard-contents {
// Keep in sync with `maxHeight` passed to the `ShowMoreCard` component in
// `Addon/index.js` and `PermissionCard/index.js`.
// `PermissionCard/index.js`.
max-height: 300px;
}
}

.AddonDescription,
.PermissionsCard {
.Card-contents {
border-radius: 0;
}

&.ShowMoreCard--expanded .ShowMoreCard-contents {
max-height: none;
Expand Down
9 changes: 5 additions & 4 deletions src/amo/pages/Addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export class AddonBase extends React.Component {
className={showMoreCardName}
header={title}
id={showMoreCardName}
maxHeight={300}
maxHeight={230}
>
{descriptionProps && Object.keys(descriptionProps).length ? (
<div className="AddonDescription-contents" {...descriptionProps} />
Expand Down Expand Up @@ -547,9 +547,10 @@ export class AddonBase extends React.Component {
</Card>
) : null}

{this.renderAboutThisCard()}

{this.renderRatingsCard()}
<Card className="Addon-description-rating-card">
{this.renderAboutThisCard()}
{this.renderRatingsCard()}
</Card>
</div>

<PermissionsCard version={currentVersion} />
Expand Down
47 changes: 43 additions & 4 deletions src/amo/pages/Addon/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

.Addon .Card {
margin-bottom: $padding-page;

@include respond-to(large) {
margin-bottom: $padding-page-l;
}
}

.Addon-icon-wrapper {
Expand Down Expand Up @@ -117,6 +113,32 @@
width: 100%;
}

.Addon-description-rating-card > .Card-contents {
display: flex;
flex-direction: column;
padding: 0;
}

.Addon-description-rating-card {
.AddonDescription {
max-width: 760px;
}

.Addon-overall-rating {
margin-bottom: 0;

@include respond-to(medium) {
min-width: 380px;
max-width: 520px;
flex-grow: 1;
}

.Card-contents {
border-radius: 0;
}
}
}

// Details section with lots of grid stuff, on larger displays.
@include respond-to(large) {
.Addon-screenshots {
Expand All @@ -143,6 +165,23 @@
.AddonMoreInfo dl {
column-count: 3;
}

.Addon-description-rating-card > .Card-contents {
flex-direction: row;
}

.Addon-description-rating-card {
.AddonDescription,
.Addon-overall-rating {
margin-bottom: 0;

.Card-contents,
.Card-header,
.Card-footer {
border-radius: 0;
}
}
}
}

.Addon-WrongPlatformWarning {
Expand Down