fix: address mobile board review
This commit is contained in:
1 parent
92c6e4668d
commit
866b3ab78b
3 files changed
+22
-17
No files matched your search
@@ -1,5 +1,8 @@
|
|||||||
.grid {
|
.container {
|
||||||
container-type: inline-size;
|
container-type: inline-size;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(var(--mobile-column-count), minmax(0, 1fr));
|
grid-template-columns: repeat(var(--mobile-column-count), minmax(0, 1fr));
|
||||||
grid-auto-flow: row;
|
grid-auto-flow: row;
|
||||||
|
|||||||
@@ -32,21 +32,23 @@ export const MobileBoard = () => {
|
|||||||
refs: { wrapper: wrapperRef, items: itemRefs, gridstack: gridstackRef },
|
refs: { wrapper: wrapperRef, items: itemRefs, gridstack: gridstackRef },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box ref={wrapperRef} className={classes.container}>
|
||||||
className={classes.grid}
|
<Box
|
||||||
style={{ "--mobile-column-count": mobileColumnCount } as CSSProperties}
|
className={classes.grid}
|
||||||
data-mobile-board
|
style={{ "--mobile-column-count": mobileColumnCount } as CSSProperties}
|
||||||
>
|
data-mobile-board
|
||||||
{items.map((item) => (
|
>
|
||||||
<Box
|
{items.map((item) => (
|
||||||
key={item.id}
|
<Box
|
||||||
className={classes.item}
|
key={item.id}
|
||||||
style={{ gridColumn: `span ${item.width}`, gridRow: `span ${item.height}` }}
|
className={classes.item}
|
||||||
data-mobile-board-item={item.id}
|
style={{ gridColumn: `span ${item.width}`, gridRow: `span ${item.height}` }}
|
||||||
>
|
data-mobile-board-item={item.id}
|
||||||
<BoardItemContent item={item} />
|
>
|
||||||
</Box>
|
<BoardItemContent item={item} />
|
||||||
))}
|
</Box>
|
||||||
|
))}
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</SectionProvider>
|
</SectionProvider>
|
||||||
</ReadOnlyEditModeProvider>
|
</ReadOnlyEditModeProvider>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ describe("automatic mobile layout upgrade default", () => {
|
|||||||
test.each([
|
test.each([
|
||||||
{ boardId: "board", name: "Phone", breakpoint: 0 },
|
{ boardId: "board", name: "Phone", breakpoint: 0 },
|
||||||
{ boardId: "board", name: "Base", breakpoint: 480 },
|
{ boardId: "board", name: "Base", breakpoint: 480 },
|
||||||
])("preserves legacy mode for a noncanonical saved layout", (existingLayout) => {
|
])("preserves legacy mode for a noncanonical saved layout $name/$breakpoint", (existingLayout) => {
|
||||||
expect(shouldEnableAutomaticMobileLayoutForUpgrade([existingLayout])).toBe(false);
|
expect(shouldEnableAutomaticMobileLayoutForUpgrade([existingLayout])).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user