Skip to content

🎥 Make videos programmatically with React

right sidebar tweaking

Jonny Burgerd48ce1c16021
diff --git a/packages/cli/src/editor/components/RenderModal/RenderModal.tsx b/packages/cli/src/editor/components/RenderModal/RenderModal.tsx
index 74115f8777..bf98391196 100644
--- a/packages/cli/src/editor/components/RenderModal/RenderModal.tsx
+++ b/packages/cli/src/editor/components/RenderModal/RenderModal.tsx
@@ -39,6 +39,7 @@ import {GearIcon} from '../../icons/gear';
import {GifIcon} from '../../icons/gif';
import {ModalsContext} from '../../state/modals';
+import {SidebarContext} from '../../state/sidebar';
import {VERTICAL_SCROLLBAR_CLASSNAME} from '../Menu/is-menu-item';
import {ModalContainer} from '../ModalContainer';
import {NewCompHeader} from '../ModalHeader';
@@ -540,7 +541,10 @@ export const RenderModal: React.FC<{
[setDefaultOutName]
);
+ const {setSidebarCollapsedStateRight} = useContext(SidebarContext);
+
const onClickStill = useCallback(() => {
+ setSidebarCollapsedStateRight('expanded');
rightSidebarTabs.current?.selectRendersPanel();
dispatchIfMounted({type: 'start'});
addStillRenderJob({
@@ -564,6 +568,7 @@ export const RenderModal: React.FC<{
dispatchIfMounted({type: 'fail'});
});
}, [
+ setSidebarCollapsedStateRight,
dispatchIfMounted,
compositionId,
outName,
@@ -594,6 +599,8 @@ export const RenderModal: React.FC<{
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
const onClickVideo = useCallback(() => {
+ setSidebarCollapsedStateRight('expanded');
+ // TODO: Doesn't open render queue because async
rightSidebarTabs.current?.selectRendersPanel();
dispatchIfMounted({type: 'start'});
addVideoRenderJob({
@@ -631,6 +638,7 @@ export const RenderModal: React.FC<{
dispatchIfMounted({type: 'fail'});
});
}, [
+ setSidebarCollapsedStateRight,
dispatchIfMounted,
compositionId,
outName,
diff --git a/packages/cli/src/editor/components/RendersTab.tsx b/packages/cli/src/editor/components/RendersTab.tsx
index d2528ad350..e066b971f3 100644
--- a/packages/cli/src/editor/components/RendersTab.tsx
+++ b/packages/cli/src/editor/components/RendersTab.tsx
@@ -8,7 +8,7 @@ import {Tab} from './Tabs';
const row: React.CSSProperties = {
display: 'flex',
flexDirection: 'row',
- fontSize: 13,
+ fontSize: 14,
justifyContent: 'center',
color: 'inherit',
alignItems: 'center',
diff --git a/packages/cli/src/editor/components/RightPanel.tsx b/packages/cli/src/editor/components/RightPanel.tsx
index adb03ff23b..8e306b8cba 100644
--- a/packages/cli/src/editor/components/RightPanel.tsx
+++ b/packages/cli/src/editor/components/RightPanel.tsx
@@ -121,7 +121,7 @@ export const RightPanel: React.FC<{}> = () => {
}
// TODO: It is not perfectly aligned in example
-
+ // TODO: DEfault and renders has different font soue
return (
<div style={container} className="css-reset">
<div style={tabsContainer}>
diff --git a/packages/cli/src/editor/components/TopPanel.tsx b/packages/cli/src/editor/components/TopPanel.tsx
index 6f3bd673a4..55113f017d 100644
--- a/packages/cli/src/editor/components/TopPanel.tsx
+++ b/packages/cli/src/editor/components/TopPanel.tsx
@@ -122,7 +122,7 @@ export const TopPanel: React.FC = () => {
<SplitterElement type="anti-flexer">
<SplitterContainer
minFlex={0.5}
- maxFlex={0.75}
+ maxFlex={0.8}
defaultFlex={0.7}
id="canvas-to-right-sidebar"
orientation="vertical"