Skip to content

Layer table All boxes are three-state, with an All layers row (#136) - #145

Merged
Gherkin merged 2 commits into
mainfrom
issue-136-tri-state-layer-boxes
Oct 27, 2026
Merged

Gherkin merged 2 commits into
mainfrom
issue-136-tri-state-layer-boxes

Conversation

@Gherkin

@Gherkin Gherkin commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Closes #136.

What changes

  • A new All layers row under the column heads. It has one box per column: All, Tracks, Zones, Vias, Silk, Fab, Net. A box is ticked when the kind is on for every layer that has it, clear when it is off on all of them, and mixed otherwise. A click on a clear or mixed box turns it on everywhere. A click on a ticked box turns it off everywhere. Silk and Fab cover F and B only.
  • The All box on each layer row works the same way over that row's kinds. It is no longer a separate switch. A layer is on while any of its kinds is on.

Mixed click

The issue asked what a click on a mixed box usually does. Most tri-state checkboxes (file managers, mail clients, tree views) turn everything on. That is also what the S, O and X style toggles here already did. This PR does the same.

Side effects of dropping the separate All flag

  • A row that is off no longer keeps its kinds for later. Turning a row off and on again gives every kind.
  • Unticking the last kind on a row turns the layer off. On F and B that also hides the pads.
  • Net (highlighted nets on a layer that is off) now draws tracks, zones, vias and pads. It can no longer pick kinds, because an off layer has none ticked. netcopper=NAME:LETTERS in older links is still read; the letters are ignored. README and util.js say so.
  • The 1-9 number keys and X still flip a layer between visible and off. On a mixed layer they turn it off, not fully on.
  • Saved settings with the old all flag are migrated: a layer that was off has every kind off, a layer that was on keeps its kinds (or gets all of them if none was ticked).
  • __pcbaTest.version is 3. state().layers[l].all is now whether the layer is on.

Tests

  • New tests: the All layers row, the three states of a row All box, migration of saved rows with the old all flag.
  • Changed tests: the ones that checked that kinds are kept under an off row, and that netcopper letters pick kinds.
  • Full Playwright suite: 155 passed. One failure: "an inner layer checkbox changes both sides" timed out. That is the known flake in Inner layer checkbox test times out in a local full run with Firefox #72. It passed alone and in a later run of the five layer-related spec files (106 passed). npm run test:api passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-27 21:02 UTC

@Gherkin

Gherkin commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

PR review, round 1

  1. web/app.js:1780 — an old link with overlay=silk and no x-ray (e.g. side=F&overlay=silk) sets silk on the off side. A ticked kind now means "on", so B turns on with silk only. Before, B stayed off. Fixed: overlay only touches sides that are on. Test added in tests/browser/links.spec.js.

No other findings.

A ticked kind now turns a layer on, so overlay=silk on a link with no
x-ray turned the far side on with silk only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
@Gherkin
Gherkin merged commit 5d11f99 into main Oct 27, 2026
10 checks passed
@Gherkin
Gherkin deleted the issue-136-tri-state-layer-boxes branch October 27, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add all-layer buttons in layer visibility dropdown

1 participant