Repository navigation
feat(apollo-wind): add ReferenceChip for variables, resources and connections - #1398
dbacomputer wants to merge 3 commits into
Conversation
…nections Add a shared ReferenceChip primitive that pairs the existing info tokens (background, text, icon) for valid references and the error tokens for invalid ones. PromptEditor's TokenPill and markdown preview now render through it, and VariableValueControl shows its bound variable as a chip. Docs: usage guidance with do/don't examples, an all-themes story, README section, and token usage notes on the Future colors page. Tests lock the token pairing so chips cannot drift to primary fills. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused component extraction and integrations have supporting tests and no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds a shared ReferenceChip primitive to Apollo Wind, standardizing selected variables, resources, and connections with paired semantic colors.
Changes:
- Adds the chip component, shared palette helper, and public exports.
- Adopts shared styling in editors, variable controls, chat, and connection examples.
- Adds interaction and palette tests, theme stories, and usage guidance.
| File | Description |
|---|---|
| packages/apollo-wind/src/index.ts | Exports the chip and palette helper; reorders existing exports. |
| packages/apollo-wind/src/foundation/Future/colors.stories.tsx | Documents reference-chip token pairing. |
| packages/apollo-wind/src/components/ui/variable-value-control.tsx | Displays bound variables as chips. |
| packages/apollo-wind/src/components/ui/reference-chip.tsx | Implements the shared chip primitive. |
| packages/apollo-wind/src/components/ui/reference-chip.test.tsx | Tests removal, states, accessibility, and palettes. |
| packages/apollo-wind/src/components/ui/reference-chip.stories.tsx | Demonstrates states, themes, and usage guidance. |
| packages/apollo-wind/src/components/ui/reference-chip-colors.ts | Centralizes valid and invalid palettes. |
| packages/apollo-wind/src/components/ui/prompt-editor/types.ts | Delegates existing token colors to the shared helper. |
| packages/apollo-wind/src/components/ui/prompt-editor/components/TokenPill.tsx | Uses ReferenceChip for editor tokens. |
| packages/apollo-wind/src/components/ui/prompt-editor/components/MarkdownPreview.tsx | Uses shared colors in preview markup. |
| packages/apollo-wind/src/components/ui/index.ts | Exposes chip APIs through the UI barrel. |
| packages/apollo-wind/src/components/ui/code-editors.stories.tsx | Updates documentation copy to mention ReferenceChip. |
| packages/apollo-wind/README.md | Adds API usage and integration guidance. |
| packages/apollo-react/src/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.tsx | Reuses the palette and adds semantic icon color. |
| packages/apollo-react/src/canvas/stories/templates/Flow.stories.tsx | Adopts chips in the Send Email example. |
| apps/storybook/src/patterns/DapLayoutsPage.tsx | Adopts the chip in the Gmail connection picker. |
Review effort: Balanced
Storybook visual diffBaseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs Updated (PT): Oct 16, 2026, 03:49:39 PM |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
The ap-chat resource chip now reads its background, text and icon colors from getReferenceChipColors, and the Flow Send Email example uses ReferenceChip for its connection and body variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4a68289 to
54c827f
Compare
Why
A product connection field (Maestro, Microsoft Outlook 365 connection) rendered its selected value as light text on a bright cyan fill, which fails contrast. Apollo already had the right colors, used by PromptEditor's variable pills, but no shared component or guidance, so each surface hand-built its own chip.
What
New:
ReferenceChip(apollo-wind)readOnly,disabled,invalid,selected.--color-info-background/--color-info-text/--color-info-icon--color-error-background/--color-error-text/--color-error-icongetReferenceChipColors()is exported for hosts that cannot render the component (HTML strings, Emotion).Adopted in
TokenPilland markdown preview (no API change for consumers)VariableValueControltrigger (bound variable now shows as a chip)Docs
Guardrails
Not in scope
#000000); text contrast stays about 7.8:1.ReferenceChip.Testing
tscclean🤖 Generated with Claude Code