Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Fix composition folder label size

Jonny Burgerda81ba2d4c17
diff --git a/packages/example/e2e/studio.test.mts b/packages/example/e2e/studio.test.mts
index fb80688d3d..ba26fffe09 100644
--- a/packages/example/e2e/studio.test.mts
+++ b/packages/example/e2e/studio.test.mts
@@ -1111,10 +1111,16 @@ test.describe('visual mode', () => {
.getByRole('textbox', {name: 'Composition ID'})
.fill(compositionId);
await page.getByTitle('Folder').click();
- await page
+ const schemaFolderOption = page
.getByRole('button', {name: 'Schema', exact: true})
- .last()
- .click();
+ .last();
+ const schemaFolderLabel = schemaFolderOption.getByText('Schema', {
+ exact: true,
+ });
+ await expect(schemaFolderLabel).toHaveCSS('font-size', '13px');
+ await schemaFolderOption.hover();
+ await expect(schemaFolderLabel).toHaveCSS('font-size', '13px');
+ await schemaFolderOption.click();
await expect(page.getByTitle('Folder')).toHaveText('Schema');
const createButton = page.getByRole('button', {
diff --git a/packages/studio/src/components/NewComposition/NewComposition.tsx b/packages/studio/src/components/NewComposition/NewComposition.tsx
index 3b10063ca5..4c0aeaf179 100644
--- a/packages/studio/src/components/NewComposition/NewComposition.tsx
+++ b/packages/studio/src/components/NewComposition/NewComposition.tsx
@@ -56,11 +56,19 @@ const folderIconStyle: React.CSSProperties = {
const folderLabelStyle: React.CSSProperties = {
alignItems: 'center',
+ color: 'inherit',
display: 'flex',
+ fontFamily: 'inherit',
+ fontSize: 'inherit',
+ lineHeight: 'normal',
minWidth: 0,
};
const folderLabelTextStyle: React.CSSProperties = {
+ color: 'inherit',
+ fontFamily: 'inherit',
+ fontSize: 'inherit',
+ lineHeight: 'normal',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',