Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Align sidebar content (#10697)

Jonny Burger95b8e24877a7
diff --git a/packages/studio/src/components/CompositionSelectorItem.tsx b/packages/studio/src/components/CompositionSelectorItem.tsx
index b826ebb031..f5474e2614 100644
--- a/packages/studio/src/components/CompositionSelectorItem.tsx
+++ b/packages/studio/src/components/CompositionSelectorItem.tsx
@@ -50,11 +50,12 @@ const itemStyle: React.CSSProperties = {
cursor: 'default',
alignItems: 'center',
marginBottom: 1,
- marginLeft: 4,
+ marginLeft: 8,
+ marginRight: 4,
appearance: 'none',
border: 'none',
borderRadius: 4,
- width: 'calc(100% - 4px)',
+ width: 'calc(100% - 12px)',
textAlign: 'left',
backgroundColor: BACKGROUND,
height: COMPACT_CONTROL_ROW_HEIGHT,
diff --git a/packages/studio/src/components/InlineEditableTitle.tsx b/packages/studio/src/components/InlineEditableTitle.tsx
index 5d46201903..3af8f132ad 100644
--- a/packages/studio/src/components/InlineEditableTitle.tsx
+++ b/packages/studio/src/components/InlineEditableTitle.tsx
@@ -11,6 +11,7 @@ import {
WHITE,
getBackgroundFromHoverState,
} from '../helpers/colors';
+import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from './InspectorPanelLayout';
import {COMPACT_INLINE_ROW_HEIGHT} from './layout';
const titleWrapper: React.CSSProperties = {
@@ -82,8 +83,8 @@ const inspectorTitleInner: React.CSSProperties = {
fontSize: 13,
height: COMPACT_INLINE_ROW_HEIGHT,
paddingBottom: 0,
- paddingLeft: 8,
- paddingRight: 8,
+ paddingLeft: INSPECTOR_PANEL_HORIZONTAL_PADDING - 4,
+ paddingRight: INSPECTOR_PANEL_HORIZONTAL_PADDING - 4,
paddingTop: 0,
width: '100%',
};
diff --git a/packages/studio/src/components/InspectorInfoHeader.tsx b/packages/studio/src/components/InspectorInfoHeader.tsx
index 6a0144dba9..c970e61736 100644
--- a/packages/studio/src/components/InspectorInfoHeader.tsx
+++ b/packages/studio/src/components/InspectorInfoHeader.tsx
@@ -57,7 +57,7 @@ const inspectorSubtitle: React.CSSProperties = {
height: 20,
lineHeight: '20px',
margin: '0 4px',
- padding: '0 8px',
+ padding: `0 ${INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
width: 'calc(100% - 8px)',
};
diff --git a/packages/studio/src/components/InspectorPanel/SequenceInspectorHeader.tsx b/packages/studio/src/components/InspectorPanel/SequenceInspectorHeader.tsx
index 6bb6a3d487..1576e6dfca 100644
--- a/packages/studio/src/components/InspectorPanel/SequenceInspectorHeader.tsx
+++ b/packages/studio/src/components/InspectorPanel/SequenceInspectorHeader.tsx
@@ -6,6 +6,7 @@ import {ReactIcon} from '../../icons/react';
import {InlineEditableTitle} from '../InlineEditableTitle';
import {InspectorInfoHeader} from '../InspectorInfoHeader';
import {InspectorLocationCopy} from '../InspectorLocationCopy';
+import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from '../InspectorPanelLayout';
import {InspectorSourceLocation} from '../InspectorSourceLocation';
import {COMPACT_INLINE_ROW_HEIGHT} from '../layout';
import {useOpenSequenceInApps} from '../Timeline/use-open-sequence-in-apps';
@@ -39,7 +40,7 @@ const sequenceInspectorSubtitle: React.CSSProperties = {
height: COMPACT_INLINE_ROW_HEIGHT,
lineHeight: '18px',
margin: '0 4px',
- padding: '0 8px',
+ padding: `0 ${INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
width: 'calc(100% - 8px)',
};
diff --git a/packages/studio/src/components/InspectorPanelLayout.ts b/packages/studio/src/components/InspectorPanelLayout.ts
index 399bae6fae..6636607389 100644
--- a/packages/studio/src/components/InspectorPanelLayout.ts
+++ b/packages/studio/src/components/InspectorPanelLayout.ts
@@ -1 +1 @@
-export const INSPECTOR_PANEL_HORIZONTAL_PADDING = 12;
+export const INSPECTOR_PANEL_HORIZONTAL_PADDING = 10;
diff --git a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
index 68e207b72b..ce7a2b796b 100644
--- a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
+++ b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
@@ -6,7 +6,7 @@ import {SetSelectedModalContext} from '../../state/modals';
import type {QuickSwitcherMode} from './NoResults';
const quickSwitcherArea: React.CSSProperties = {
- padding: '4px 0 4px 4px',
+ padding: '4px 4px 4px 8px',
borderBottom: `1px solid ${BLACK_HEX}`,
overflowY: 'auto',
};
@@ -14,7 +14,7 @@ const quickSwitcherArea: React.CSSProperties = {
const quickSwitcherTrigger: React.CSSProperties = {
backgroundColor: WHITE_ALPHA_06,
borderRadius: 4,
- padding: '4px 10px',
+ padding: '4px 10px 4px 12px',
color: LIGHT_TEXT,
fontSize: 12,
cursor: 'pointer',
diff --git a/packages/studio/src/components/Tabs/index.tsx b/packages/studio/src/components/Tabs/index.tsx
index 1ad5838d3c..8bc3450ce4 100644
--- a/packages/studio/src/components/Tabs/index.tsx
+++ b/packages/studio/src/components/Tabs/index.tsx
@@ -34,7 +34,7 @@ const selectorButton: React.CSSProperties = {
flex: 1,
padding: 3,
height: 34,
- paddingLeft: 12,
+ paddingLeft: 10,
display: 'flex',
flexDirection: 'row',
fontSize: 13,