Skip to content

Collapse styles cascade to a single user layer#1981

Merged
kmcginnes merged 1 commit into
mainfrom
collapse-single-style-layer
Jul 21, 2026
Merged

Collapse styles cascade to a single user layer#1981
kmcginnes merged 1 commit into
mainfrom
collapse-single-style-layer

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Description

Collapses the two-layer styling architecture (shared + user) into a single user styles layer. The shared layer was internal and never shipped, so this removes it wholesale with no data migration.

Core change:

  • Delete sharedVertexStylesAtom / sharedEdgeStylesAtom and their IndexedDB keys.
  • Simplify the cascade to {...appDefault, ...user}resolveVertexStyle / resolveEdgeStyle no longer take a shared parameter.
  • Point styling import/export and the Settings → Styles load flow at the user atoms.

Settings → Styles stays as the home for save/load/reset, now single-layer:

  • Three reset buttons (Reset Your / Shared / All Styles) collapse into one Reset.
  • Save/Load/Reset get labels and icons matching the config Save/Load in General Settings.

Supporting cleanup:

  • Glossary, styling ADRs, and docs/features/settings.md updated to the single-layer model; stale shared-vertex-styles references removed from two adjacent ADRs.
  • UI copy says "default style" (not "app default") and uses query-language type labels (Node Label / Class, Edge Label / Predicate).

Out of scope (deferred): the selective import modal (#1972), relocating the buttons to the sidebar, and the styling-export envelope-kind rename.

How to read

  1. graphStyles.ts — the cascade collapse; start here
  2. useStylingImportExport.ts — import/export repointed to the user atoms
  3. storageAtoms.ts — shared atoms deleted
  4. ResetStylesButton.tsx — three reset buttons become one
  5. SettingsStyles.tsx — single-layer Settings page

Validation

  • pnpm checks passes (types, lint, format).
  • pnpm test passes.
  • Removed tests exercised two-layer-only behavior; single-layer equivalents remain. DbState shared-style helpers removed.

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

Remove the never-shipped shared styles layer: delete the shared atoms and
their IndexedDB keys, simplify the cascade to user over app defaults, and
point import/export at the user styles. Replace the three Settings reset
buttons with one Reset button, and give Save/Load/Reset matching icons.

Update the glossary, styling ADRs, and settings docs to the single-layer
model, and align UI copy to 'default style' with query-language type labels.
No data migration — the shared layer never shipped.
@kmcginnes
kmcginnes marked this pull request as ready for review July 21, 2026 03:48
@kmcginnes
kmcginnes merged commit 3915fb1 into main Jul 21, 2026
6 checks passed
@kmcginnes
kmcginnes deleted the collapse-single-style-layer branch July 21, 2026 03:48
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.

Collapse to single style layer and retire shared-styles terminology

1 participant