Skip to content

Commit f3837a4

Browse files
authored
Fix Locations summary page layout (#103349)
1 parent 532540b commit f3837a4

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

client/my-sites/stats/features/modules/stats-locations/stats-locations.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( {
5656
query,
5757
summaryUrl,
5858
summary = false,
59+
listItemClassName,
5960
} ) => {
6061
const dispatch = useDispatch();
6162
const translate = useTranslate();
@@ -429,6 +430,7 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( {
429430
}
430431
onShowMoreClick={ onShowMoreClick }
431432
overlay={ moduleOverlay }
433+
listItemClassName={ listItemClassName }
432434
/>
433435
</>
434436
) }

client/my-sites/stats/features/modules/stats-locations/style.scss

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ $locations-horizontal-bar-width: 380px;
9090
.stats-card.list-locations,
9191
.stats-card-skeleton.locations-skeleton {
9292
.stats-card--hero .stats-card-header {
93-
padding: 0 24px 12px 0;
93+
&:not(.stats__summary--narrow-mobile) {
94+
padding: 0 24px 12px 0;
95+
}
9496
}
9597

9698
.stats-card-header.stats-card-header--split .stats-card-header--main__left {
@@ -109,6 +111,12 @@ $locations-horizontal-bar-width: 380px;
109111
flex-direction: column;
110112
}
111113
}
114+
115+
.stats__summary--narrow-mobile {
116+
.stats-card--column-header {
117+
padding: 0;
118+
}
119+
}
112120
}
113121

114122
.stats__module-list--traffic .stats-card.list-locations,
@@ -211,6 +219,11 @@ $locations-horizontal-bar-width: 380px;
211219
flex: 2;
212220
margin: 0 24px;
213221

222+
// Corresponding to .stats-card--hero above.
223+
.stats-card-header {
224+
padding: 0 0 12px;
225+
}
226+
214227
.stats-geochart {
215228
margin: 0 auto;
216229
overflow: hidden;

packages/components/src/horizontal-bar-list/stats-card.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ const StatsCard = ( props: StatsCardProps ) => {
134134
>
135135
{ !! heroElement && (
136136
<div className={ `${ BASE_CLASS_NAME }--hero` }>
137-
{ splitHeader && <div className={ `${ BASE_CLASS_NAME }-header` }>{ titleNode }</div> }
137+
{ splitHeader && (
138+
<div className={ clsx( `${ BASE_CLASS_NAME }-header`, headerClassName ) }>
139+
{ titleNode }
140+
</div>
141+
) }
138142
{ heroElement }
139143
</div>
140144
) }

0 commit comments

Comments
 (0)