Skip to content

fix(Field): export FieldStatusPlacement from the package entry - #9368

Merged
cixzhang merged 1 commit into
mainfrom
fix/export-field-status-placement
Nov 2, 2026
Merged

cixzhang merged 1 commit into
mainfrom
fix/export-field-status-placement

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

User impact

Teams that wrap a field control couldn't type the statusVariant prop they forward. FieldStatusPlacement ('attached' | 'detached' | 'tooltip') is the type of statusVariant on every field control and on useInputStatusIcon, but no entry exported it. Now @astryxdesign/core and @astryxdesign/core/Field export it:

import type {FieldStatusPlacement} from '@astryxdesign/core';

Change

  • Field/index.ts exports the type, and the package entry re-exports the Field barrel.
  • packages/core/api-report.md gains the one expected row.
  • Patch [fix] Changeset.

Current specification

architecture:public-component-api INV1: a type a public component's props use is nameable from its entry. Specs & Decisions ruled this decided by INV1, so no record changes.

Evidence

  • Field/fieldStatusPlacement.public.test.ts imports the type from the package entry and from the Field barrel, and checks it equals both 'attached' | 'detached' | 'tooltip' and TextInputProps['statusVariant']. Without the export, tsc fails with TS2305 on both imports.
  • pnpm api:report --check --package core and check:changesets are clean.

Scope

  • One change: one type export.
  • No record change.
  • Public text contains no internal context.

FieldStatusPlacement is the type of statusVariant on every field control and
on useInputStatusIcon, but callers could not name it, so a wrapper could not
type a statusVariant prop it forwards (public-component-api INV1). The Field
barrel now exports it, which the package entry re-exports. The API report
gains the one row; a type-level test imports it from the entry.
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 1, 2026 5:26pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 1, 2026
@astracat-bot

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 1, 2026, 5:33 PM UTC

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · ba3ec85

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Field 46.4 kB (0) · 8.3 kB CSS (0) — ✗ · ✓ · —
FieldLabel 40.1 kB (0) · 5.9 kB CSS (0) — ✗ · ✓ · —
ComplexSelector 59.6 kB (0) · 11.0 kB CSS (0) — — · — · —
28 more components
Component Size LoC Visual · A11y · RTL
DateInput 103.8 kB (0) · 15.1 kB CSS (0) — — · — · —
DateRangeInput 73.1 kB (0) · 11.5 kB CSS (0) — — · — · —
DateTimeInput 115.6 kB (0) · 15.6 kB CSS (0) — — · — · —
FileInput 57.6 kB (0) · 10.7 kB CSS (0) — — · — · —
InputGroup 47.0 kB (0) · 8.3 kB CSS (0) — — · — · —
MultiSelector 76.6 kB (0) · 15.0 kB CSS (0) — — · — · —
NumberInput 59.1 kB (0) · 11.1 kB CSS (0) — — · — · —
Pagination 89.3 kB (0) · 15.8 kB CSS (0) — — · — · —
PowerSearch 175.3 kB (0) · 20.3 kB CSS (0) — — · — · —
Selector 80.7 kB (0) · 15.4 kB CSS (0) — — · — · —
TextArea 51.7 kB (0) · 9.7 kB CSS (0) — — · — · —
TextInput 56.8 kB (0) · 10.8 kB CSS (0) — — · — · —
TimeInput 92.3 kB (0) · 14.1 kB CSS (0) — — · — · —
Tokenizer 73.4 kB (0) · 16.9 kB CSS (0) — — · — · —
Typeahead 66.3 kB (0) · 11.7 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 68.7 kB (0) · 773 B CSS (0) — — · — · —
lab/ChatReactionBar 69.2 kB (0) · 1.1 kB CSS (0) — — · — · —
lab/CommentComposer 98.0 kB (0) · 1.9 kB CSS (0) — — · — · —
lab/Comments 226.6 kB (0) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 221.9 kB (0) · 2.4 kB CSS (0) — — · — · —
lab/EmojiPicker 66.5 kB (0) · 722 B CSS (0) — — · — · —
lab/ListInput 78.5 kB (0) · 1.6 kB CSS (0) — — · — · —
lab/MobilePowerSearch 160.8 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/MobileTokenizer 96.4 kB (0) · 880 B CSS (0) — — · — · —
lab/TransferList 70.6 kB (0) · 1.7 kB CSS (0) — — · — · —
lab/TransferListSelector 76.2 kB (0) · 1.9 kB CSS (0) — — · — · —
richtext/RichTextEditor 273.2 kB (0) · 2.6 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 217.3 kB (0) · 454 B CSS (0) — — · — · —
Visual changes: 2 snapshots in 1 component

A change is a question for the reviewer, not a failure.

Component · story Before After Diff
Field · Default (neutral, light) before frame after frame diff frame
Field · Default (neutral, dark) before frame after frame diff frame

Package size: @astryxdesign/core 5.68 MB packed (+24 B); no new dependencies.

API changes: core +2 · ~0 · −0

2 API changes (advisory)
Package Where Signature Usage
+ core . · Types · type FieldStatusPlacement type FieldStatusPlacement = keyof FieldStatusVariantMap | 'tooltip' import type {FieldStatusPlacement} from '@astryxdesign/core'
+ core ./Field · Also exported from an earlier entry point · FieldStatusPlacement FieldStatusPlacement (.) import {FieldStatusPlacement} from '@astryxdesign/core/Field'

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ready to approve. FieldStatusPlacement can now be imported from @astryxdesign/core and @astryxdesign/core/Field, which the public API rule requires for a public prop's type. The new type test fails without the export and passes with it, and the committed API report rows match the build. Nothing else is needed from you.

[Automated review]

@cixzhang
cixzhang marked this pull request as ready for review November 1, 2026 23:44
@cixzhang
cixzhang merged commit a835628 into main Nov 2, 2026
100 checks passed
@github-actions
github-actions Bot deleted the fix/export-field-status-placement branch November 2, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — ba3ec85e Deployed Nov 1, 2026 by vercel[bot]
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant