Skip to content

feat(cli): move XLE app components to experimental.xle.components config#3275

Merged
ejhammond merged 1 commit into
xds-unprefix-integrationfrom
astryx/xle-experimental-components
Jun 30, 2026
Merged

feat(cli): move XLE app components to experimental.xle.components config#3275
ejhammond merged 1 commit into
xds-unprefix-integrationfrom
astryx/xle-experimental-components

Conversation

@ejhammond

Copy link
Copy Markdown
Contributor

Summary

Moves XLE app-component registration into the validated Astryx config under a new experimental.xle.components field, replacing the previous unvalidated raw-read of layout.components.

Authors register app-local components so XLE layout expressions can reference them by name via {hint}:

export default {
  experimental: {
    xle: {
      components: {
        KpiCard: {from: '@/components/KpiCard'},
      },
    },
  },
};

{kpi-card} then expands to import {KpiCard} from '@/components/KpiCard' and <KpiCard />.

What changed

  • Types: added experimental.xle.components (Record<string, XleComponent>) to AstryxConfig, plus an exported XleComponent interface ({ from, description?, default? }).
  • Schema: added a strict XleComponentSchema and the experimental.xle.components branch to the strict config schema. Unknown keys still error; the component shape is object-only (the old string shorthand now throws).
  • Loader: loadConfig passes experimental through.
  • XLE: removed the raw-read shim (and its special "config directly in cwd first" lookup). XLE now reads components via loadConfig, using the same standard sibling-of-nearest-package.json resolution as the rest of the CLI.
  • Updated layout grammar help text to document the new config shape.

Tests

  • Migrated the app-component bridge test to the new experimental.xle.components object shape.
  • Added config tests: valid passthrough; strict rejection of unknown keys under experimental / experimental.xle / a component; and the string shorthand now throwing.

Full CLI suite green (1560 tests).

Register app-local XLE components through the validated config under
experimental.xle.components (object form: { from, description?, default? })
instead of the previous unvalidated layout.components read. The raw-read
shim and its special cwd-first config lookup are removed; XLE now resolves
the config via loadConfig, consistent with the rest of the CLI.
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jun 30, 2026 12:11pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jun 30, 2026
@ejhammond ejhammond merged commit d8a18ad into xds-unprefix-integration Jun 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

1 participant