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

New Desktop Layout #5139

Merged
merged 232 commits into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
4ce9ee9
Add dir prop to grid to fix RTL layouts
sareh Jan 14, 2020
e44df8d
Initial storySplitter
AlistairGempf Jan 22, 2020
b8ffeb2
Update some naming as per feedback
AlistairGempf Jan 22, 2020
024367b
Also export getAllowedItems
AlistairGempf Jan 22, 2020
881e4c6
Merge branch 'latest' into use-grid-front-page-layout
AlistairGempf Jan 22, 2020
2c189b2
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 22, 2020
2e3d0f7
Add grid column values with storybook examples
AlistairGempf Jan 23, 2020
67c010e
Merge branch 'latest' into use-grid-front-page-layout
AlistairGempf Jan 23, 2020
b050108
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 23, 2020
9f774d1
Create new FrontPageStoryRows container
AlistairGempf Jan 23, 2020
208daf4
Add tests
AlistairGempf Jan 23, 2020
1a105fa
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Jan 23, 2020
5c65b34
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Jan 23, 2020
57a5e52
Bump story promo to latest version
DenisHdz Jan 23, 2020
8f69a01
Pass promoType prop
DenisHdz Jan 23, 2020
4c7fcae
Update snapshots
DenisHdz Jan 23, 2020
8429656
Fix storybook bug
AlistairGempf Jan 23, 2020
05d261c
Add top and leading stories
DenisHdz Jan 23, 2020
8d476e4
Increase bundle threshold
DenisHdz Jan 23, 2020
47c247e
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 23, 2020
c13f353
Update api to be consistent across rows
AlistairGempf Jan 23, 2020
4839172
Layout front page as hoped
AlistairGempf Jan 24, 2020
19ef344
Remove superfluous storyTypes
AlistairGempf Jan 24, 2020
14a96b6
Fix noImageRows
AlistairGempf Jan 24, 2020
01487d5
Add margins to group4
AlistairGempf Jan 24, 2020
44792d8
Fix storybook
AlistairGempf Jan 24, 2020
930766d
Start fixing tests
AlistairGempf Jan 24, 2020
1696afb
Update stories and tests to work with fixture data
AlistairGempf Jan 27, 2020
ac2aaa5
Update test section number to a valid section to render 2 stories
AlistairGempf Jan 27, 2020
f4ee30e
Fix lazyloading logic
AlistairGempf Jan 27, 2020
db9498f
Fix tests, need five to render a first section with multiple stories
AlistairGempf Jan 27, 2020
69e6be3
🐊 snap snap 🐊
AlistairGempf Jan 27, 2020
7e05496
Move a test helper into the testhelper file
AlistairGempf Jan 27, 2020
485288c
Rename isSingleStory -> sectionHasSingleStory
AlistairGempf Jan 27, 2020
bd7fc4d
Add comments to the rowTypes file
AlistairGempf Jan 27, 2020
34cadd9
Rename rowType -> rowComponent and rowTypes -> rowDetails depending o…
AlistairGempf Jan 27, 2020
e3f362a
Rename TopRow -> FirstRow when not talking specifically about a TopRo…
AlistairGempf Jan 27, 2020
33743e6
Improve the comment on the getRowDetails function
AlistairGempf Jan 27, 2020
b5879a6
Add comment about storyRow API
AlistairGempf Jan 27, 2020
0542cc2
Add promotype to optional to improve functions readability
AlistairGempf Jan 27, 2020
e818180
Add no image row story
AlistairGempf Jan 28, 2020
b2c351b
Prevent the first story from being a radio bulletin
AlistairGempf Jan 28, 2020
84bdcd6
Merge branch 'latest' of https://github.com/bbc/simorgh into use-grid…
AlistairGempf Jan 28, 2020
f073f56
Snapshots
AlistairGempf Jan 28, 2020
8b75164
Merge branch 'use-grid-front-page-layout' into use-grid-front-page-la…
AlistairGempf Jan 28, 2020
05e0719
Snapshots
AlistairGempf Jan 28, 2020
76cd452
Snapshots
AlistairGempf Jan 28, 2020
4e0cb61
Merge branch 'use-grid-front-page-layout' into use-grid-front-page-la…
AlistairGempf Jan 28, 2020
c235281
Bundle sizes
AlistairGempf Jan 28, 2020
634f4b9
Merge branch 'latest' of https://github.com/bbc/simorgh into use-grid…
AlistairGempf Jan 28, 2020
d6ec9f7
Pass dir prop to single story
AlistairGempf Jan 28, 2020
ffa0162
Merge branch 'use-grid-front-page-layout' into use-grid-front-page-la…
AlistairGempf Jan 28, 2020
462ff49
rowComponent -> RowComponent
AlistairGempf Jan 29, 2020
7ac0316
Merge branch 'latest' into use-grid-front-page-layout
AlistairGempf Jan 29, 2020
a242e87
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 29, 2020
6d07f93
Merge branch 'latest' into use-grid-front-page-layout
AlistairGempf Jan 29, 2020
aca6c4a
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 29, 2020
9fab460
Update to remove placeholder image
AlistairGempf Jan 29, 2020
f89338f
Add example radio bulletin with no image in igbo data
AlistairGempf Jan 29, 2020
ba884d1
Merge branch 'latest' of https://github.com/bbc/simorgh into use-grid…
AlistairGempf Jan 29, 2020
1d4263b
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 29, 2020
7520b71
Merge branch 'use-grid-front-page-layout' into use-grid-front-page-la…
AlistairGempf Jan 29, 2020
7979c4a
Merge pull request #5278 from bbc/use-grid-front-page-layout-test-con…
AlistairGempf Jan 29, 2020
0a90889
Merge branch 'latest' into use-grid-front-page-layout
AlistairGempf Jan 29, 2020
77dbd7f
Use promoHasImage prop of summary and headline
AlistairGempf Jan 29, 2020
2d19322
Merge branch 'latest' into use-grid-front-page-layout
sareh Jan 29, 2020
26ace04
Use latest @bbc/psammead-story-promo & @bbc/psammead-story-promo-list
sareh Jan 29, 2020
b1878ac
Add more stories into Top stories overflow
sareh Jan 29, 2020
180cb2e
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Jan 30, 2020
0fa18c4
Update row without images to match expected styling
AlistairGempf Jan 30, 2020
8caf134
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 30, 2020
88bed6d
Update snapshots related to updating the story-promo & story-promo-list
sareh Jan 30, 2020
679355d
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 30, 2020
45330d1
Update snapshot
AlistairGempf Jan 30, 2020
fd8d501
Bump bulletin package
DenisHdz Jan 30, 2020
fdf61a0
Fix conflicts
DenisHdz Jan 30, 2020
a850070
Update snapshots
DenisHdz Jan 30, 2020
0c2c28a
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Jan 30, 2020
6208e1f
Bump psammead-assets and psammead-styles
DenisHdz Jan 30, 2020
0067e93
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Jan 30, 2020
2f51778
Remove duplicate packages
DenisHdz Jan 30, 2020
ad4dd55
FrontPageGrid to go up to 1008px as per UX suggestion
AlistairGempf Jan 31, 2020
87d1ad9
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Jan 31, 2020
ea6b8e1
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Jan 31, 2020
9a5d4cc
Update story
AlistairGempf Jan 31, 2020
bf5b9b8
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Jan 31, 2020
9a06ed7
Merge branch 'latest' into use-grid-front-page-layout
AlistairGempf Jan 31, 2020
914de24
Only render list if we are showing more than a single story in the se…
sareh Feb 3, 2020
832dfaa
Add TV bulletin and Radio bulletin to urdu front page
sareh Feb 3, 2020
1263dfc
Add items to AV stories live group after the TV bulletin
sareh Feb 3, 2020
70a6073
Remove TV Bulletins if not in AV Live Streams group
sareh Feb 4, 2020
a7c6aff
Merge branch 'latest' into 'use-grid-front-page-layout'
sareh Feb 4, 2020
c775065
Merge branch 'latest' into 'use-grid-front-page-layout'
sareh Feb 4, 2020
394905d
Refactor renderPromoList function as per Code Climate suggestion
DenisHdz Feb 4, 2020
cbecc45
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 4, 2020
3a5bff0
Fix conflicts
DenisHdz Feb 4, 2020
3285321
Refactor story splitter tests as per Code Climate suggestion
DenisHdz Feb 4, 2020
b2e0d46
Revert last change
DenisHdz Feb 4, 2020
9a5b453
Bump story promo dependency
DenisHdz Feb 4, 2020
98be08a
Update snapshots
DenisHdz Feb 4, 2020
3592599
Fix conflicts
DenisHdz Feb 4, 2020
866f579
Update package-lock.json
DenisHdz Feb 4, 2020
6481c41
Refactor story splitter test to have just two loops
DenisHdz Feb 5, 2020
d6bc28d
Bump psammead-section-label and psammead-story-promo-list versions
DenisHdz Feb 5, 2020
6ecdf60
Remove StoryPromoLi bulletin styling
DenisHdz Feb 6, 2020
838372c
Bump psammead-story-promo-list version
DenisHdz Feb 6, 2020
e684bb0
Update snapshots
DenisHdz Feb 6, 2020
12a330e
Fix conflicts
DenisHdz Feb 6, 2020
9291c32
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 6, 2020
eacf81d
Increase bundlesize max threshold
DenisHdz Feb 6, 2020
0c1e149
Merge branch 'latest' into use-grid-front-page-layout
sareh Feb 7, 2020
1d87b35
Remove startoffsets since identical to default values
sareh Feb 7, 2020
f1fcc87
Fix first section top margin
DenisHdz Feb 7, 2020
1f166bd
Refactor code
sareh Feb 7, 2020
47077bd
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 7, 2020
f5f83a7
Merge branch 'latest' into use-grid-front-page-layout
sareh Feb 7, 2020
8cd9d5c
Add more unit tests for promos and rows
sareh Feb 7, 2020
304d379
Fix top margin between section label and promos
DenisHdz Feb 7, 2020
cbe91fb
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 7, 2020
df019e0
Remove Igbo second tv bulletin promo
DenisHdz Feb 10, 2020
6c47eb0
Update snapshots
DenisHdz Feb 10, 2020
9bd6101
Pass parentColumns prop from FrontPageSection to FrontPageStoryRows G…
sareh Feb 10, 2020
b9204bc
Pass parentEnableGelGutters boolean value to Grid items in FrontPageS…
sareh Feb 10, 2020
404d9c8
Add comment
sareh Feb 10, 2020
1a8366f
Merge branch 'latest' into use-grid-front-page-layout
sareh Feb 10, 2020
e751564
Increase bundle threshold
DenisHdz Feb 10, 2020
cec5696
Remove use of Grid item for TopRow since it is currently just a singl…
sareh Feb 10, 2020
3a6fe26
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
sareh Feb 10, 2020
05dbbc3
Merge branch 'latest' into use-grid-front-page-layout
sareh Feb 10, 2020
26bc5d7
Revert commit cec56966cb09558696a527bd0b18cc86905c6f3e - TopRow shoul…
sareh Feb 10, 2020
fb029b1
Ensure TopRow only returns a div wrapping the promo if sectionHasSing…
sareh Feb 10, 2020
d186843
Remove extra wrapping div
sareh Feb 10, 2020
08e20f2
Bump psammead story promo, media indicator and grid packages
DenisHdz Feb 10, 2020
be9819c
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 10, 2020
6cac644
Integrate new Media Indicator
DenisHdz Feb 10, 2020
94e67ec
Update comments and refactors
DenisHdz Feb 11, 2020
87643d7
Fix conflicts
DenisHdz Feb 11, 2020
85f46d4
Include temporary commit to point to use Test data - should be revert…
sareh Feb 11, 2020
49a1594
Remove isBulletin prop from the Grid elements used in FrontPageStoryRows
DenisHdz Feb 11, 2020
5510dfc
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 11, 2020
b654961
Remove empty line
DenisHdz Feb 11, 2020
92c8129
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 11, 2020
499fa42
Refactor helper functions and tests
DenisHdz Feb 11, 2020
fd78c6b
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 12, 2020
10c8ff4
Pass in dir to MediaIndicator
sareh Feb 12, 2020
594c017
Use psammead-story-promo@4.0.0-alpha.9 & psammead-story-promo-list@4.0.2
sareh Feb 12, 2020
1d19f7d
Use @bbc/psammead-media-indicator@4.0.2
sareh Feb 12, 2020
e85c20d
Bump packages
DenisHdz Feb 12, 2020
77ce980
Update snapshots
DenisHdz Feb 12, 2020
23c7934
Fix conflicts
DenisHdz Feb 12, 2020
804833e
Update snapshots conflicts
DenisHdz Feb 12, 2020
4f9a09c
Merge branch 'latest' into 'use-grid-front-page-layout'
sareh Feb 12, 2020
d4af2b0
Increase the bundle max size again
DenisHdz Feb 12, 2020
4c3909b
Fix conflicts
DenisHdz Feb 12, 2020
4433164
Surprise! Another bundle increase
DenisHdz Feb 12, 2020
f9a1c45
Increase the bundle max size again
DenisHdz Feb 12, 2020
3e59a83
Reorder props
DenisHdz Feb 12, 2020
bcb54b6
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 13, 2020
eaef7bd
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 13, 2020
f8c3752
Merge branch 'latest' into 'use-grid-front-page-layout'
sareh Feb 13, 2020
af7110a
Update image resolutions for StoryPromo and Bulletin images - 480px->…
sareh Feb 13, 2020
e3e5733
Update snapshot
sareh Feb 13, 2020
820f7a2
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Feb 13, 2020
68bd54d
Use inline media indicators without duration
AlistairGempf Feb 13, 2020
66ae3cb
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Feb 13, 2020
e93a6a3
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 13, 2020
405dcd7
Bump psammead-story-promo
DenisHdz Feb 13, 2020
ab66cf0
Bump gel-foundations
DenisHdz Feb 13, 2020
968ae83
Remove duplicates
DenisHdz Feb 13, 2020
a60be3d
Bump more packages
DenisHdz Feb 13, 2020
5950c31
Merge branch 'latest' into use-grid-front-page-layout
EinsteinNjoroge Feb 14, 2020
854dcd3
Fix conflicts
DenisHdz Feb 17, 2020
ebc8764
Export StyledFrontPageMain from Grid component for use in FrontPageMa…
sareh Feb 17, 2020
3383bf4
Update snapshot
sareh Feb 17, 2020
92da139
Apply CR feedback
DenisHdz Feb 17, 2020
b16f496
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 17, 2020
3d5d1a9
Replace ramda imports
DenisHdz Feb 17, 2020
a198dad
Bump packages versions
DenisHdz Feb 17, 2020
1661b56
Use raw JS slice rather than ramda take
AlistairGempf Feb 17, 2020
8b3bdc7
Update snapshots
DenisHdz Feb 17, 2020
ccf3af2
Remove old Grid test
DenisHdz Feb 17, 2020
ef5bb5e
Replace ramda splitAt with raw JS slice
AlistairGempf Feb 17, 2020
e22fdce
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 17, 2020
626abf6
Remove grid snapshot
AlistairGempf Feb 17, 2020
5818dc0
Replace ramda isEmpty and isNil with simple JS versions
AlistairGempf Feb 17, 2020
db33125
Fix conflicts
DenisHdz Feb 17, 2020
3ffb141
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 17, 2020
6f30e22
Address CR comments
AlistairGempf Feb 17, 2020
7e707ab
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 17, 2020
2ca98b6
Merge branch 'latest' into use-grid-front-page-layout
sareh Feb 18, 2020
69eaff8
Fix conflicts
DenisHdz Feb 19, 2020
4882fe1
Merge branch 'use-grid-front-page-layout' of github.com:bbc/simorgh i…
DenisHdz Feb 19, 2020
dafd40d
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Feb 19, 2020
9e92ff8
Check for unrenderable StoryPromos before trying to render them
AlistairGempf Feb 19, 2020
eeca589
Add space before the visually hidden Live text
DenisHdz Feb 19, 2020
388602f
Move all business logic filters into utility
AlistairGempf Feb 19, 2020
de85804
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 19, 2020
ed22928
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 19, 2020
62589ff
Update snapshots
DenisHdz Feb 19, 2020
8192839
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 19, 2020
7186420
Test RadioBulletin filtering
AlistairGempf Feb 19, 2020
450d0ec
Test removeTVBulletinsIfNotAVLiveStream
AlistairGempf Feb 19, 2020
1e83e88
Test removeItemsWithoutUrlOrHeadline
AlistairGempf Feb 19, 2020
d2a487b
Do not display the duration in the headlines of the promos without image
DenisHdz Feb 19, 2020
139c043
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 19, 2020
a0895d3
Move getStoryPromoInfo into a utility to be shared across FrontPageSe…
AlistairGempf Feb 19, 2020
f1205b4
Fix conflicts
DenisHdz Feb 19, 2020
8b4e5e5
Clean up filterAllowedItems test a bit
AlistairGempf Feb 19, 2020
b6dec1c
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
AlistairGempf Feb 19, 2020
1ae7fad
Bump Story Promo package to the stable version
DenisHdz Feb 20, 2020
50f6452
Update snapshots
DenisHdz Feb 20, 2020
aa071aa
Fix conflicts
DenisHdz Feb 21, 2020
6f9db0d
Fix conflicts
DenisHdz Feb 21, 2020
599056d
Merge branch 'latest' of github.com:bbc/simorgh into use-grid-front-p…
DenisHdz Feb 21, 2020
c588500
Bump some packages and update snapshots
DenisHdz Feb 21, 2020
272f344
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Feb 21, 2020
0fe486d
Ensure dir is passed to StoryPromo
sareh Feb 21, 2020
65934bb
Pass down dir as a prop
sareh Feb 21, 2020
fde8945
Merge remote-tracking branch 'origin' into use-grid-front-page-layout
sareh Feb 24, 2020
1ef3919
Update spacing as a result of UX feedback
sareh Feb 24, 2020
1eadd7c
resolve conflicts
Feb 24, 2020
caf24e7
update snapshots
Feb 24, 2020
68abedd
Merge branch 'use-grid-front-page-layout' of https://github.com/bbc/s…
Feb 24, 2020
e39b098
changed margins to padding for consistency
Feb 24, 2020
d1d805f
update snapshot
Feb 24, 2020
be1f811
Update srcset for story promo and bulletin promo
sareh Feb 24, 2020
3e4026f
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Feb 25, 2020
fc6194c
Merge branch 'latest' into use-grid-front-page-layout
DenisHdz Feb 25, 2020
9bcf823
Increase bundle size threshold
sareh Feb 25, 2020
e2d7aa8
Increase bundle size threshold
sareh Feb 25, 2020
a8745f8
Remove extra story
sareh Feb 25, 2020
977788c
Remove files added via merge
sareh Feb 25, 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
4 changes: 3 additions & 1 deletion src/app/containers/FrontPageMain/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const startOffsets = {

const FrontPageMain = ({ frontPageData }) => {
const {
dir,
product,
serviceLocalizedName,
translations,
Expand Down Expand Up @@ -80,10 +81,11 @@ const FrontPageMain = ({ frontPageData }) => {
<VisuallyHiddenText id="content" tabIndex="-1" as="h1">
{offScreenText}
</VisuallyHiddenText>
<FrontPageGrid columns={mainColumns} enableGelGutters>
<FrontPageGrid columns={mainColumns} dir={dir} enableGelGutters>
<Grid
item
columns={itemColumns}
dir={dir}
startOffset={startOffsets}
margins={itemMargins}
>
Expand Down
41 changes: 41 additions & 0 deletions src/app/containers/FrontPageSection/utilities/storySplitter.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { splitEvery, splitAt, take } from 'ramda';

export const getAllowedItems = (items, isFirstSection) =>
isFirstSection ? take(13, items) : take(10, items);
DenisHdz marked this conversation as resolved.
Show resolved Hide resolved

// Split the top row stories out into their own list
const splitTopRow = (items, isFirstSection) => {
// First section always has a single top story
if (isFirstSection || items.length % 4 === 1) {
return splitAt(1, items);
}
if (items.length % 4 > 1) {
return splitAt(2, items);
}
return splitAt(0, items);
};

// Split into fours and make sure slices only go through if a four
const splitStandardRows = items =>
splitEvery(4, items).filter(itemList => itemList.length === 4);

// Anything beyond the first 2 fours goes into an imageless slice
const splitNoImageRow = standardSlices => splitAt(2, standardSlices);

export const getRows = (items, isFirstSection) => {
const allowedItems = getAllowedItems(items, isFirstSection);
DenisHdz marked this conversation as resolved.
Show resolved Hide resolved

const [topRow, unsplitregularItems] = splitTopRow(
allowedItems,
isFirstSection,
);
const [regularRows, [noImageRow]] = splitNoImageRow(
splitStandardRows(unsplitregularItems),
);

return {
topRow,
regularRows,
noImageRow: noImageRow || [],
};
};
Loading