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

Adds MostRead to STY's second column #5739

Merged
merged 52 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
92ffc9e
Added MostRead to STY's second column
HarveyPeachey Mar 2, 2020
0f8f6d0
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 3, 2020
5f2aa3d
Replaced maxTwoColumn boolean with new columnLayout prop
HarveyPeachey Mar 4, 2020
eefcb3e
Merge branch 'latest' of https://github.com/bbc/simorgh into most-rea…
HarveyPeachey Mar 4, 2020
4d58637
Repositioned MostRead container in the correct position
HarveyPeachey Mar 4, 2020
ac4a9d5
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 6, 2020
6f7def8
Merge branch 'latest' into most-read-sty-col
FK78 Mar 6, 2020
3fbc46b
Merge branch 'latest' of github.com:bbc/simorgh into most-read-sty-col
Mar 6, 2020
a575750
Merge branch 'most-read-sty-col' of github.com:bbc/simorgh into most-…
Mar 6, 2020
1b62c95
chore: bump psammead-grid
Mar 6, 2020
5bebdc3
Merge of latest
HarveyPeachey Mar 9, 2020
5e56ed9
Updated snapshots
HarveyPeachey Mar 9, 2020
4ad8858
Bumped psammead-most-read
HarveyPeachey Mar 9, 2020
91bfdf0
Removed component wrapper background for UX requirements
HarveyPeachey Mar 9, 2020
0679fdf
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 9, 2020
618627c
Merge branch 'latest' into most-read-sty-col
FK78 Mar 9, 2020
89154a1
Merge branch 'latest' into most-read-sty-col
EinsteinNjoroge Mar 9, 2020
a0264bf
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 9, 2020
7d09539
Merge branch 'latest' of https://github.com/bbc/simorgh into most-rea…
HarveyPeachey Mar 10, 2020
04f8177
Bump most read to 4.0.1
HarveyPeachey Mar 10, 2020
f732ee1
Merge branch 'latest' into most-read-sty-col
EinsteinNjoroge Mar 10, 2020
d8a31de
Added most-read endpount overide for storybook, added parentColumn to…
HarveyPeachey Mar 11, 2020
d728139
Merge branch 'latest' of https://github.com/bbc/simorgh into most-rea…
HarveyPeachey Mar 11, 2020
b1d4044
Updated snapshots
HarveyPeachey Mar 11, 2020
95d283c
Merge branch 'most-read-sty-col' of https://github.com/bbc/simorgh in…
HarveyPeachey Mar 11, 2020
8b396f9
Merge branch 'latest' of https://github.com/bbc/simorgh into most-rea…
HarveyPeachey Mar 11, 2020
70e79c0
Passed correct layout prop
HarveyPeachey Mar 11, 2020
6c275b4
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 12, 2020
3439509
Merge branch 'latest' into most-read-sty-col
FK78 Mar 13, 2020
cd5ba10
Merge https://github.com/bbc/simorgh into most-read-sty-col
HarveyPeachey Mar 13, 2020
2c5fb5c
Updated psammead-most-read to 4.0.2
HarveyPeachey Mar 13, 2020
172df91
Merge branch 'most-read-sty-col' of https://github.com/bbc/simorgh in…
HarveyPeachey Mar 13, 2020
22a2107
Merge branch 'latest' into most-read-sty-col
thekp Mar 13, 2020
773bc65
Added and updated story book
HarveyPeachey Mar 13, 2020
4da8300
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 13, 2020
8242f1d
Merge branch 'most-read-sty-col' of https://github.com/bbc/simorgh in…
HarveyPeachey Mar 13, 2020
d9b4a30
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 16, 2020
012aa65
Merge branch 'latest' into most-read-sty-col
Mar 16, 2020
ca49741
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Mar 16, 2020
b1369ce
Merge latest
HarveyPeachey Apr 3, 2020
45d394e
Merge branch 'latest' of https://github.com/bbc/simorgh into most-rea…
HarveyPeachey Apr 3, 2020
7b98fe2
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Apr 3, 2020
87d1c42
Merge branch 'latest' of https://github.com/bbc/simorgh into most-rea…
HarveyPeachey Apr 3, 2020
0e0c49b
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Apr 3, 2020
fdc6991
Updated integration test snapshot
HarveyPeachey Apr 3, 2020
ed4bca2
Merge branch 'most-read-sty-col' of https://github.com/bbc/simorgh in…
HarveyPeachey Apr 3, 2020
98c43e2
Merge branch 'latest' into most-read-sty-col
paruchurisilpa Apr 6, 2020
edc8d4b
Merge branch 'latest' into most-read-sty-col
HarveyPeachey Apr 6, 2020
fbe1ea6
Merge branch 'latest' into most-read-sty-col
paruchurisilpa Apr 6, 2020
aded153
Merge branch 'latest' into most-read-sty-col
paruchurisilpa Apr 7, 2020
2bac2a4
Merge branch 'latest' into most-read-sty-col
paruchurisilpa Apr 8, 2020
ca0029a
Merge branch 'latest' into most-read-sty-col
amywalkerdev Apr 8, 2020
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
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@
"@bbc/psammead-consent-banner": "^2.3.28",
"@bbc/psammead-copyright": "^1.2.24",
"@bbc/psammead-figure": "^1.2.12",
"@bbc/psammead-grid": "^1.1.10",
"@bbc/psammead-grid": "^1.1.11",
"@bbc/psammead-headings": "^3.1.28",
"@bbc/psammead-image": "^1.2.4",
"@bbc/psammead-image-placeholder": "^1.2.33",
"@bbc/psammead-inline-link": "^1.3.20",
"@bbc/psammead-locales": "^4.1.2",
"@bbc/psammead-media-indicator": "^4.0.4",
"@bbc/psammead-media-player": "^2.7.4",
"@bbc/psammead-most-read": "^2.0.2",
"@bbc/psammead-most-read": "^4.0.2",
"@bbc/psammead-navigation": "^6.0.2",
"@bbc/psammead-paragraph": "^2.2.26",
"@bbc/psammead-radio-schedule": "0.1.0-alpha.20",
Expand Down
14 changes: 7 additions & 7 deletions src/app/containers/MostRead/Canonical/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState, useContext } from 'react';
import 'isomorphic-fetch';
import { bool, string } from 'prop-types';
import { bool, string, oneOf } from 'prop-types';
import styled from 'styled-components';
import {
GEL_GROUP_1_SCREEN_WIDTH_MAX,
Expand Down Expand Up @@ -77,7 +77,7 @@ const ConstrainedMostReadSection = styled(MostReadSection)`

const CanonicalMostRead = ({
endpoint,
maxTwoColumns,
columnLayout,
constrainMaxWidth,
isOnFrontPage,
}) => {
Expand Down Expand Up @@ -162,21 +162,21 @@ const CanonicalMostRead = ({
<MostReadList
numberOfItems={items.length}
dir={dir}
maxTwoColumns={maxTwoColumns}
columnLayout={columnLayout}
>
{items.map((item, i) => (
<MostReadItemWrapper
dir={dir}
key={item.id}
maxTwoColumns={maxTwoColumns}
columnLayout={columnLayout}
>
<MostReadRank
service={service}
script={script}
listIndex={i + 1}
numberOfItems={items.length}
dir={dir}
maxTwoColumns={maxTwoColumns}
columnLayout={columnLayout}
/>
<MostReadLink
dir={dir}
Expand All @@ -198,12 +198,12 @@ const CanonicalMostRead = ({
CanonicalMostRead.propTypes = {
endpoint: string.isRequired,
constrainMaxWidth: bool.isRequired,
maxTwoColumns: bool,
columnLayout: oneOf(['oneColumn', 'twoColumn', 'multiColumn']),
isOnFrontPage: bool,
};

CanonicalMostRead.defaultProps = {
maxTwoColumns: false,
columnLayout: 'multiColumn',
isOnFrontPage: false,
};

Expand Down
119 changes: 92 additions & 27 deletions src/app/containers/MostRead/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`MostReadContainerCanonical Assertion should render most read correctly
margin: 0;
padding: 0;
grid-auto-flow: column;
grid-template-rows: repeat( 5,[col-start] auto [col-end] );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit strange that it's changing this value from 5 to 10. Will have to make sure this is double-checked in a11y swarm and test phase.

grid-template-rows: repeat(10,auto);
}

.c13 {
Expand Down Expand Up @@ -201,64 +201,75 @@ exports[`MostReadContainerCanonical Assertion should render most read correctly
}
}

@media (max-width:37.4375rem) {
@media (min-width:37.5rem) {
.c8 {
grid-template-rows: repeat( 10,[col-start] auto [col-end] );
grid-template-rows: repeat( 5,auto );
}
}

@media (min-width:80rem) {
.c8 {
grid-auto-flow: row;
grid-template-rows: repeat( 5,[col-start] auto [col-end] );
}
}

@media (max-width:14.9375rem) {
.c12 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c12 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c12 {
min-width: 2.1rem;
min-width: 2rem;
}
}

@media (min-width:37.5rem) {
.c12 {
min-width: 3rem;
}
}

@media (min-width:37.5rem) {
.c12 {
min-width: auto;
min-width: 1.5rem;
}
}

@media (min-width:80rem) {
.c12 {
min-width: auto;
min-width: 1.5rem;
}
}

@media (max-width:14.9375rem) {
.c16 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c16 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c16 {
min-width: 2.1rem;
min-width: 2rem;
}
}

@media (min-width:37.5rem) {
.c16 {
min-width: 3rem;
}
}

Expand All @@ -270,31 +281,37 @@ exports[`MostReadContainerCanonical Assertion should render most read correctly

@media (min-width:80rem) {
.c16 {
min-width: auto;
min-width: 1.5rem;
}
}

@media (max-width:14.9375rem) {
.c17 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c17 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c17 {
min-width: 2.1rem;
min-width: 2rem;
}
}

@media (min-width:37.5rem) {
.c17 {
min-width: 3rem;
}
}

@media (min-width:37.5rem) {
.c17 {
min-width: auto;
min-width: 1.5rem;
}
}

Expand All @@ -306,19 +323,25 @@ exports[`MostReadContainerCanonical Assertion should render most read correctly

@media (max-width:14.9375rem) {
.c18 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c18 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c18 {
min-width: 2.1rem;
min-width: 2rem;
}
}

@media (min-width:37.5rem) {
.c18 {
min-width: 3rem;
}
}

Expand All @@ -330,37 +353,79 @@ exports[`MostReadContainerCanonical Assertion should render most read correctly

@media (min-width:80rem) {
.c18 {
min-width: auto;
min-width: 1.5rem;
}
}

@media (max-width:14.9375rem) {
.c19 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c19 {
min-width: 1.8rem;
min-width: 2rem;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c19 {
min-width: 2.1rem;
min-width: 2rem;
}
}

@media (min-width:37.5rem) {
.c19 {
min-width: auto;
min-width: 3rem;
}
}

@media (min-width:37.5rem) {
.c19 {
min-width: 1.5rem;
}
}

@media (min-width:80rem) {
.c19 {
min-width: auto;
min-width: 1.5rem;
}
}

@media (max-width:14.9375rem) {
.c20 {
min-width: 2rem;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c20 {
min-width: 2rem;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c20 {
min-width: 2rem;
}
}

@media (min-width:37.5rem) {
.c20 {
min-width: 3rem;
}
}

@media (min-width:37.5rem) {
.c20 {
min-width: 3rem;
}
}

@media (min-width:80rem) {
.c20 {
min-width: 3rem;
}
}

Expand Down Expand Up @@ -807,7 +872,7 @@ exports[`MostReadContainerCanonical Assertion should render most read correctly
class="c11"
>
<div
class="c18"
class="c20"
dir="rtl"
>
<span
Expand Down
Loading