Skip to content

feat(plugins): add classNames overrides for targeted styling - #280

Merged
olliethedev merged 4 commits into
better-stack-ai:mainfrom
devansh-jagtap:feat/plugin-classnames-overrides
Sep 30, 2026
Merged

olliethedev merged 4 commits into
better-stack-ai:mainfrom
devansh-jagtap:feat/plugin-classnames-overrides

Conversation

@devansh-jagtap

@devansh-jagtap devansh-jagtap commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds optional, typed classNames slots to Blog, AI Chat, CMS, and Form Builder so consumers can style built-in UI without replacing components. Classes merge with defaults, with consumer overrides winning Tailwind conflicts. Closes Add classNames field to plugin overrides for styling customization #36.
  • Preserves the default Blog tag layout when no tag-list override is supplied, and keeps public-form styling through loading, error, and successful submission. Includes regression coverage, usage examples, and regenerated shadcn registry output.
  • Prepares the paired @btst/stack and @btst/codegen 4.1.0 release on current main. Generated installations and playground templates select Stack 4.1.0.

Type of change

  • Bug fix
  • New plugin
  • Feature / enhancement to an existing plugin
  • Documentation
  • Chore / refactor / tooling

Checklist

  • pnpm build passes
  • pnpm typecheck passes
  • pnpm lint passes
  • Tests added or updated: 1,096 Stack tests and 196 Codegen tests pass locally; all 23 styling tests pass
  • Docs updated (docs/content/docs/); docs production build passes
  • All three codegen-projects create successfully and pass hosted E2E tests on the merge commit, including live AI: Next.js 192 passed / 1 intentional framework skip; React Router 187 passed / 1 flaky test passed on retry / 1 intentional framework skip; TanStack 189 passed.
  • New plugin: not applicable

Local Knip, 7 release-gate tests, and 8 packed-consumer harness tests also pass. The additional regression assertions reproduced seven failures before the fixes. Independent standards and specification reviews of 0a0e192cdecd932d721cba0b1017c9ad9cfe44d7 found no remaining blockers. All hosted workflows, both actual Vercel production deployments, and publication preflight passed on merge commit b22183f63c5e5729b234cbb1acff68c5b8e51531. Main E2E needed retries for existing live-AI flakiness and one runner with slow Ubuntu package downloads; no source, assertions, or release requirements were changed for those retries. Full E2E ran in GitHub Actions; local browser checks covered the generated Next.js preview at desktop and mobile sizes. No late review findings remain. Release 4.1.0 is published and its publication workflow passed. Both npm packages resolve through latest to 4.1.0 and the merge commit; fresh-cache downloads and tarball checksums are verified.

Slots

Plugin Slots
Blog container, postCard, postTitle, postMeta, tagsList, pagination
AI Chat container, sidebar, messageList, message, userMessage, assistantMessage, input
CMS container, contentTypeCard, contentTypeTitle, table, tableRow, pagination
Form Builder container, table, tableRow, pagination, form

Form Builder's table and pagination slots cover both forms and submissions. form merges after the standalone FormRenderer.className prop and persists across its states. Blog's optional tagsList adds a flex wrapper only when supplied. Slots style the built-in components; replacement components own their styling. Form fields and submit-button primitives remain outside this change's scope.

Blog with default styling, with date and tags wrapping independently

Blog with classNames overrides for card border, title, metadata and tags

Copilot AI lite review requested due to automatic review settings September 27, 2026 17:54
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

@devansh-jagtap is attempting to deploy a commit to the olliethedev's Team Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@olliethedev

Copy link
Copy Markdown
Collaborator

Reviewed the final head 0a0e192cdecd932d721cba0b1017c9ad9cfe44d7 against current main and issue #36. Fixed two findings: the default Blog tag layout must remain unchanged without an override, and FormRenderer styling must persist through loading/error/success. The new regression assertions failed before the fixes and now pass; both independent final-head reviews found no remaining blockers.

Local verification: 1,096 Stack tests, 196 Codegen tests, all 23 styling tests, typecheck, lint, build, Knip, docs production build, 7 release-gate tests, and 8 packed-consumer harness tests pass. Default/styled screenshots are attached; the generated Next.js preview also stayed within the viewport at desktop and mobile widths. Full hosted framework/consumer checks are still running.

The earlier Vercel authorization notices concern old fork commits. Both real deployments now pass on the final head via the matching upstream review branch. Copilot's quota notice did not contain a code finding; independent review is complete. No review threads remain unanswered.

@olliethedev
olliethedev merged commit b22183f into better-stack-ai:main Sep 30, 2026
16 of 17 checks passed
@olliethedev

Copy link
Copy Markdown
Collaborator

Main verification update: TanStack passed all 189 tests. Next.js and React Router each hit the existing sidebar-chat smoke test: the live AI response exceeded its 30-second wait, then the built-in retry matched both the retained sidebar title and the message using the test's unscoped text selector. The trace shows the message rendered and the response still in progress; this PR does not change that test or streaming behavior. Next.js also recovered from a public-chat request timeout on its built-in retry.

Rerunning the two failed jobs once on the unchanged merge commit. Publication remains gated on successful full main checks; no test assertions or release checks have been relaxed.

@olliethedev

Copy link
Copy Markdown
Collaborator

Released in 4.1.0. Both @btst/stack@latest and @btst/codegen@latest now resolve to 4.1.0 from merge commit b22183f63c5e5729b234cbb1acff68c5b8e51531. The release workflow passed, and both published tarballs downloaded with a fresh npm cache and matched their integrity metadata.

All main workflows and both production deployments passed. Final E2E results: Next.js 192 passed / 1 intentional framework skip; TanStack 189 passed; React Router 187 passed / 1 flaky test passed on retry / 1 intentional framework skip. Existing live-AI flakiness required failed-job retries, and a later Next.js attempt needed an infrastructure retry for slow Ubuntu package downloads. No assertions or release gates were weakened. The PR description now contains the final verification and release links.

This branch was successfully deployed

2 active deployments
Preview – better-stack-docs — 0a0e192c Deployed Sep 30, 2026 by vercel[bot]
Preview – better-stack-playground — 0a0e192c Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add classNames field to plugin overrides for styling customization

3 participants