diff --git a/README.md b/README.md index ee20acf..271b8aa 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ OpenMBEE View Editor brings source editing, named model views and reviewed graph

Inspection rover: connected assemblies, declared component values and typed interfaces.

+Explorer has independent Files, Views and Model sections. Fold a section to make room without losing its state; the Explorer activity button at the left edge toggles the sidebar. New view and model expand/collapse actions remain separate from section toggles. Diagram selection reveals the Model owner chain without moving keyboard focus away from the diagram. Section expansion lasts for the current session and is not saved in project files. Model representation labels wrap to the pane width. High-contrast mode retains a selection marker separate from keyboard focus; reduced motion follows system preferences. See [verification](docs/verification.md) for targeted accessibility coverage and limits. + ## Features - **Edit highlighted SysML source.** CodeMirror provides line numbers, bracket matching/closing, indentation, find/replace and draft undo/redo. Apply or discard changes, undo/redo accepted source transactions, and keep the last valid model when a draft fails validation. diff --git a/docs/architecture/workbench-layout.md b/docs/architecture/workbench-layout.md index 8cb60cd..8e93e10 100644 --- a/docs/architecture/workbench-layout.md +++ b/docs/architecture/workbench-layout.md @@ -50,18 +50,18 @@ Tables/matrices are explicitly labeled Project-wide requirements. Their search, Lucide icons use the shared shadcn Button sizes, theme roles and focus indicators. Compact history and mode actions use `ui/IconButton.tsx`: each has an explicit accessible name, a Tooltip and a decorative SVG. The root supplies one delayed Tooltip provider, and hints pass pointer events through to the underlying UI. -| Action | Icon | -| ------------------------------------------ | --------------------------------------------------------- | -| Source undo / redo | Undo2 / Redo2 | -| Source only / Source + Model / Model only | CodeXml / Columns2 / Layers | -| New project / Open / Download | FilePlus2 / FolderOpen / Download | -| Apply / discard draft | Check / X | -| Appearance | Palette | -| New part / connection | SquarePlus / Cable | -| Source reveal / reviewed rename / new view | CodeXml / Pencil / Eye | -| Diagram zoom / fit / lock | ZoomIn / ZoomOut / Scan / LockKeyhole variants | -| Panel visibility | PanelLeft, PanelRight and PanelBottom open/close variants | -| Panel options / reset layout | Ellipsis / RotateCcw | +| Action | Icon | +| ------------------------------------------ | -------------------------------------------------------------- | +| Source undo / redo | Undo2 / Redo2 | +| Source only / Source + Model / Model only | CodeXml / Columns2 / Layers | +| New project / Open / Download | FilePlus2 / FolderOpen / Download | +| Apply / discard draft | Check / X | +| Appearance | Palette | +| New part / connection | SquarePlus / Cable | +| Source reveal / reviewed rename / new view | CodeXml / Pencil / Eye | +| Diagram zoom / fit / lock | ZoomIn / ZoomOut / Scan / LockKeyhole variants | +| Panel visibility | Explorer Folder activity; contextual panel close/open variants | +| Panel options / reset layout | Ellipsis / RotateCcw | Apply and Download retain visible labels; frequent compact actions retain precise names such as Undo source. CodeMirror draft undo/redo is distinct from accepted source transaction history. Standard editor/search shortcuts are documented in the README; Tab retains focus navigation. Existing kind labels remain visible alongside Explorer icons; those icons do not establish SysML notation support. @@ -75,7 +75,9 @@ Apply and Download retain visible labels; frequent compact actions retain precis Navigation follows the [WAI-ARIA tree pattern](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/): arrows move through visible rows and fold/unfold branches, Home/End reach the visible extremes, typed prefixes find visible names, and Enter/Space select the focused declaration. Focus and selection are separate. One treeitem participates in Tab order; shared focus styling distinguishes it from the inspected row. -Diagram selection opens the selected declaration's owner chain without taking focus from the diagram. A UI request counter handles a second selection of the same symbol after its branch has been folded. These are reveal requests, not semantic revisions or identity reconciliation. Selecting a tree row retains the existing Inspector behavior; source-range reveal still requires diagram correspondence. Expansion is not portable project data or automatic work recovery. +ExplorerSection owns independent session-only Files/Views/Model disclosure state. Section bodies stay mounted while hidden/inert, preserving tree expansion and focus state. New view and tree-wide actions are separate header targets. ActivityRail exposes only the implemented Explorer destination and delegates visibility to the existing panel controller; it owns no layout preferences. It replaces the adjacent collapsed Explorer rail, retaining the Inspector reopen control. Existing sidebar visibility preferences and `sysml-workbench-layout-v1` remain unchanged. + +Diagram selection opens the Model section and the selected declaration's owner chain without taking focus from the diagram. A UI request counter handles a second selection of the same symbol after its branch has been folded. These are reveal requests, not semantic revisions or identity reconciliation. Selecting a tree row retains the existing Inspector behavior; source-range reveal still requires diagram correspondence. Expansion is not portable project data or automatic work recovery. ## Entry and session lifetime @@ -83,4 +85,10 @@ The public landing lives at `/`; `/app` starts with a project launcher. Source/d ## Shell code ownership -`Workbench.tsx` retains the live session, project-opening validation, selection and reviewed-command orchestration. `ProjectHeader.tsx` and `SourceToolbar.tsx` render shell controls through explicit callbacks. `projectFiles.ts` owns local bundle construction, file reading and browser download preparation; workspace validation and saved-state tracking retain their existing contracts. Panel controls and preferences remain in `WorkbenchPanels.tsx` and `layout.ts`. Surface CSS is imported through `ui/theme.css`; see the [design-system ownership table](../design-system.md#ownership). +`Workbench.tsx` retains the live session, project-opening validation, selection and reviewed-command orchestration. `ProjectHeader.tsx`, `WorkspaceToolbar.tsx`, `SourcePaneHeader.tsx` and `ModelPaneHeader.tsx` render shell controls through explicit callbacks. `projectFiles.ts` owns local bundle construction, file reading and browser download preparation; workspace validation and saved-state tracking retain their existing contracts. Panel controls and preferences remain in `WorkbenchPanels.tsx` and `layout.ts`. Surface CSS is imported through `ui/theme.css`; see the [design-system ownership table](../design-system.md#ownership). + +## Responsive and accessibility integration + +Pane-local controls use intrinsic wrapping; Model representation buttons can wrap their labels within narrow panes even beside Inspector. Existing 900 px vertical Split and below-600 mutually exclusive side tools are retained. Opening a collapsed tool first releases its reopen rail before requesting space, avoiding a narrow-panel constraint deadlock. Hidden panels and sections remain mounted/inert. Projects and Workspace layout have distinct Folders/PanelsTopLeft icons; forced-color representation/arrangement selection has a persistent border separate from the focus outline. Reduced-motion behavior remains the shared rule in `base.css`. + +`workbench-chrome.spec.ts` checks actual pane extremes, viewport transitions, exact drafts/bundle/editor/camera preservation, minimum-height canvas control access and forced-color focus/selection. Targeted accessibility-tree and screen-reader observations are recorded in [verification](../verification.md); they do not establish comprehensive assistive-technology support. diff --git a/docs/capabilities.md b/docs/capabilities.md index 9aecdc6..ee2a9bd 100644 --- a/docs/capabilities.md +++ b/docs/capabilities.md @@ -35,7 +35,7 @@ The [visualization example library](../examples/README.md) records representativ The read-only requirements table inspects all applied requirement declarations, identifiers, owned documentation and declared satisfaction/verification links. It supports search, name sorting and CSV export. The traceability matrix uses requirements as rows and linked satisfiers/verifiers as columns, retaining exact declaration identities and negation. It does not infer missing relationships, compute verification verdicts or edit model content. Unknown/incomplete extraction is unavailable rather than an empty result. Source reveal requires that file's draft to match applied source. [Requirements data contract](architecture/requirements-data.md). -Workspace arrangement is independent of Model representation: **Source only**, **Source + Model** and **Model only** choose visible slots. Source history and Apply/Discard live in the Source header; the filename’s Draft badge is per-file while those transactions affect all project sources. The Model header combines visibly labeled representation, revision status and diagram-only target/authoring controls. Tables and matrices state their project-wide scope; canvas controls remain on the Diagram. Activity rail and broader responsive/accessibility integration remain staged in the [product design](design/workbench-product-decisions.md). +Workspace arrangement is independent of Model representation: **Source only**, **Source + Model** and **Model only** choose visible slots. Source history and Apply/Discard live in the Source header; the filename’s Draft badge is per-file while those transactions affect all project sources. The Model header combines visibly labeled representation, revision status and diagram-only target/authoring controls. Tables and matrices state their project-wide scope; canvas controls remain on the Diagram. A sparse Explorer activity rail toggles the sidebar. Files, Views and Model fold independently while preserving mounted navigation state. Representation labels wrap to actual Model pane width, with a separate persistent selection cue in forced colors. See the [product design](design/workbench-product-decisions.md) and [verification record](verification.md) for tested coverage and limits. The optional **Guide** in the project header introduces Explorer, layout, source application, model representations and project download for any open project. It can be dismissed and restarted, and does not alter project data. diff --git a/docs/design-system.md b/docs/design-system.md index bbf1a3b..720f576 100644 --- a/docs/design-system.md +++ b/docs/design-system.md @@ -63,7 +63,7 @@ This is a working foundation, not a claim of complete keyboard/screen-reader cer Resizable, Tooltip and Popover are owned official registry primitives. `react-resizable-panels` 4.14.8 supplies resizing; the existing Radix package supplies popover/tooltip behavior. `ui/IconButton.tsx` composes the shared Button and Tooltip rather than introducing a second button style. Icons use Lucide and decorative SVGs remain hidden from accessibility names. Apply and Download keep visible labels. -The global arrangement bar selects Source only, Source + Model or Model only with CodeXml/Columns2/Layers icons, explicit tooltips and mutually exclusive pressed states. It is separate from Model representation. Pane-local Source controls use the existing buttons and tokens, keep Apply/Discard labeled, and wrap based on actual pane width. The active filename’s draft badge is per-file; the adjacent transaction status and Apply/Discard remain workspace-scoped. The Model header uses Network/Table2/Grid3X3 with visible representation labels and retains separate applied/draft/busy status. Diagram target and authoring controls occur once; data representations state project scope. Activity-rail and broader integration remain staged in the [product design](design/workbench-product-decisions.md). +The global arrangement bar selects Source only, Source + Model or Model only with CodeXml/Columns2/Layers icons, explicit tooltips and mutually exclusive pressed states. It is separate from Model representation. Pane-local Source controls use the existing buttons and tokens, keep Apply/Discard labeled, and wrap based on actual pane width. The active filename’s draft badge is per-file; the adjacent transaction status and Apply/Discard remain workspace-scoped. The Model header uses Network/Table2/Grid3X3 with visible representation labels and retains separate applied/draft/busy status. Diagram target and authoring controls occur once; data representations state project scope. The sparse 48 px activity rail contains only Explorer, with a persistent active border distinct from keyboard focus. Files/Views/Model use Folder/Network/ListTree identities and independent disclosure buttons. Header actions remain separate. Representation buttons wrap to their actual pane width, and a bottom border marks selection in forced colors independently of the focus outline. Projects uses Folders, distinct from the PanelsTopLeft workspace-layout control. Existing 900/600 responsive behavior is retained; see the [product design](design/workbench-product-decisions.md) and [verification](verification.md) for observed coverage. Tool headers, dividers, collapse controls and preference handling live in the workbench, outside semantic workspace state. Focus transfer follows committed visibility, hidden tools are inert, and panel geometry is a browser preference. See [panel contracts](architecture/workbench-layout.md). diff --git a/docs/design/workbench-product-decisions.md b/docs/design/workbench-product-decisions.md index 6629225..26d9dec 100644 --- a/docs/design/workbench-product-decisions.md +++ b/docs/design/workbench-product-decisions.md @@ -517,3 +517,7 @@ Every result must distinguish observed baseline behavior, the implemented change The #42 slice composes ModelPaneHeader with DiagramTargetControls using the existing `dataMode`, workspace handlers and Diagram identity key. Header controls and the renderer remain mounted when data representations hide them. The renderer’s original capability gate is shared with the header, so successful native evaluation is distinguished from a UI renderer being available. Tables/matrices state project-wide scope and retain their own query/filter/export/inspection ownership. `model-header.spec.ts` covers single control ownership, keyboard focus through representation changes, unchanged arrangement/drafts/bundles, stable renderer/editor DOM, unavailable sequence rendering, busy/applied status and constrained-header keyboard reachability. Existing authoring, exploration, requirement inspection, source reveal and preservation cases retain semantic assertions. Four composed-header visual cases add diagram/table captures at desktop/phone sizes in both themes. Results are recorded in the verification log; this map does not mark #43/#44 complete. + +### Stage 3/4 implementation map — 2026-11-17 + +ExplorerSection and ActivityRail implement #43 with mounted disclosure bodies and the existing panel controller. Inspector opening releases its reopen rail before width allocation, preventing the new activity bar from blocking phone inspection. Stage #44 retains the existing breakpoints and storage schema, adds intrinsic representation-label wrapping and forced-color selection cues, distinguishes Projects, updates guide language and checks actual pane extremes. Screen-reader observations are bounded to the recorded Orca/Chromium workflow in [verification](../verification.md), rather than a general compatibility claim. Engine behavior and portable data are outside these chrome changes. diff --git a/docs/testing.md b/docs/testing.md index 8ae9542..76a4675 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -140,3 +140,5 @@ The critical recovery restore scenario now writes distinguishable successive dra `recovery-error-lifetime.spec.ts` restores a real IndexedDB copy whose source parses cleanly but fails exploration origin validation. It retains that current operational error across another parse-clean failing revision, verifies recovery no longer owns the accepted replacement’s visualization failure, and clears the obsolete error only after a later model actually explores successfully. It compares exact accepted source and retains desktop/390px light/dark captures. This is separate from rejected project validation, which the recovery suite still checks as a pending recovery action. The inherited-member critical regression imports a positioned project captured with the previous real engine. It checks exact inherited declaration/context identities, legacy IDs and displayed positions, keyboard Properties/source navigation, independent inherited-node movement, both view layouts, rejected draft preservation and fresh-context portable reopen. Automatic layout alone does not write presentation positions; the test explicitly moves nodes before requiring saved geometry. + +`explorer-sections.spec.ts` covers independent disclosure and sidebar state, separate New view activation, preserved drafts/camera/bundle and diagram-to-tree reveal without focus transfer. `workbench-chrome.spec.ts` exercises width transitions and actual minimum pane widths rather than viewport width alone, plus vertical-minimum canvas access and forced colors. `chrome-accessibility.spec.ts` records role/name/state snapshots and keyboard operation; an optional `WORKBENCH_ORCA_LOG` enables checks against an isolated real Orca utterance log. An accessibility tree alone does not prove a screen reader announced it correctly. Retain exact AT/browser versions, setup limitations and observed output in verification records. diff --git a/docs/verification.md b/docs/verification.md index fbf7e0e..a650353 100644 --- a/docs/verification.md +++ b/docs/verification.md @@ -1,5 +1,29 @@ # Verification record +## Product design stage 4 — responsive and accessible chrome (#44) + +Recorded 2026-11-17 on `feature/product-design-responsive`, based on #43 commit `d3b099e`. Projects now uses Folders, distinct from workspace layout. Representation labels wrap to actual pane width, and forced colors retain a selected-state bottom border separate from keyboard focus. The guide describes the activity rail, independent sections and project-wide table scope. Unused legacy file/view/kind marker CSS was removed. Existing panel breakpoints, source transactions, semantic engines, preferences schema and portable format remain unchanged. + +`workbench-chrome.spec.ts` exercises 1440/1200/1000/900/768/600/390 and return to desktop, two desktop divider extremes, explicit Inspector opening on the phone, exact drafts/bundle/editor/camera preservation and minimum-height canvas controls. The first run passed before Inspector had committed its resize; a later run exposed a real clipped representation label (`green.log`). Fixed-width labels now wrap within their container. Subsequent setup attempts raced a collapse button disappearing during responsive auto-collapse (`green-final.log`, `confirmed.log`); starting from an explicitly closed Inspector before resizing removes that fixture race. All three final width/minimum/forced-color cases passed (`width-confirmed.log`). No fixed sleeps or relaxed geometry thresholds were added. + +The forced-color selected/focused border assertion failed before the change (`forced-red.log`) and passes afterward. Reduced motion uses the existing shared media rule. The existing responsive readability test originally required Diagram to occupy 80% of the viewport; the intentional activity rail makes that assumption false at 390 px (300 px available versus the old 312 px threshold). It now exactly accounts for both fixed rails and outer dividers, verifies both vertical panes fill that available width, and verifies the horizontal panes plus divider fill it on desktop. The corrected case passes without changing preference, camera or draft assertions (`critical-3-remainder.log`). All 34 critical cases pass across `critical-1.log` through `critical-7.log` plus `critical-3-remainder.log`; `critical-coverage.json` compares exact final project/file/title inventory and passed cases. This is aggregate coverage, not one uninterrupted run. It includes source-backed usage values, exact authoring/history, invalid drafts, recovery/reopen and failure retry. All 19 additional source-editor, diagnostics, toolbar and multi-view preservation scenarios passed in four batches (`additional-1.log` through `additional-4.log`), checked against exact titles by `additional-coverage.json`. The nine guide/Source-header/Model-header scenarios passed in `headers-guide.log`. These focused and critical results do not claim a complete functional-suite rerun. Screenshots follow below. These checks are not complete accessibility certification. + +Targeted real screen-reader verification used Orca 46.1 and bundled Chromium 156.0.8078.4 under an isolated D-Bus/Xvfb X11 session. Orca preferences, cache and runtime were isolated; audio synthesis was disabled through a log-only factory while actual accessibility events and Orca-generated utterances remained enabled. `chrome-accessibility.spec.ts` checks keyboard states, hidden-tree exclusion and role/name/state snapshots; with `WORKBENCH_ORCA_LOG` it additionally waits for the real Orca utterance output. The initial successful run passed in 16.9 seconds (retained under `orca-verified-initial/`). The final current-source run passed both the reader workflow and strengthened keyboard tree inspection in 22.7 seconds (`orca/test.log`, `orca/orca.log`). Observed utterances include “Show Explorer toggle button collapsed”, “Model expanded push button heading level 2”, “Requirements table toggle button not pressed”, then “pressed”, and “SysML source entry” with editor instructions. The trace/snapshot is under `sandbox/playwright/chrome-orca/`. This establishes generated announcements for those targeted controls; no audio listening, mobile reader, NVDA or VoiceOver testing is claimed. + +Earlier harness attempts never reached the intended workflow: isolated XDG cache hid the existing browser, then inherited Wayland selection could not connect inside Xvfb. The final harness points to the installed browser and explicitly uses X11 with a short isolated runtime path (`orca-session-x11.log`). Adding the extra inspection worker also required clearing the inherited Wayland display and selecting X11 for the isolated session; its pre-launch failure is retained under `orca-before-session-fix/` and `sandbox/playwright/chrome-orca-wayland-extra/`. Both final cases passed after that harness correction. No packages were installed and personal reader settings were not modified. Paths in this section are under ignored `sandbox/product-design-responsive/` unless rooted otherwise. Local results do not establish hosted approval, merge or deployment. + +### Integrated visual review + +All 106 final visual scenarios passed baseline generation in eleven fresh-build batches plus the retained two-case requirements remainder (`visual-generated-1.log` through `visual-generated-11.log`, `visual-generated-5-remainder.log`). `visual-generation-coverage.json` compares exact scenario titles with the final inventory: none missing or unexpected. The first requirements attempt encountered an already-closed Explorer after responsive allocation; `hideExplorer` now handles that explicit state while still requiring application focus return whenever it actually collapses the panel. No image tolerance or semantic assertion was relaxed. + +All 133 modified/new images were inspected in desktop/narrow light/dark comparison sheets, with exact paths and hashes retained in `inspected-visuals.json` and frozen `visual-review-stage1/` through `visual-review-stage11/`. The forced-colors image and phone Model header were also inspected at full size. Narrow header fixtures retain readable 100% entry rather than requiring an entire graph to fit; headers, drafts and controls remain visible. Screenshot generation establishes reviewed expectations, separately from the normal comparisons recorded below. The first normal narrow-requirement comparison exposed a fractional camera-origin mismatch: 3,873 differing pixels in card text/edges while chrome, content, scale and Inspector matched (`normal-4.log`). Explicit Fit in the final pane before the existing maximum-zoom normalization tests that camera-origin hypothesis without changing semantic or geometry assertions. The probe matched light and desktop captures but differed on dark narrow (`requirement-fit-probe2.log`); final four-case generation passed in 47.8 seconds (`requirement-fit-generated.log`). Only the dark narrow image changed again; its revised comparison was inspected under `visual-review-fit/` and its new hash recorded. An initial probe failed during build because the helper import was missing; that import was corrected before any browser probe ran. All twelve subsequent normal comparisons passed in 2.5 minutes across three complete theme/width cycles without updates, retries or skips (`requirement-fit-normal.log`). All 27 planned normal comparisons passed across `normal-1.log` through `normal-6.log`, using `normal-4-final.log` in place of the retained failed first attempt. These cover every helper-using narrow scenario plus Source/Model headers, sectioned Explorer and forced colors, without baseline updates, retries or skips. `npm run check` passed again after the final fixture changes (`check-final-review.log`), including 179 unit tests and ten script tests. Four additional inherited-member normal comparisons also passed (`normal-7.log`), bringing unique normal coverage to 31 cases; `normal-coverage.json` verifies exact titles. The complete functional suite and complete normal visual suite were not rerun locally for this stage. + +## Product design stage 3 — sectioned Explorer (#43) + +Recorded 2026-11-17 on `feature/product-design-explorer`, based on #42 commit `e4a4ad9`. ExplorerSection keeps Files/Views/Model mounted while independently hidden/inert. ModelTree retains its own expansion/roving-focus state and opens the section on diagram reveal requests. ActivityRail offers only Explorer and delegates to the existing panel controller. No semantic, engine, bundle, dependency or layout-storage schema changes. + +The new preservation regression failed against the old UI because no Workspace activities rail existed (`sandbox/product-design-explorer/red.log`). Both initial functional cases pass (`green-final.log`): exact draft/bundle/camera and tree expansion survive collapse/reopen, and diagram selection reveals the owner chain without taking focus. An initial typecheck caught an unused import and an over-broad ID edit; both were corrected before browser acceptance. Existing model-tree, panel and guide checks are recorded in `focused-*.log`. The initial phone inspection regression exposed an actual constraint deadlock: the new 48 px activity rail plus Inspector’s still-mounted 32 px reopen rail left insufficient width for expansion. A one-variable 32 px activity-rail control passed (`phone-width-probe.log`). The controller now commits the opening state to release the reopen rail before allocating panel width; focus transfer waits for that allocation. Both original phone scenarios pass at 48 px (`phone-open-fixed.log`). Existing preference keys and minimum sizes are unchanged. Post-fix panel confirmation passes the full resize/preservation case, keyboard size restoration/reset, Issues-on-failure, denied storage and corrupt narrow preferences (`panels-final.log`, `collapse-final.log`, `panel-remainder.log`); the interrupted aggregate log is retained and is not counted as a complete run. All three section/rail cases pass after the fix (`sections-confirmed.log`), including separate New view activation/cancellation and phone focus return. The first phone setup timed out in the legacy sidebar-based helper; establishing its fixture at desktop width before testing the narrow transition corrected that assumption (`sections-final.log` retains the failure). Four new visual scenarios pass (`visual-generated.log`); all eight expanded-section/model-tree captures at 1440/390 light/dark were inspected, with exact hashes in `inspected-visuals.json`. `npm run check` passes 179 unit tests, ten script tests, formatting, architecture and TypeScript (`check-final.log`). Broad normal visual comparisons remain deferred to the integrated #44 pass. Broad integrated baselines are refreshed with #44 so the navigation and responsive commits remain individually reviewable without two complete baseline refreshes. This is local evidence, not hosted approval or deployment. + ## Model header hosted visual follow-up (#46) Recorded 2026-11-17. Hosted run `44033593254` passed 100 of 101 visual cases and failed the light 768 px exploration overview by 6,822 pixels. Inspected expected/actual/diff captures show the same model and scale with an 80 px vertical camera translation, not missing content or changed controls. The fixture collapsed Explorer after initial fitting and captured the retained camera without choosing a final framing action. It now explicitly invokes Fit view before restoring keyboard focus to the exploration selectors. This tests a deliberate fitted overview after pane changes; application camera/resize behavior is unchanged. diff --git a/src/lib/ui/requirements-data.css b/src/lib/ui/requirements-data.css index 4dae7cb..a6c40df 100644 --- a/src/lib/ui/requirements-data.css +++ b/src/lib/ui/requirements-data.css @@ -10,6 +10,14 @@ gap: 4px; align-items: center; flex-wrap: wrap; + min-width: 0; + max-width: 100%; +} +.model-data-tabs button { + max-width: 100%; + height: auto; + min-height: 24px; + white-space: normal; } .model-data-diagram { display: flex; diff --git a/src/lib/ui/tools.css b/src/lib/ui/tools.css index 104d2e7..2f764a0 100644 --- a/src/lib/ui/tools.css +++ b/src/lib/ui/tools.css @@ -6,7 +6,7 @@ padding: 18px 10px; } .explorer section + section { - margin-top: 28px; + margin-top: 16px; } .explorer h2 { font-size: 11px; @@ -17,8 +17,31 @@ } .section-heading { display: flex; - align-items: baseline; + align-items: center; justify-content: space-between; + flex-wrap: wrap; + gap: 2px; +} +.explorer-section > .section-heading > h2 { + margin: 0; + min-width: 0; +} +.explorer-section > .section-heading > h2 > button { + font-size: 11px; + font-weight: 600; + gap: 5px; + white-space: nowrap; +} +.explorer-section > .section-heading > h2 > button > svg { + width: 14px; + height: 14px; + flex-shrink: 0; +} +.explorer-section .section-heading .expanded { + transform: rotate(90deg); +} +.explorer-section > [hidden] { + display: none; } .explorer button { display: flex; @@ -63,17 +86,6 @@ margin-top: 3px; line-height: 1.5; } -.file-mark { - font: 10px var(--sysml-font-mono); - color: var(--sysml-accent); -} -.view-mark { - font-size: 17px; - color: var(--sysml-accent); -} -.kind-mark { - color: var(--sysml-muted); -} .explorer p { font-size: 12px; padding: 0 8px; @@ -270,7 +282,7 @@ .model-tree-actions { display: flex; gap: 2px; - margin-bottom: 8px; + margin-left: auto; } .model-tree-actions button { width: 24px; diff --git a/src/lib/ui/workbench.css b/src/lib/ui/workbench.css index ddcbd3e..127c1b3 100644 --- a/src/lib/ui/workbench.css +++ b/src/lib/ui/workbench.css @@ -126,6 +126,21 @@ padding-top: 4px; background: var(--sysml-surface); } +.activity-rail { + display: flex; + flex: 0 0 48px; + width: 48px; + align-items: center; + flex-direction: column; + padding-top: 4px; + background: var(--sysml-surface); + border-right: 1px solid var(--sysml-border); +} +.activity-rail button[aria-pressed='true'] { + background: var(--sysml-active-bg); + color: var(--sysml-active-text); + border-left: 3px solid currentColor; +} @container (max-width: 410px) { .source-command-grid { display: flex; @@ -328,6 +343,9 @@ } } @media (forced-colors: active) { + :is(.modes, .model-data-tabs) button[aria-pressed='true'] { + border-bottom: 3px solid Highlight; + } [data-slot='resizable-handle'].workbench-resizer { background: ButtonBorder; } diff --git a/src/lib/workbench/explorer/Explorer.tsx b/src/lib/workbench/explorer/Explorer.tsx index 8df1333..250471a 100644 --- a/src/lib/workbench/explorer/Explorer.tsx +++ b/src/lib/workbench/explorer/Explorer.tsx @@ -1,5 +1,6 @@ import { Button } from '$lib/ui/primitives/button'; -import { Eye, FileCode2 } from 'lucide-react'; +import { Eye, FileCode2, Folder, Network, Plus } from 'lucide-react'; +import { ExplorerSection } from './ExplorerSection'; import { ModelTree } from './ModelTree'; import type { WorkspaceState } from '$lib/workspace/createWorkspace'; import type { ModelElement } from '$lib/workspace/project'; @@ -26,8 +27,7 @@ export function Explorer({ state.model?.elements.filter((item) => item.kind === 'viewUsage') ?? []; return (