Skip to content

Commit

Permalink
chore: fix last bugs and prepare release (redotvideo#310)
Browse files Browse the repository at this point in the history
* chore: try to get submodules to clone

* chore: fix some issues inside examples, open folder after rendering

* feat: display correct port when port is taken

* feat: scene graph as default side-menu
  • Loading branch information
hkonsti authored Sep 26, 2024
1 parent c6b18b1 commit 7adac81
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
fetch-depth: 0
token: ${{secrets.PUBLISH_TOKEN}}
submodules: true
- name: Initialize and update submodules
run: |
git submodule init
git submodule update --recursive
- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ program
)
.option('--port <number>', 'Port on which to start the server', '9000')
.action(async options => {
await launchEditor(options.projectFile, options.port);
console.log(`Editor running on port ${options.port}`);
const editor = await launchEditor(options.projectFile, options.port);
console.log(`Editor running on port ${editor.config.server.port}`);
});

program.parse(process.argv);
2 changes: 1 addition & 1 deletion packages/create/examples
7 changes: 4 additions & 3 deletions packages/ui/src/components/viewport/Viewport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {useEffect, useState} from 'preact/hooks';
import {useApplication} from '../../contexts';
import {useDuration, useRendererState} from '../../hooks';
import {useShortcut} from '../../hooks/useShortcut';
import {formatDuration} from '../../utils';
import {formatDuration, openOutputPath} from '../../utils';
import {Button} from '../controls';
import {
PlaybackControls,
Expand Down Expand Up @@ -41,11 +41,12 @@ function EditorViewport() {
main
value="Render"
id="render"
onClick={() => {
renderer.render({
onClick={async () => {
await renderer.render({
...getFullRenderingSettings(project),
name: project.name,
});
await openOutputPath();
}}
class={styles.renderButton}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/contexts/panels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function PanelsProvider({children}: {children: ComponentChildren}) {
return options;
}, [tabs]);

const sidebar = panelSignal(undefined, 'sidebar', options);
const sidebar = panelSignal(EditorPanel.SceneGraph, 'sidebar', options);
const bottom = panelSignal(EditorPanel.Timeline, 'bottom-panel', options);

return (
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/signals/EditorPanel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export enum EditorPanel {
// TODO: technically, this is a plugin so it's not entirely safe to assume it's always available
SceneGraph = '@revideo/2d-scene-graph',
Threads = 'threads-panel',
Console = 'console-panel',
Timeline = 'timeline-panel',
Expand Down

0 comments on commit 7adac81

Please sign in to comment.