Rename styling vocabulary to Styles and reshape style types#1886
Draft
kmcginnes wants to merge 1 commit into
Draft
Rename styling vocabulary to Styles and reshape style types#1886kmcginnes wants to merge 1 commit into
kmcginnes wants to merge 1 commit into
Conversation
Renames the `*Preferences*` styling vocabulary to the Styles convention and factors the style types around the Source/Scope model, a pure refactor with no behavior change. Style types now compose from a visual base and a type-only extension: `VertexVisualStyle` / `EdgeVisualStyle` (all-required, the resolved baseline) plus `VertexTypeStyle` / `EdgeTypeStyle` (display label and attributes). The stored and resolved per-type models recompose from these — `VertexStyleStorage` / `EdgeStyleStorage` (partial) and `VertexStyle` / `EdgeStyle` (resolved). Renames throughout: `*Preferences*` -> `*Style*` types, atoms, and hooks; `defaultVertex/EdgePreferences` -> `appDefaultVertex/EdgeStyle`; `createVertex/EdgePreference` -> `resolveVertex/EdgeStyle`; the storage-model suffix standardizes on `Storage`; `userPreferences.ts` -> `graphStyles.ts`. Renames the Cytoscape intermediate render types `NodeStyle` / `EdgeStyle` to `RenderedNodeStyle` / `RenderedEdgeStyle` to free the clean domain names. Keeps the `NodesStyling` / `EdgesStyling` module names, the "customize" verb, and all storage keys unchanged. Updates the CONTEXT.md styles glossary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Renames the
*Preferences*styling vocabulary to the Styles convention and reshapes the style types around a visual base + type-only extension — a pure refactor with no behavior change. This is slice 1 of the User Default Styles epic (#1881): it establishes the vocabulary and type partition the later slices build on.The style types now compose from two pieces:
VertexVisualStyle/EdgeVisualStyle— all-required visual fields (the resolved baseline a rendered entity always has, and the future type-less default).VertexTypeStyle/EdgeTypeStyle— type-only fields (display label + attribute selectors).The stored and resolved per-type models recompose from these:
VertexStyleStorage/EdgeStyleStorage(Partial<Visual & Type> & { type }) andVertexStyle/EdgeStyle(Readonly<Visual & Type & { type }>). These are type-equivalent to the old*PreferencesStorageModel/*Preferencesshapes — verified bypnpm check:typesand the unchanged test suite.Renamed throughout:
*Preferences*→*Style*(types, atoms, hooks);defaultVertex/EdgePreferences→appDefaultVertex/EdgeStyle;createVertex/EdgePreference→resolveVertex/EdgeStyle; the storage-model suffix standardizes onStorage;userPreferences.ts→graphStyles.ts. The Cytoscape intermediate render typesNodeStyle/EdgeStylebecomeRenderedNodeStyle/RenderedEdgeStyleto free the clean domain names. Module names (NodesStyling/EdgesStyling), the "customize" verb, and all storage keys are unchanged.Agent docs kept in sync: the CONTEXT.md styles glossary,
docs/agents/testing.md, and dated addendums on two ADRs mapping old→new identifiers (decision bodies left immutable).How to read
appDefault*Style/resolve*Style/*StyleAtomsymbols, and the cascade doc.NodeStyle/EdgeStyle→Rendered*Stylerename that frees the domain names.VertexTypeConfig/EdgeTypeConfigcompose the renamed storage models.Validation
pnpm checkspasses (types + lint + format, 0 errors).pnpm testpasses (2037 tests / 176 files). Existing styling tests pass unchanged aside from renamed symbols.Related Issues
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.