From b35593958122c355a74179d7f5aa84d88a253a73 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Fri, 23 Oct 2026 15:12:43 +0200 Subject: [PATCH] BF jumps always on top of what they cross; R circuit commands in a menu on its name, the side panel only says what it is A jump is drawn once more over every line, so a cable that arches over another is never hidden under it, whatever order they are drawn in. Cable labels sit on the longest stretch no other line crosses. The circuit's name in the top bar opens what can be done with it: tidy its wires or every circuit's, design its box, duplicate, delete, print, export SVG, publish as a puzzle. The This panel keeps what the circuit is: its health, its numbers (the transistors tile opens their breakdown), its truth table and how it looks as a part. Unused components are a tab of the Components list in the parts bar, with a delete button on each. Co-Authored-By: Claude Opus 5.5 (1M context) --- app/assets/css/main.css | 39 +++++++++- app/components/editor/BottomBar.vue | 43 ++++++++++- app/components/editor/Canvas.vue | 96 ++++++++++++++++++++--- app/components/editor/CircuitPane.vue | 107 +++++++------------------- app/components/editor/Toolbar.vue | 55 ++++++++++++- app/lib/logic/routing.ts | 31 ++++++++ 6 files changed, 272 insertions(+), 99 deletions(-) diff --git a/app/assets/css/main.css b/app/assets/css/main.css index d738f2f..9c56072 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -5157,10 +5157,9 @@ button.tile:hover { .part-tabs { display: flex; + flex-wrap: wrap; gap: 2px; padding: 2px 2px 4px; - overflow-x: auto; - scrollbar-width: none; } .part-tabs button { @@ -5381,3 +5380,39 @@ button.tile:hover { -webkit-appearance: none; margin: 0; } + +/* A jump drawn once more on top of what it crosses: only for looks. */ +.wire.jump path { + pointer-events: none; +} + +.top-bar .bar-btn.here { + color: var(--text); +} + +.tile.active { + border-color: var(--accent); +} + +.part-tabs .unused-tab { + display: flex; + align-items: center; + gap: 4px; +} + +.part-slot .pin-btn.drop-btn:hover { + color: var(--danger); +} + +.part-slot .pin-btn.drop-btn.confirm { + width: auto; + gap: 3px; + padding: 0 6px; + display: flex; + align-items: center; + font-size: 11px; + font-weight: 600; + color: #fff; + background: var(--danger); + opacity: 1; +} diff --git a/app/components/editor/BottomBar.vue b/app/components/editor/BottomBar.vue index 1289889..44951cc 100644 --- a/app/components/editor/BottomBar.vue +++ b/app/components/editor/BottomBar.vue @@ -7,6 +7,7 @@ // builder's: the mouse wheel scrolls it sideways. import { shortCount } from '~/lib/logic/analyze' import { BASIC_GROUPS } from '~/composables/useParts' +import { unusedComponents } from '~/lib/logic/check' import type { ComponentDef, NodeKind } from '~/lib/logic/types' const ed = useEditor() @@ -73,10 +74,22 @@ function page(dir: number) { const placeable = (d: ComponentDef) => d.id !== ed.def.value.id && ed.canPlace(d.id) +/** Components placed nowhere (not the open one, Main, examples or challenges): a tab of their own, to clear out. */ +const UNUSED = 'unused' +const unused = computed(() => unusedComponents(ed.project.value).filter(d => d.id !== ed.def.value.id && d.id !== ed.mainId.value)) +const confirmDrop = ref(null) +function drop(d: ComponentDef) { + if (confirmDrop.value !== d.id) return (confirmDrop.value = d.id) + confirmDrop.value = null + ed.removeComponent(d.id) + ed.notify(`Deleted "${d.name}" (Ctrl+Z brings it back)`) +} + /** The component group shown; your own components first. */ const compTab = ref('') const compGroup = computed( () => + (compTab.value === UNUSED && unused.value.length ? { name: 'Unused', defs: unused.value } : undefined) ?? componentGroups.value.find(g => g.name === compTab.value) ?? // Untouched: the first group with something that can go in here. componentGroups.value.find(g => g.defs.some(placeable)) ?? @@ -241,17 +254,28 @@ onBeforeUnmount(() => window.removeEventListener('keydown', onKey, true))