Skip to content

FEATURE 3 - Secondary "Tools" toolbar on Generate page #163

@lightningpixel

Description

@lightningpixel

FEATURE 3 — Secondary "Tools" toolbar on Generate page

As a user editing a mesh on the Generate page, I want a dedicated tools
toolbar below the main one, grouping the transform actions (Transform, Move,
Rotate, Scale), so the editing tools are visually separated from the
file/processing actions (Import, Export, Smooth, Decimate).

Context

The Generate page currently has a single header bar (GeneratePage.tsx:427)
mixing file actions, mesh processing, and lighting. As transform tools are
added, they deserve their own row to keep the UI readable.

Scope

  • New horizontal toolbar rendered directly below the existing header bar
    (between the header div at GeneratePage.tsx:427 and the viewer area).
  • Visible only when a mesh is loaded (hasModel), like the processing buttons.
  • Contains the transform tool group:
    • Transform — opens the numeric transform panel (recenter / scale /
      rotate / ground).
    • Move (position) · Rotate · Scale — activate the corresponding
      interactive gizmo mode.
  • Active tool is visually highlighted (same active state as existing buttons).
  • Visual style consistent with the main toolbar (same button classes:
    rounded-lg, bg-zinc-800, border-zinc-700/50, violet active state).

Implementation

  • src/areas/generate/GeneratePage.tsx:
    • Add a second toolbar row after the header bar div (line 427), e.g.
      <div className="flex items-center gap-2 px-3 py-1.5 border-b border-zinc-800 bg-surface-400 shrink-0">, gated on
      hasModel.
    • Extract toolbar buttons into a small reusable component to avoid
      duplicating the existing button markup.
    • Wire each tool button to its state/handler (Transform → openPanel
      panel; Move/Rotate/Scale → gizmoMode state shared with the viewer).
  • No backend changes.

Dependencies

  • Ties into the interactive transform gizmo ticket (Move/Rotate/Scale share its
    gizmoMode state) and the numeric transform ticket (Transform panel). The
    toolbar shell can ship first with buttons wired to placeholder handlers.

Acceptance criteria

  • A second toolbar appears below the main one when a mesh is loaded.
  • It hides when no mesh is loaded.
  • Transform / Move / Rotate / Scale buttons are present and styled
    consistently with the main toolbar.
  • The active tool is clearly highlighted; selecting another switches it.
  • Layout doesn't shrink the viewer awkwardly or overflow on narrow widths.

Estimate: S

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions