Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ jobs:
python -m pip install -e ".[dev]" playwright
python -m playwright install --with-deps chromium
- name: Drive it
run: python -m pytest -q tests/test_editor_ui.py tests/test_editor_interactions.py
run: python -m pytest -q tests/test_editor_ui.py tests/test_editor_interactions.py tests/test_editor_resolution.py tests/test_editor_ui_redesign.py tests/test_editor_panel_controls.py
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Topology and group transactions
run: node --test tests/editor_topology.mjs tests/editor_group.mjs

types:
name: the py.typed promise holds
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Editor UI redesign

- Insert a resistance into a parallel group's shared terminal lead in one drop,
retaining every parallel path and expanding space without a bypass wire.

- Keep Components/Properties/Solve available as permanent panel views; move
example files below saved files and replace Edit commands with toolbar icons.
- Restore Components scrolling, enlarge previews, add a prominent shortcuts
close button, and suppress pointer-triggered canvas focus outlines.

- Preserve right-angle risers when dragging horizontal or vertical parallel lanes,
keeping endpoint nodes and connection leads stationary.

- Dock component properties beside the drawing with Properties, Connections and
Appearance tabs; preserve Count drafts and Solve sessions across panel views.
- Introduce flat keyboard-accessible menus, icon Undo/Redo, horizontal panel
controls, compact inputs, contextual help and responsive overlay panels.
- Replace the long in-app guide with Quick start and a dedicated shortcuts dialog.
- Present prioritized actionable issues in a fixed strip and overlay drawer;
retain multiple targets, stable issue keys and raw technical details.
- Hide hit-test rectangles and omit stylistic parallel-label advice in the editor
while preserving Python checker compatibility and genuine collision findings.

### Editor interaction resolution

- Preserve attached components when deleting junctions; clean only unused empty
endpoints. Merge exact compatible overlaps, preserve target properties and
references, review semantic conflicts, and prevent physical short circuits.
- Add connected junctions, ideal Connect actions, endpoint disconnection, and
series/parallel resistance insertion with geometry previews and expansion.
Crossing leads offer an explicit connection choice.
- Make Count/Arrangement validated draft transactions with Apply, Cancel, a
combined value, one-step Undo, routed groups and bounded large-count rendering.
- Share boxed/zigzag terminal positions, reroute rotated connections, reverse
endpoint and waypoint order together, and retain authored routes on Reset.
- Add File/Edit/View/Physics/Help menus, direct Units access, automatic Files
sizing, local panel collapse controls, centered export options, Enter rename,
actionable warning targets, stable findings layout, and full-viewport Present.
- Add Fahrenheit and interval conversions, independent Kelvin temperature state,
engineering prefixes/scientific formatting, a documented scientific picker,
and embedded glyph coverage for its catalogue.
- Use shared definitions for the interaction legend, inspector explanations and
generated documentation. Keep editor helper modules and the Python wheel under
the same build revision.

### Release engineering fixes

- Prevent nonfinite inputs and overflow from certifying a legacy physics balance.
Expand Down
2 changes: 1 addition & 1 deletion Dictionary.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/assets/raptor-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/assets/raptor-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/vocabulary-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/vocabulary-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 141 additions & 9 deletions docs/editor-guide.md

Large diffs are not rendered by default.

186 changes: 186 additions & 0 deletions docs/editor-interactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Interaction and notation catalogue

Generated by `python tools/gen_editor_guide.py`. Edit `_catalogue.py` or `_units.py`, then regenerate.

| Item | Meaning and appearance | Action | Changes | Cancel or undo |
|---|---|---|---|---|
| Unconnected endpoint | An empty free endpoint has at most one attached path. | Drag to another node to connect, or click and choose the target. | Connectivity | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Junction | A node joins connection leads. | Drag to move; drop an empty node exactly onto another node to merge. | Geometry and connectivity | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Route handle | A selected path has a geometric waypoint. | Drag to shape the line. A crossing does not connect lines. | Geometry | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Selection outline | One or more components are selected. | Drag to move the selected objects. Delete removes only the selected objects. | Geometry or document contents | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Drop preview | A palette component or isolated resistance is being dragged onto a target. | Release to commit the shown connection and movement. | Geometry and connectivity | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Warning | A drawing or physics check identifies an issue. | Activate to reveal its component or explanation. | Selection only | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Identical component group | Count is greater than one. | Edit Count and Arrangement in a draft, then Apply. Values are per component. | Geometry and equivalent physics | Escape cancels a gesture or draft; Undo restores a committed edit. |
| Quantity state | Solve physics is open. | Known is supplied; Unknown is requested; Override is temporary; Calculated is a proposal; Missing needs input. | Temporary solve values until explicitly applied | Escape cancels a gesture or draft; Undo restores a committed edit. |

## Inspector controls

| Control | Explanation |
|---|---|
| count | Number of identical components sharing one per-component value. Edit a draft, choose an arrangement, then Apply or Enter. Escape cancels. |
| arrangement | Series adds resistances and divides capacitance; parallel divides resistance and adds capacitance. Changes remain a draft until Apply. |
| symbol-position | Automatic places the symbol on its route. Manual retains its chosen position. Reset removes the position constraint while preserving authored route points. |
| angle | Rotates the symbol and routes its leads to its actual terminal tips. Connectivity and physical values stay unchanged. Undo restores the turn. |
| from | The actual start node of this path. Choosing another node changes connectivity; a nearby label does not identify a connection. |
| to | The actual end node of this path. Choosing another node changes connectivity. Undo restores the previous end. |
| id | Stable technical identifier used by references and physical associations. Renaming remaps supported references. |
| sub | A notation subscript that names a place or medium. It is meaningful data and is preserved during a compatible merge. |
| side | Preferred side for the label. Automatic lets the label solver choose a clear position. This changes presentation only. |
| scale | Actual temperatures use an absolute offset; differences do not. Unspecified retains legacy meaning. For example, 32 °F is 273.15 K, while an 18 °F difference is 10 K. |
| disconnect-from | Detach only the start endpoint onto a separate free node. The component survives. Undo restores the connection. |
| disconnect-to | Detach only the end endpoint onto a separate free node. The component survives. Undo restores the connection. |
| disconnect-both | Detach both ends of this component. Values remain unchanged. Undo restores both connections together. |
| swap | Reverse direction by reversing endpoint order and route-point order together. Reversing twice restores the original route. |
| via-add | Add a connected junction on a lead. The resistance is retained and the ideal lead is split. Escape cancels; Undo restores the edit. |
| via-del | Remove this geometric route point. Connectivity and values remain unchanged. Undo restores the point. |
| unpin | Reset symbol position to Automatic without deleting manually authored route points. Undo restores the placement. |
| delete | Delete the displayed object. Attached components survive a junction deletion with separate detached ends. Undo restores the operation. |
| connect | Choose another node to add a plain ideal connection. No resistance value is introduced. Escape cancels. |

## Prefixes

Reference: [BIPM SI prefix catalogue](https://www.bipm.org/en/measurement-units/si-prefixes).
Select a unit token to replace its prefix; mass prefixes attach to grams. Undo restores insertion.

| Symbol | Name | Scale |
|---|---|---|
| q | quecto | 10^-30 |
| r | ronto | 10^-27 |
| y | yocto | 10^-24 |
| z | zepto | 10^-21 |
| a | atto | 10^-18 |
| f | femto | 10^-15 |
| p | pico | 10^-12 |
| n | nano | 10^-9 |
| µ | micro | 10^-6 |
| m | milli | 10^-3 |
| c | centi | 10^-2 |
| d | deci | 10^-1 |
| (none) | none | 10^0 |
| da | deca | 10^1 |
| h | hecto | 10^2 |
| k | kilo | 10^3 |
| M | mega | 10^6 |
| G | giga | 10^9 |
| T | tera | 10^12 |
| P | peta | 10^15 |
| E | exa | 10^18 |
| Z | zetta | 10^21 |
| Y | yotta | 10^24 |
| R | ronna | 10^27 |
| Q | quetta | 10^30 |

## Unit presets

Each preset is filtered by quantity. Typed compatible prefixes and compound expressions are also accepted.

| Quantity | Supported presets |
|---|---|
| T | °C, °F, K |
| R | K/W, °F/W, mK/W |
| C | J/K, kJ/K, J/°F |
| cp | J/(kg·K), kJ/(kg·K), J/(kg·°F) |
| mdot | kg/s, g/s, kg/h |
| P | W, kW, mW |
| q | W, kW, mW |
| q″ | W/m², W/cm², kW/m² |
| area | m², cm², mm² |

## Scientific symbols

Insert at the caret or replace the selection in labels and subscripts. These tokens change notation only; Undo restores text.
Numeric and integer fields expose only applicable numeric shortcuts. Text is escaped and never executed.

| Symbol | Common name |
|---|---|
| Α | capital alpha |
| Β | capital beta |
| Γ | capital gamma |
| Δ | capital delta |
| Ε | capital epsilon |
| Ζ | capital zeta |
| Η | capital eta |
| Θ | capital theta |
| Ι | capital iota |
| Κ | capital kappa |
| Λ | capital lamda |
| Μ | capital mu |
| Ν | capital nu |
| Ξ | capital xi |
| Ο | capital omicron |
| Π | capital pi |
| Ρ | capital rho |
| Σ | capital sigma |
| Τ | capital tau |
| Υ | capital upsilon |
| Φ | capital phi |
| Χ | capital chi |
| Ψ | capital psi |
| Ω | capital omega |
| α | alpha |
| β | beta |
| γ | gamma |
| δ | delta |
| ε | epsilon |
| ζ | zeta |
| η | eta |
| θ | theta |
| ι | iota |
| κ | kappa |
| λ | lamda |
| μ | mu |
| ν | nu |
| ξ | xi |
| ο | omicron |
| π | pi |
| ρ | rho |
| σ | sigma |
| τ | tau |
| υ | upsilon |
| φ | phi |
| χ | chi |
| ψ | psi |
| ω | omega |
| ° | degree |
| ′ | prime |
| ″ | double prime |
| ‴ | triple prime |
| · | multiplication dot |
| × | multiplication sign |
| ÷ | division sign |
| ± | plus-minus sign |
| − | minus sign |
| ≤ | less-than or equal to |
| ≥ | greater-than or equal to |
| ≠ | not equal to |
| ≈ | almost equal to |
| ∞ | infinity |
| ← | leftwards arrow |
| → | rightwards arrow |
| ↑ | upwards arrow |
| ↓ | downwards arrow |
| ↔ | left right arrow |
| ₀ | subscript zero |
| ₁ | subscript one |
| ₂ | subscript two |
| ₃ | subscript three |
| ₄ | subscript four |
| ₅ | subscript five |
| ₆ | subscript six |
| ₇ | subscript seven |
| ₈ | subscript eight |
| ₉ | subscript nine |
| ⁰ | superscript zero |
| ¹ | superscript one |
| ² | superscript two |
| ³ | superscript three |
| ⁴ | superscript four |
| ⁵ | superscript five |
| ⁶ | superscript six |
| ⁷ | superscript seven |
| ⁸ | superscript eight |
| ⁹ | superscript nine |
| ⁻ | superscript minus |
| ⁺ | superscript plus sign |
| ₋ | subscript minus |
| ₊ | subscript plus sign |
Loading
Loading