Skip to content

Commit 60627be

Browse files
authored
chore: Add DESIGN.md for Langflow's visual design system (#12830)
* docs: Add DESIGN.md specification for Langflow's visual design system Machine-readable design tokens (YAML frontmatter) paired with human-readable design rationale following the open-source DESIGN.md format from Google Labs. Intended for AI agents generating UI that must match Langflow's visual identity. Covers 129 color tokens, 15 typography scales, 50 component definitions, spacing/rounding/elevation systems, dark mode strategy, and the 14-hue data type color system used for node port encoding. * ci: Add DESIGN.md lint workflow Runs `@google/design.md lint` against DESIGN.md on pull requests that modify the file. Catches spec violations, broken token references, and WCAG AA contrast failures before merge. CLI version is pinned via env var so format spec changes require a deliberate bump. * ci: Integrate DESIGN.md lint into CI Success pipeline Replaces the standalone workflow with a job inside ci.yml so it gates the "CI Success" aggregate check. Path-filter skips the job on PRs that don't touch DESIGN.md, so cost is near-zero for normal PRs.
1 parent 2c021ac commit 60627be

3 files changed

Lines changed: 781 additions & 0 deletions

File tree

.github/changes-filter.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,7 @@ database:
110110

111111
mainpage:
112112
- "src/frontend/src/pages/MainPage/**"
113+
114+
design-md:
115+
- "DESIGN.md"
116+
- ".github/workflows/ci.yml"

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ jobs:
186186
api: ${{ steps.filter.outputs.api }}
187187
database: ${{ steps.filter.outputs.database }}
188188
docker: ${{ steps.filter.outputs.docker }}
189+
design-md: ${{ steps.filter.outputs.design-md }}
189190
docs-only: ${{
190191
steps.filter.outputs.docs == 'true' &&
191192
steps.filter.outputs.python != 'true' &&
@@ -345,6 +346,27 @@ jobs:
345346
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
346347
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
347348

349+
lint-design-md:
350+
needs: path-filter
351+
name: Lint DESIGN.md
352+
if: ${{ inputs.run-all-tests || needs.path-filter.outputs.design-md == 'true' }}
353+
runs-on: ubuntu-latest
354+
env:
355+
DESIGN_MD_CLI_VERSION: "0.1.1"
356+
steps:
357+
- name: Checkout code
358+
uses: actions/checkout@v6
359+
with:
360+
ref: ${{ inputs.ref || github.ref }}
361+
362+
- name: Setup Node.js
363+
uses: actions/setup-node@v6
364+
with:
365+
node-version: "22"
366+
367+
- name: Lint DESIGN.md
368+
run: npx --yes @google/design.md@${{ env.DESIGN_MD_CLI_VERSION }} lint DESIGN.md
369+
348370
merge-frontend-coverage:
349371
name: Merge Frontend Jest + Playwright Coverage Reports
350372
needs: [path-filter, set-ci-condition, test-frontend-unit, test-frontend]
@@ -411,6 +433,7 @@ jobs:
411433
test-docs-build,
412434
test-templates,
413435
test-docker,
436+
lint-design-md,
414437
set-ci-condition,
415438
path-filter,
416439
check-nightly-status,
@@ -465,6 +488,8 @@ jobs:
465488
" - Template Tests: Check starter project templates"
466489
elif $job == "test-docker" then
467490
" - Docker Tests: Check Docker image builds and version verification"
491+
elif $job == "lint-design-md" then
492+
" - DESIGN.md Lint: Check token references, WCAG contrast, and spec compliance"
468493
elif $job == "path-filter" then
469494
" - Path Filter: File path filtering failed"
470495
elif $job == "set-ci-condition" then

0 commit comments

Comments
 (0)