Skip to content

Commit fa7f026

Browse files
committed
fix: refine mobile workspace footer layout
1 parent 1d61499 commit fa7f026

3 files changed

Lines changed: 84 additions & 7 deletions

File tree

packages/web/src/styles/components.css

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13174,12 +13174,13 @@ textarea.input {
1317413174
.mobile-shell__bottom-stack > .workspace-status-bar {
1317513175
width: 100%;
1317613176
align-self: stretch;
13177+
flex-wrap: wrap;
13178+
gap: 0;
1317713179
border: none;
1317813180
border-top: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
1317913181
border-radius: 0;
1318013182
background: transparent;
13181-
padding: 0 calc(var(--mobile-safe-right) + var(--sp-4))
13182-
calc(var(--mobile-safe-bottom) + var(--sp-1)) calc(var(--mobile-safe-left) + var(--sp-4));
13183+
padding: 0 0 calc(var(--mobile-safe-bottom) + var(--sp-1));
1318313184
box-shadow: none;
1318413185
}
1318513186

@@ -13232,6 +13233,7 @@ textarea.input {
1323213233
}
1323313234

1323413235
.mobile-shell__bottom-stack .git-panel-status-strip {
13236+
width: 100%;
1323513237
gap: 8px;
1323613238
min-height: 28px;
1323713239
font-size: var(--type-body-6-size);
@@ -13241,24 +13243,50 @@ textarea.input {
1324113243

1324213244
.mobile-shell__bottom-stack .workspace-status-bar__left {
1324313245
flex: 1 1 auto;
13246+
padding: 0 calc(var(--mobile-safe-right) + var(--sp-4)) 0
13247+
calc(var(--mobile-safe-left) + var(--sp-4));
1324413248
}
1324513249

1324613250
.mobile-shell__bottom-stack .workspace-status-bar__right {
13247-
flex: 0 1 auto;
13248-
max-width: 46%;
13251+
flex: 0 0 100%;
13252+
width: 100%;
13253+
max-width: none;
13254+
justify-content: flex-end;
13255+
margin-left: 0;
13256+
padding: 0 calc(var(--mobile-safe-right) + var(--sp-4)) 0
13257+
calc(var(--mobile-safe-left) + var(--sp-4));
13258+
border-top: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
13259+
}
13260+
13261+
.mobile-shell__bottom-stack .workspace-status-bar__right:empty {
13262+
display: none;
1324913263
}
1325013264

1325113265
.mobile-shell__bottom-stack .git-panel-status-strip__left {
13266+
width: 100%;
1325213267
gap: 4px;
13268+
justify-content: space-between;
1325313269
}
1325413270

1325513271
.mobile-shell__bottom-stack .git-panel-status-strip__branch,
1325613272
.mobile-shell__bottom-stack .git-panel-status-strip__meta {
1325713273
gap: 4px;
1325813274
}
1325913275

13276+
.mobile-shell__bottom-stack .git-panel-status-strip__meta {
13277+
margin-left: auto;
13278+
justify-content: flex-end;
13279+
}
13280+
1326013281
.mobile-shell__bottom-stack .footer-update-rail {
13282+
width: 100%;
13283+
flex-wrap: wrap;
1326113284
gap: 4px;
13285+
justify-content: flex-end;
13286+
}
13287+
13288+
.mobile-shell__bottom-stack .footer-update-rail__text {
13289+
white-space: normal;
1326213290
}
1326313291

1326413292
.mobile-shell__bottom-stack .git-panel-status-strip__branch .themed-icon svg,

packages/web/src/styles/components.theme.test.ts

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,6 +2016,28 @@ describe("components.css theme-sensitive surfaces", () => {
20162016
const statusStrip = getLastRuleBlock(
20172017
".mobile-shell__bottom-stack .git-panel-status-strip"
20182018
).replace(/\s+/g, " ");
2019+
const statusLeft = getLastRuleBlock(
2020+
".mobile-shell__bottom-stack .workspace-status-bar__left"
2021+
).replace(/\s+/g, " ");
2022+
const statusStripLeft = getLastRuleBlock(
2023+
".mobile-shell__bottom-stack .git-panel-status-strip__left"
2024+
).replace(/\s+/g, " ");
2025+
const statusMeta = getLastRuleBlock(
2026+
".mobile-shell__bottom-stack .git-panel-status-strip__meta"
2027+
).replace(/\s+/g, " ");
2028+
const statusRight = getLastRuleBlock(
2029+
".mobile-shell__bottom-stack .workspace-status-bar__right"
2030+
).replace(/\s+/g, " ");
2031+
const statusRightEmpty = getLastRuleBlock(
2032+
".mobile-shell__bottom-stack .workspace-status-bar__right:empty"
2033+
).replace(/\s+/g, " ");
2034+
const updateRail = getLastRuleBlock(".mobile-shell__bottom-stack .footer-update-rail").replace(
2035+
/\s+/g,
2036+
" "
2037+
);
2038+
const updateRailText = getLastRuleBlock(
2039+
".mobile-shell__bottom-stack .footer-update-rail__text"
2040+
).replace(/\s+/g, " ");
20192041
const emptyPane = getLastRuleBlock(".mobile-shell__empty-content");
20202042
const emptyState = getLastRuleBlock(".mobile-shell__empty-state");
20212043
const emptyTitle = getLastRuleBlock(".mobile-shell__empty-title");
@@ -2049,12 +2071,34 @@ describe("components.css theme-sensitive surfaces", () => {
20492071
expect(dockItem).toContain("height: 36px");
20502072
expect(dockItem).toContain("padding: 1px var(--sp-2) 0");
20512073
expect(dockLabel).toContain("font-size: var(--type-body-6-size)");
2052-
expect(statusBar).toContain(
2053-
"padding: 0 calc(var(--mobile-safe-right) + var(--sp-4)) calc(var(--mobile-safe-bottom) + var(--sp-1)) calc(var(--mobile-safe-left) + var(--sp-4))"
2054-
);
2074+
expect(statusBar).toContain("padding: 0 0 calc(var(--mobile-safe-bottom) + var(--sp-1))");
20552075
expect(statusBar).toContain("border-top: 1px solid");
2076+
expect(statusBar).toContain("flex-wrap: wrap");
2077+
expect(statusBar).toContain("gap: 0");
20562078
expect(statusStrip).toContain("min-height: 28px");
2079+
expect(statusStrip).toContain("width: 100%");
20572080
expect(statusStrip).toContain("font-size: var(--type-body-6-size)");
2081+
expect(statusLeft).toContain(
2082+
"padding: 0 calc(var(--mobile-safe-right) + var(--sp-4)) 0 calc(var(--mobile-safe-left) + var(--sp-4))"
2083+
);
2084+
expect(statusStripLeft).toContain("width: 100%");
2085+
expect(statusStripLeft).toContain("justify-content: space-between");
2086+
expect(statusMeta).toContain("margin-left: auto");
2087+
expect(statusMeta).toContain("justify-content: flex-end");
2088+
expect(statusRight).toContain("flex: 0 0 100%");
2089+
expect(statusRight).toContain("width: 100%");
2090+
expect(statusRight).toContain("max-width: none");
2091+
expect(statusRight).toContain("justify-content: flex-end");
2092+
expect(statusRight).toContain("margin-left: 0");
2093+
expect(statusRight).toContain(
2094+
"padding: 0 calc(var(--mobile-safe-right) + var(--sp-4)) 0 calc(var(--mobile-safe-left) + var(--sp-4))"
2095+
);
2096+
expect(statusRight).toContain("border-top: 1px solid");
2097+
expect(statusRightEmpty).toContain("display: none");
2098+
expect(updateRail).toContain("width: 100%");
2099+
expect(updateRail).toContain("flex-wrap: wrap");
2100+
expect(updateRail).toContain("justify-content: flex-end");
2101+
expect(updateRailText).toContain("white-space: normal");
20582102
expect(emptyPane).toContain("position: relative");
20592103
expect(emptyPane).toContain("width: min(100%, 320px)");
20602104
expect(emptyPane).toContain("align-self: flex-start");

packages/web/src/ui-preview/catalog.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ describe("UI preview catalog", () => {
357357
expect(await screen.findByText("New version detected v0.5.0")).toBeInTheDocument();
358358
expect(screen.getByRole("button", { name: /update now/i })).toBeInTheDocument();
359359
expect(document.querySelector(".footer-update-rail-review.mobile-shell")).toBeTruthy();
360+
expect(
361+
document.querySelector(
362+
".mobile-shell__bottom-stack .workspace-status-bar__right .footer-update-rail"
363+
)
364+
).toBeTruthy();
360365
});
361366

362367
it("renders the footer update confirm review scene with the post-click confirmation dialog", async () => {

0 commit comments

Comments
 (0)