mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 15:44:22 +00:00
* feat(@shadcn/react): add message-scroller package Add the @shadcn/react headless primitives package with MessageScroller scroll anchoring, streaming follow, history prepend, and jump-to-message behavior. Includes geometry helpers, use-render utility, and unit, browser, and perf tests. * feat(registry): add chat components Add MessageScroller, Message, Bubble, Attachment, and Marker registry sources for base and radix, style variants, preview-03 chat blocks, and registry index wiring. * feat(v4): integrate chat components into docs site Wire chat components into the v4 app with docs routes, example preview pages, message part renderers, markdown support, registry build updates, and supporting lib utilities. * feat(examples): add chat component demos Add base and radix example demos for MessageScroller, Message, Bubble, Attachment, Marker, scroll-fade, and shimmer. * docs: add chat component documentation Add component and utility docs for the chat component set, update docs navigation, and add the June 2026 chat components changelog entry. * chore: regenerate registry JSON output Rebuild public registry artifacts for all style variants with the new chat components. * chore(release): add @shadcn/react publish and CI pipeline Add Changesets prerelease workflow, browser test job, RELEASING docs, and monorepo wiring for publishing @shadcn/react independently from the shadcn CLI. * docs: fix display of component preview on mobile * fix * fix * docs: add message scroller docs * style: format * fix
95 lines
2.9 KiB
YAML
95 lines
2.9 KiB
YAML
# Adapted from create-t3-app.
|
|
name: Write Prerelease comment
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Release"]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
comment:
|
|
if: |
|
|
github.repository_owner == 'shadcn-ui' &&
|
|
github.event.workflow_run.event == 'pull_request' &&
|
|
github.event.workflow_run.conclusion == 'success'
|
|
runs-on: ubuntu-latest
|
|
name: Write comment to the PR
|
|
steps:
|
|
# Stable pushes and no-changeset runs upload no artifact, so a missing
|
|
# download is expected — gate the rest of the job on it succeeding.
|
|
- name: Download prerelease info
|
|
id: download
|
|
continue-on-error: true
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: prerelease-info
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build comment
|
|
id: info
|
|
if: steps.download.outcome == 'success'
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const fs = require("fs");
|
|
const info = JSON.parse(fs.readFileSync("prerelease-info.json", "utf8"));
|
|
|
|
if (!info.packages || info.packages.length === 0) {
|
|
core.info("No prerelease packages to comment.");
|
|
return;
|
|
}
|
|
|
|
const installs = info.packages
|
|
.map((p) => `pnpm dlx ${p.name}@${p.version}`)
|
|
.join("\n");
|
|
const links = info.packages
|
|
.map(
|
|
(p) =>
|
|
`- [${p.name}@${p.version}](https://www.npmjs.com/package/${p.name}/v/${p.version})`
|
|
)
|
|
.join("\n");
|
|
|
|
const body = [
|
|
`A new ${info.channel} prerelease is available for testing:`,
|
|
"",
|
|
"```sh",
|
|
installs,
|
|
"```",
|
|
"",
|
|
links,
|
|
].join("\n");
|
|
|
|
core.setOutput("pr", info.pr);
|
|
core.setOutput("channel", info.channel);
|
|
core.setOutput("body", body);
|
|
|
|
- name: Comment on PR
|
|
if: steps.info.outputs.body
|
|
uses: marocchino/sticky-pull-request-comment@v2
|
|
with:
|
|
number: ${{ steps.info.outputs.pr }}
|
|
message: ${{ steps.info.outputs.body }}
|
|
|
|
- name: Remove the prerelease label once published
|
|
if: steps.info.outputs.pr
|
|
uses: actions/github-script@v7
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
try {
|
|
await github.rest.issues.removeLabel({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: Number("${{ steps.info.outputs.pr }}"),
|
|
name: `release: ${{ steps.info.outputs.channel }}`,
|
|
});
|
|
} catch (error) {
|
|
if (error.status !== 404) {
|
|
throw error;
|
|
}
|
|
|
|
core.info("The prerelease label was already removed.");
|
|
}
|