Skip to content

sass graph playground - #675

Draft
desig9stein wants to merge 4 commits into
masterfrom
mpopov/sass-graph
Draft

desig9stein wants to merge 4 commits into
masterfrom
mpopov/sass-graph

Conversation

@desig9stein

Copy link
Copy Markdown
Contributor

No description provided.

desig9stein and others added 4 commits November 13, 2026 11:59
New private workspace package that parses packages/theming/sass into a
dependency graph of variables, mixins, functions and modules. It writes
public/graph.json via scripts/build-graph.ts.

- @use resolves global and namespaced members; sass:* modules are built-ins.
- @forward applies the as prefix-* prefix, then show/hide on the prefixed
  names, as Sass does.
- Parameters, statement-level assignments and @each/@for variables shadow
  globals; a keyword argument (f($x: ...)) neither references nor shadows $x.
- An !global assignment, also one with #{...} in its value, writes the
  global and does not shadow it.
- Values in a @use or @forward with() clause count as module code.
- Each declaration keeps its code without comments, so a comment-only edit
  is not a change.
- A URL alias resolves package imports, and a forward from a consumer file
  becomes a re-exports edge.
React + React Flow + Tailwind app over the generated graph.json, in a dark
theme with shareable hash URLs.

- The map shows one card per system (palettes, typography, component
  themes, ...) with a one-line description; a system opens as file boxes.
- A symbol opens on an outline of what it is built from and what uses it,
  collapsed by default with expand and collapse all; the Graph tab draws
  the same neighbourhood "steps away" from it (elkjs layout).
- Arrows are colored by the kind of their source, are not clickable, and a
  link through a hidden node is drawn dashed. Dragging anywhere pans.
- Mixins, functions, variables, entry files and public API filter the
  canvas; changing a filter keeps the layout in place.
- The Report tab lists the health checks; the details panel shows which
  libraries call a symbol and which re-export it.
- Marking a variable or parameters as changed shows every affected symbol
  and component theme.
- Search with / and arrow keys, Back and Forward through visited views,
  Start over, the logo as a home link, and a How to use guide.
… MCP server

Command line, MCP and CI tools for people working on the theming engine.

- graph:flow prints what a symbol is built from or what uses it, with
  file:line and the first sentence of its sassdoc.
- graph:impact compares the engine with a git ref and lists the changed
  declarations, the symbols and component themes they reach, and the
  libraries that call them. A comment-only edit has no impact.
- graph:report runs the health checks: hotspots, library favorites,
  outliers, private symbols that libraries call, unused private and public
  code, API only apps reach, undocumented API, cycles, unresolved names.
- The igniteui-angular, igniteui-webcomponents, grid-lite and dockmanager
  checkouts next to this repo are parsed with the engine, so a symbol a
  library calls or re-exports is never reported as unused. A missing
  checkout is reported, not an error; --no-consumers skips them.
- graph:mcp serves sass_search, sass_flow, sass_impact and sass_report
  over stdio; .mcp.json registers it for this repo.
- The sass-impact workflow posts the impact as one PR comment and updates
  it on each push of a change under packages/theming/sass.
- The README covers how to use each tool, the architecture, the graph
  model, the resolution rules and the known limits.
…library components in impact

- The explorer uses Ignite UI for React components in the dark Fluent
  theme, compiled from this repo's engine through the workspace link.
  Tailwind is removed; layout is CSS grid and flexbox on --ig-* tokens.
- Edges follow ELK's orthogonal routes, so connectors go around cards.
- The outline expands and collapses through the Ignite UI tree.
- "What breaks if I change this?" and graph:impact list, per library, the
  components whose theme files call the changed or affected code.
- The sidebar filters by type and by system; "Public API only" is
  disabled in the Outline, and the report notes that it ignores filters.
- Entry files are always shown where dependents are drawn.
- Steps away offers only the counts that change the drawing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant