Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3237 from bbc/most-read-ie-fix
Browse files Browse the repository at this point in the history
Most Read IE11 Fix
  • Loading branch information
HarveyPeachey authored Mar 10, 2020
2 parents 970577c + e632554 commit 3e46582
Show file tree
Hide file tree
Showing 6 changed files with 436 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/components/psammead-most-read/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 4.0.1 | [PR#3237](https://github.com/bbc/psammead/pull/3237) Fixed most-read IE layout bug |
| 4.0.0 | [PR#3201](https://github.com/bbc/psammead/pull/3201) Refactor RankWrapper in MostRead |
| 3.0.0 | [PR#3200](https://github.com/bbc/psammead/pull/3200) Show OneColumn in MostRead for all breakpoints for STY Pages |
| 2.0.3 | [PR#3219](https://github.com/bbc/psammead/pull/3219) Talos - Bump Dependencies - @bbc/psammead-grid |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-most-read/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/components/psammead-most-read/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-most-read",
"version": "4.0.0",
"version": "4.0.1",
"description": "A component for the most read item",
"main": "dist/index.js",
"module": "esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,54 @@ exports[`MostReadItemWrapper should render ltr correctly with 10 items 1`] = `
padding: 0;
}

@media (max-width:14.9375rem) {
.c0 {
width: calc(100%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c0 {
width: calc(100%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c0 {
width: calc(100%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:37.5rem) and (max-width:62.9375rem) {
.c0 {
width: calc(50%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:63rem) and (max-width:79.9375rem) {
.c0 {
width: calc(50%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:80rem) {
.c0 {
width: calc(20%);
display: inline-block;
vertical-align: top;
}
}

@supports (display:grid) {
.c0 {
display: block;
Expand Down Expand Up @@ -711,6 +759,54 @@ exports[`MostReadItemWrapper should render rtl correctly with 10 items 1`] = `
padding: 0;
}

@media (max-width:14.9375rem) {
.c0 {
width: calc(100%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:15rem) and (max-width:24.9375rem) {
.c0 {
width: calc(100%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:25rem) and (max-width:37.4375rem) {
.c0 {
width: calc(100%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:37.5rem) and (max-width:62.9375rem) {
.c0 {
width: calc(50%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:63rem) and (max-width:79.9375rem) {
.c0 {
width: calc(50%);
display: inline-block;
vertical-align: top;
}
}

@media (min-width:80rem) {
.c0 {
width: calc(20%);
display: inline-block;
vertical-align: top;
}
}

@supports (display:grid) {
.c0 {
display: block;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-most-read/src/Item/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const StyledGrid = styled(Grid).attrs({
export const MostReadItemWrapper = ({ dir, children, columnLayout }) => (
<StyledGrid
{...mostReadItemGridProps(columnLayout)}
parentColumns={mostReadListGridProps.columns} // parentColumns is required here because on IE, this component would be rendered before it's parent therefore not receiving the parent's grid columns values so we have to explicitly pass it as a prop here so it works on IE
parentColumns={mostReadListGridProps(columnLayout).columns} // parentColumns is required here because on IE, this component would be rendered before it's parent therefore not receiving the parent's grid columns values so we have to explicitly pass it as a prop here so it works on IE
dir={dir}
forwardedAs="li"
>
Expand Down
Loading

0 comments on commit 3e46582

Please sign in to comment.