Address #133 review: the toolkit has one home now
Build image / build-and-push (push) Successful in 12s
Build image / build-and-push (push) Successful in 12s
The `embedded` prop was always true, which left the card branch dead; the component is simply the rail's tab now. The focus comment is one line, and the default tab says why it is Plot and not the first tab. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
+10
-12
@@ -14,18 +14,18 @@ import { useEditorStore } from './store'
|
||||
import type { EditorObject } from './types'
|
||||
|
||||
/**
|
||||
* The desktop editor's toolkit. Out of focus: the seven object kinds as pill
|
||||
* rows — click to arm (then click the plan), or drag one straight onto it. In a
|
||||
* focused bed it swaps to the plant list with a search, same arm/drag behavior,
|
||||
* plus the bed's bulk tools (fill, clear, scan a packet).
|
||||
* The desktop editor's toolkit, the rail's first tab. Out of focus: the seven
|
||||
* object kinds as pill rows — click to arm (then click the plan), or drag one
|
||||
* straight onto it. In a focused bed it swaps to the plant list with a search,
|
||||
* same arm/drag behavior, plus the bed's bulk tools (fill, clear, scan a
|
||||
* packet).
|
||||
*
|
||||
* It started life as the workspace's left card (the handoff's layout) and now
|
||||
* lives as the first tab of the rail, so the plan and the rail get the width
|
||||
* the card took. `embedded` is that mode: no card chrome of its own, and no
|
||||
* "Toolkit" heading — the tab is the heading.
|
||||
* It started life as the workspace's left card (the handoff's layout) and
|
||||
* moved into the rail so the plan and the rail get the width the card took;
|
||||
* the rail's tab body provides the card chrome and the scrolling, and the tab
|
||||
* is the heading.
|
||||
*/
|
||||
export function Toolkit({
|
||||
embedded = false,
|
||||
unit,
|
||||
plants,
|
||||
plantings,
|
||||
@@ -40,7 +40,6 @@ export function Toolkit({
|
||||
onClear,
|
||||
onScan,
|
||||
}: {
|
||||
embedded?: boolean
|
||||
unit: UnitPref
|
||||
plants: Plant[]
|
||||
plantings: EditorPlanting[]
|
||||
@@ -62,10 +61,9 @@ export function Toolkit({
|
||||
const [query, setQuery] = useState('')
|
||||
|
||||
return (
|
||||
<div className={cn('flex min-h-0 flex-col gap-2 overflow-x-hidden', embedded ? 'flex-1' : 'panel overflow-y-auto p-3.5')}>
|
||||
<div className="flex min-h-0 flex-1 flex-col gap-2 overflow-x-hidden">
|
||||
{!focused ? (
|
||||
<>
|
||||
{!embedded && <h6 className="mx-1 mb-1.5 mt-1">Toolkit</h6>}
|
||||
{OBJECT_KINDS.map((k) => {
|
||||
const armed = armedKind === k.kind
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user