Skip to content

Commit f485292

Browse files
authored
Merge pull request #1739 from GetStream/mads/flip-gallery-rendering
refactor: change the direction gallery thumbnails are rendered
2 parents eb9a3d8 + 0fdb44d commit f485292

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package/src/components/Attachment/__tests__/Gallery.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ describe('Gallery', () => {
248248
const { queryAllByTestId } = render(component);
249249

250250
await waitFor(() => {
251-
expect(queryAllByTestId('gallery-column-0').length).toBe(1);
252-
expect(queryAllByTestId('gallery-column-1').length).toBe(1);
251+
expect(queryAllByTestId('gallery-row-0').length).toBe(1);
252+
expect(queryAllByTestId('gallery-row-1').length).toBe(1);
253253

254-
expect(queryAllByTestId('gallery-column-0-item-0').length).toBe(1);
255-
expect(queryAllByTestId('gallery-column-0-item-1').length).toBe(1);
256-
expect(queryAllByTestId('gallery-column-1-item-0').length).toBe(1);
257-
expect(queryAllByTestId('gallery-column-1-item-1').length).toBe(1);
254+
expect(queryAllByTestId('gallery-row-0-item-0').length).toBe(1);
255+
expect(queryAllByTestId('gallery-row-0-item-1').length).toBe(1);
256+
expect(queryAllByTestId('gallery-row-1-item-0').length).toBe(1);
257+
expect(queryAllByTestId('gallery-row-1-item-1').length).toBe(1);
258258
});
259259
});
260260

package/src/components/Attachment/utils/buildGallery/buildGallery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function buildGallery<
7171
[1, 1],
7272
],
7373
images: images.slice(0, 4),
74-
invertedDirections: false,
74+
invertedDirections: true,
7575
sizeConfig,
7676
});
7777
}

0 commit comments

Comments
 (0)