Skip to content

feat(editor): add mobile bottom navigation and responsive panels - #41

Open
youtsuhodev wants to merge 1 commit into
oneworks-ai:mainfrom
youtsuhodev:feat/mobile-editor-layout
Open

youtsuhodev wants to merge 1 commit into
oneworks-ai:mainfrom
youtsuhodev:feat/mobile-editor-layout

Conversation

@youtsuhodev

Copy link
Copy Markdown

Rework the narrow-viewport editor so phones get a discoverable, Instagram-style bottom menu instead of the hidden pair of sidebar toggles.

  • Add src/AvatarMobileNav.tsx: a fixed bottom tab bar (Preview, Avatar type, Body, Style, Effects, Animation) rendered only on narrow, non-embedded viewports.

  • App.tsx: track narrow viewport with a matchMedia listener, default the resources sidebar to collapsed on mobile, derive the active nav section from the panel state, and let nav taps open or toggle the matching sidebar/sheet. Selecting a section closes the others so only one panel is open at a time.

  • Keep the global top actions (save, camera, GitHub, theme, language, project menu) on the stage on mobile and drop the now-redundant resources/controls toggle buttons; hide the stage animation button because the bottom nav owns it.

  • App.scss: make the mobile stage full height (100dvh) with safe-area padding and reserve space for the nav and any open sheet, move the orientation gizmo and rotate/move selector above the nav in every state, present both control sidebars and the animation panel as fixed bottom sheets, and wrap/shrink the top action rows to 36px and 32px touch targets.

  • AvatarControls.scss: turn the mobile sidebars into scrollable cards with a capped height and internal panel scrolling.

  • AnimationPanel.scss: make the timeline responsive by wrapping the transport into two rows with compact sizing, hiding the zoom group and total timecode, narrowing the track column, enlarging track/keyframe touch targets, capping the options popover, enlarging library tiles, and revealing trim/track affordances on hover-less devices.

  • AnimationPanel.tsx: disable the drag-to-resize gesture below 840px to match the hidden resize grip.

Verified with pnpm typecheck plus the AnimationPanel and AppPixelEffect suites.

Rework the narrow-viewport editor so phones get a discoverable, Instagram-style bottom menu instead of the hidden pair of sidebar toggles.

- Add src/AvatarMobileNav.tsx: a fixed bottom tab bar (Preview, Avatar type, Body, Style, Effects, Animation) rendered only on narrow, non-embedded viewports.

- App.tsx: track narrow viewport with a matchMedia listener, default the resources sidebar to collapsed on mobile, derive the active nav section from the panel state, and let nav taps open or toggle the matching sidebar/sheet. Selecting a section closes the others so only one panel is open at a time.

- Keep the global top actions (save, camera, GitHub, theme, language, project menu) on the stage on mobile and drop the now-redundant resources/controls toggle buttons; hide the stage animation button because the bottom nav owns it.

- App.scss: make the mobile stage full height (100dvh) with safe-area padding and reserve space for the nav and any open sheet, move the orientation gizmo and rotate/move selector above the nav in every state, present both control sidebars and the animation panel as fixed bottom sheets, and wrap/shrink the top action rows to 36px and 32px touch targets.

- AvatarControls.scss: turn the mobile sidebars into scrollable cards with a capped height and internal panel scrolling.

- AnimationPanel.scss: make the timeline responsive by wrapping the transport into two rows with compact sizing, hiding the zoom group and total timecode, narrowing the track column, enlarging track/keyframe touch targets, capping the options popover, enlarging library tiles, and revealing trim/track affordances on hover-less devices.

- AnimationPanel.tsx: disable the drag-to-resize gesture below 840px to match the hidden resize grip.

Verified with pnpm typecheck plus the AnimationPanel and AppPixelEffect suites.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant