Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Home: Camera motions before Effects

Adarsh2e15654ee185
diff --git a/src/app/(studio)/page.tsx b/src/app/(studio)/page.tsx
index 0999019f..9dd28838 100644
--- a/src/app/(studio)/page.tsx
+++ b/src/app/(studio)/page.tsx
@@ -49,8 +49,9 @@ export default async function Page() {
>
{/* Live edit is the highlight: its own section comes first, right under the first screen and the composer. */}
<LiveEditSection />
- <EffectsSection facts={home.facts} effects={home.effects} />
+ {/* Camera motions, then Effects. */}
<MotionsSection facts={home.facts} motions={home.motions} />
+ <EffectsSection facts={home.facts} effects={home.effects} />
<AppsSection facts={home.facts} beforeAfter={home.beforeAfter} reveals={home.reveals} />
<StudiosSection facts={home.facts} studios={home.studios} audioTools={home.audioTools} pills={home.pills} />
<AssistSection facts={home.facts} skills={home.skills} />
diff --git a/src/components/home/home-sections.tsx b/src/components/home/home-sections.tsx
index 9c34bd22..29c27575 100644
--- a/src/components/home/home-sections.tsx
+++ b/src/components/home/home-sections.tsx
@@ -146,7 +146,7 @@ function Cards({
);
}
-/** Home's preset rows (Effects, Camera motions), for an area page that shows them the same way. */
+/** Home's preset rows (Camera motions, Effects), for an area page that shows them the same way. */
export const PresetRail = Cards;
/**
diff --git a/tests/e2e/home-sections.mjs b/tests/e2e/home-sections.mjs
index 701e3a3c..bedf8255 100644
--- a/tests/e2e/home-sections.mjs
+++ b/tests/e2e/home-sections.mjs
@@ -1,4 +1,4 @@
-// Home's card rows under the first screen in a real browser: Effects, Camera motions, Apps, and Studios and tools
+// Home's card rows under the first screen in a real browser: Camera motions, Effects, Apps, and Studios and tools
// (src/components/home/home-sections.tsx). Run it on a production server (`next build`, then `next start -p <port>`), or
// against the live site.
//
@@ -26,7 +26,8 @@ const app = (args.find((a, i) => !a.startsWith("--") && args[i - 1] !== "--shots
const shotsDir = args.includes("--shots") ? args[args.indexOf("--shots") + 1] : undefined;
if (shotsDir) fs.mkdirSync(shotsDir, { recursive: true });
-const SECTIONS = ["home-effects", "home-motions", "home-apps", "home-studios"];
+/** The rows in the order a reader meets them, top to bottom (src/app/(studio)/page.tsx). */
+const SECTIONS = ["home-motions", "home-effects", "home-apps", "home-studios"];
const cap = (() => {
const src = fs.readFileSync(path.join(root, "src/lib/preview-playback.ts"), "utf8");
const m = /MAX_PLAYING = \{ narrow: (\d+), wide: (\d+) \}/.exec(src);
@@ -170,6 +171,10 @@ async function run(device, label, dpr, max) {
await page.goto(`${app}/?e2e=${Date.now()}`, { waitUntil: "load" });
await page.waitForTimeout(800);
+ // The rows sit in that order down the page: Camera motions first, then Effects.
+ const tops = await page.evaluate((ids) => ids.map((i) => document.getElementById(i).closest("section").getBoundingClientRect().top), SECTIONS);
+ check(`${label}: the rows come in order`, tops.every((t, i) => i === 0 || t > tops[i - 1]), SECTIONS.map((id, i) => `${id} ${Math.round(tops[i])}`).join(" < "));
+
// The rows come into view one by one, as a reader scrolls down to them.
for (const id of SECTIONS) {
await scrollToSection(page, id);