Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Rework export layout

Bitti33e3018be56e
diff --git a/src/components/workspace/ExportView.test.tsx b/src/components/workspace/ExportView.test.tsx
index e1f838e..c253239 100644
--- a/src/components/workspace/ExportView.test.tsx
+++ b/src/components/workspace/ExportView.test.tsx
@@ -102,11 +102,13 @@ describe("the export view where nothing can encode", () => {
path, the size, the codec and the compositor. */
describe("the shape of the export screen", () => {
it("names its two panels after what they hold", () => {
- render(<ExportView config={project([clip("a", 0, 2_000)])} folderPath="/tmp/project" />);
+ const { container } = render(<ExportView config={project([clip("a", 0, 2_000)])} folderPath="/tmp/project" />);
expect(screen.getByRole("heading", { name: "Video" })).toBeTruthy();
expect(screen.getByRole("heading", { name: "Settings" })).toBeTruthy();
expect(screen.queryByRole("heading", { name: "Preview" })).toBeNull();
expect(screen.queryByRole("heading", { name: "Export Settings" })).toBeNull();
+ expect(screen.queryByRole("heading", { name: "What this export will be" })).toBeNull();
+ expect(container.querySelector(".export-details > .export-summary")).toBeTruthy();
});
it("gives the estimated size as a size and nothing else", () => {
diff --git a/src/components/workspace/ExportView.tsx b/src/components/workspace/ExportView.tsx
index 98a38bf..abe27ef 100644
--- a/src/components/workspace/ExportView.tsx
+++ b/src/components/workspace/ExportView.tsx
@@ -435,8 +435,9 @@ export function ExportView({ config, folderPath }: { config: ProjectConfig; fold
</label>
</div>
+ </section>
- <h2>What this export will be</h2>
+ <section className="export-details" aria-label="Export details">
<dl className="export-summary">
{summary.map(([term, value, detail]) => <div key={term}>
<dt>{term}</dt>
diff --git a/src/styles/export.css b/src/styles/export.css
index c49015b..129acf2 100644
--- a/src/styles/export.css
+++ b/src/styles/export.css
@@ -85,25 +85,33 @@
/* --- Layout ---------------------------------------------------------------- */
-/* Two panels of the same width, and — because they stretch rather than sit at
- their own heights — the same height as each other. */
+/* Settings stay compact on the left while the video gets the wider working
+ area. Export facts and run state span both columns below them. */
.export-layout {
max-width: var(--content-max);
margin: 0 auto;
display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
+ grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.6fr);
+ grid-template-areas:
+ "settings preview"
+ "details details";
gap: var(--space-5);
- align-items: stretch;
+ align-items: start;
}
-@media (max-width: 1120px) {
+@media (max-width: 900px) {
.export-layout {
grid-template-columns: minmax(0, 1fr);
+ grid-template-areas:
+ "settings"
+ "preview"
+ "details";
}
}
.export-preview,
-.export-settings {
+.export-settings,
+.export-details {
min-width: 0;
padding: var(--space-5);
border: 1px solid var(--line-strong);
@@ -111,6 +119,10 @@
background: var(--panel);
}
+.export-preview { grid-area: preview; }
+.export-settings { grid-area: settings; }
+.export-details { grid-area: details; }
+
.export-preview h2,
.export-settings h2 {
margin: 0 0 var(--space-3);
@@ -135,7 +147,7 @@
.export-stage {
position: relative;
width: 100%;
- max-width: calc(56vh * var(--frame-aspect, 1.7778));
+ max-width: calc(68vh * var(--frame-aspect, 1.7778));
margin: 0 auto var(--space-3);
display: grid;
place-items: center;
@@ -327,6 +339,7 @@
.export-summary {
margin: 0;
display: grid;
+ grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 1px;
overflow: hidden;
border: 1px solid var(--line);
@@ -335,9 +348,9 @@
}
.export-summary > div {
+ min-width: 0;
display: flex;
- align-items: baseline;
- justify-content: space-between;
+ flex-direction: column;
gap: var(--space-3);
padding: var(--space-2) var(--space-3);
background: var(--panel-2);
@@ -357,7 +370,19 @@
margin: 0;
color: var(--text-primary);
font-size: var(--text-sm);
- text-align: right;
+ text-align: left;
+}
+
+@media (max-width: 760px) {
+ .export-summary {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
+}
+
+@media (max-width: 480px) {
+ .export-summary {
+ grid-template-columns: minmax(0, 1fr);
+ }
}
.export-summary dd small {
@@ -440,4 +465,3 @@
font-size: var(--text-xs);
line-height: var(--leading-normal);
}
-