Repository navigation
feat(chat): add ChatMessageList align prop for top-aligned lists - #3933
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis ReportNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
jiunshinn
marked this pull request as ready for review
July 14, 2026 17:25
jiunshinn
requested review from
cixzhang,
ejhammond and
imdreamrunner
as code owners
July 14, 2026 17:25
cixzhang
enabled auto-merge (squash)
August 24, 2026 00:50
This was referenced Aug 24, 2026
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
… widen it to the trigger line (#5377) * refactor(MultiSelector): rename formatTriggerCount to formatValue and widen it to the trigger line formatValue now receives the selected items ({value, label}[]) and formats the trigger for triggerDisplay 'count' and 'labels'; 'badges' renders elements, so it is excluded. The prop is unreleased, so no codemod or deprecation is needed. Defaults are unchanged when the prop is absent. * fix(storybook): Chat story uses Avatar size 'sm' after the abbreviated size scale #3933 landed a story with size="small" after #4140 replaced Avatar's named sizes with the abbreviated scale, so build-storybook's typecheck fails on main and blocks every PR based on it.
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
…tory (#5381) Avatar's named scale became `xsm | sm | md | lg | xl` (#4140); the align story landed afterwards with `size="small"` (#3933), so `pnpm -F @astryxdesign/storybook typecheck` fails on main and takes the `build` job with it. Every open PR is blocked behind it. Every other Avatar in the file uses a token from the current scale.
AKnassa
added a commit
to AKnassa/astryx
that referenced
this pull request
Aug 27, 2026
AKnassa
added a commit
to AKnassa/astryx
that referenced
this pull request
Aug 27, 2026
`align="top"` (meta#3933) omits the bottom spacer, so the anchor (the spacer's next sibling) was null and a top-aligned list lost its reading position on every prepend. - Anchor on the first message element: after the spacer, else after the spinner while a load is pending, else after the sentinel. Same at the prepended check. The spinner step matters when a load fires as the previous one resolves: anchoring the spinner disarms as soon as it unmounts. - Share the scrollable-ancestor walk with Outline via utils/getScrollableAncestor (internal; utils/index is public API). Outline keeps its overflow requirement by default; ChatMessageList opts out, since an underfilled list's scroller cannot scroll yet. - Add a top-aligned variant of the Load Earlier History story. Adds 3 tests for align="top" and 7 for the helper. Refs meta#4102
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
align?: 'top' | 'bottom'(default'bottom') toChatMessageList.'bottom'preserves today's behavior;'top'omits the internal spacer so messages start at the top and grow downward — for log-style / document-style lists.Closes #2572.
Why
The bottom-pinning spacer was hardcoded and unconditionally rendered, and
xstyleonly reaches the root (ChatMessageList.tsx:275pre-change), so consumers had no way to opt out. Top-aligned lists previously required swizzling.Behavior delta
align='bottom'(default)align='top'scrollHeight <= clientHeight,useChatStreamScroll.ts:142)Implementation (
ChatMessageList.tsx):78-93), destructure with defaultalign = 'bottom'(:227){align === 'bottom' && <div {...stylex.props(styles.spacer)} aria-hidden />}(:313-317) — was an unconditional divSYNC / docs
File header + component JSDoc,
ChatMessageList.doc.mjs(en/zh/dense), newAlignmentStorybook story, changeset.Chat/index.tsunchanged (the existing type re-export already covers the new prop) — deliberately kept untouched to avoid conflicting with #3800.Test plan
4 new cases (spacer present for default &
bottom, absent fortop, children render undertop). Full Chat suite 141/141 green; core typecheck clean.