🎥 Make videos programmatically with React
@remotion/browser-studio: Refine loading progress UI
Jonny Burgera3858d739420
diff --git a/packages/browser-studio/e2e/browser-studio.test.ts b/packages/browser-studio/e2e/browser-studio.test.tsindex 3bd98c3fde..1d09cd8c02 100644--- a/packages/browser-studio/e2e/browser-studio.test.ts+++ b/packages/browser-studio/e2e/browser-studio.test.ts@@ -160,6 +160,21 @@ test('loads Browser Studio, opens external links, and can add, delete, and dupliname: 'Loading Studio',});await expect(loadingProgress).toBeVisible({timeout: 5000});+ await expect(page.getByText('Loading Studio', {exact: true})).toHaveCount(+ 0,+ );+ await expect(page.getByText(/^\d+%$/)).toHaveCount(0);+ const loadingLogo = page.locator('svg[viewBox="-100 -100 400 400"]');+ await expect(loadingLogo).toBeVisible();+ const logoBounds = await loadingLogo.boundingBox();+ const progressBounds = await loadingProgress.boundingBox();+ expect(logoBounds).not.toBeNull();+ expect(progressBounds).not.toBeNull();+ expect(progressBounds?.width).toBe(168);+ expect(+ (progressBounds?.y ?? 0) -+ ((logoBounds?.y ?? 0) + (logoBounds?.height ?? 0)),+ ).toBe(20);releaseVendorBundleRequest();await expect.poll(diff --git a/packages/browser-studio/src/LoadingProgress.tsx b/packages/browser-studio/src/LoadingProgress.tsxindex 0d57a80fd4..64c1116054 100644--- a/packages/browser-studio/src/LoadingProgress.tsx+++ b/packages/browser-studio/src/LoadingProgress.tsx@@ -3,15 +3,14 @@ import React from 'react';const loadingProgressAnimation = '__remotion_loading_progress_animation';const wrapperStyle: React.CSSProperties = {- width: 240,+ display: 'flex',+ flexDirection: 'column',+ alignItems: 'center',};-const labelRowStyle: React.CSSProperties = {- color: '#a6a7a9',- display: 'flex',- fontSize: 12,- justifyContent: 'space-between',- marginBottom: 10,+const logoStyle: React.CSSProperties = {+ marginBottom: 20,+ transform: 'rotate(90deg)',};const trackStyle: React.CSSProperties = {@@ -20,7 +19,7 @@ const trackStyle: React.CSSProperties = {height: 4,overflow: 'hidden',position: 'relative',- width: '100%',+ width: 168,};const fillStyle: React.CSSProperties = {@@ -43,10 +42,21 @@ export const LoadingProgress: React.FC<{100% { transform: translateX(333%); }}`}</style>- <div style={labelRowStyle}>- <span>Loading Studio</span>- {percentage === null ? null : <span>{percentage}%</span>}- </div>+ <svg+ aria-hidden="true"+ height={40}+ style={logoStyle}+ viewBox="-100 -100 400 400"+ width={40}+ >+ <path+ d="M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z"+ fill="#555"+ stroke="#555"+ strokeLinejoin="round"+ strokeWidth="100"+ />+ </svg><divaria-label="Loading Studio"aria-valuemax={100}