Skip to content

v2.0.0

Choose a tag to compare

@cuonggt cuonggt released this 22 Oct 02:01
· 17 commits to master since this release

Added

  • The frontend is rebuilt on shadcn/ui, following Laravel's react and vue starter kits (#27, #28, #29, #30, #31, #32, #33, #34). shadcn copies source into the project rather than shipping a package, which is how Kaze already works, so the primitives are vendored into Components/ui and are yours to edit.

    A design token layer comes with it. Colour is now bg-background, text-muted-foreground, border-sidebar-border and so on, resolving through oklch variables defined once per stylesheet, instead of bg-white dark:bg-gray-800 repeated per element. A components.json records the aliases so npx shadcn@latest add <component> lands in the right place — note that Kaze uses a capitalised @/Components, which that file already reflects.

    Thirteen primitives for each Inertia stack: button, input, label, checkbox, dialog, dropdown-menu, separator, skeleton, sheet, tooltip, avatar, breadcrumb and sidebar, plus a cn helper in lib/utils. React builds on Radix, Vue on reka-ui.

  • A collapsible sidebar replaces the top navigation bar in all three stacks. It collapses to icons, becomes a drawer below md, and remembers its state in a sidebar_state cookie that the server reads back, so the first paint matches the last choice rather than flashing open.

    There is no shadcn for Hotwire, so its sidebar is hand-rolled in Alpine and ERB against the same tokens, with the lucide icons inlined through a new IconComponent since Hotwire has no npm.

  • A settings area at /settings/profile, /settings/password and /settings/appearance, replacing the single profile page (#35, #36). /settings redirects to the profile page. Each has its own breadcrumb and page title, and the delete-account form stays on the profile page.

Changed

  • The profile page has moved and its routes with it. /profile is now /settings/profile, and password updates post to /settings/password rather than to the profile page. The route helper names are unchanged — profile_edit_path still exists, it just points somewhere new — so an application that uses the helpers rather than hard-coded paths needs no edit. password_edit_path and appearance_edit_path are new. ProfileController and PasswordController become Settings::ProfileController, Settings::PasswordController and Settings::AppearanceController.

  • The dark variant is redefined, in all three stylesheets:

    /* was */ @custom-variant dark (&:where(.dark, .dark *));
    /* now */ @custom-variant dark (&:is(.dark *));

    :where() contributes no specificity, so a dark: utility tied with its light counterpart and won or lost on the order Tailwind happened to emit them in — dark:text-black lost to text-white on the same element. :is() gives the variant the higher specificity, which is what Laravel's kits use. If you have written a dark: override that was silently losing, it will now apply; if you wrote one that depended on losing, it will not.

  • The Vue stack pins typescript to ^5.9.3, down from ^7.0.2 (#30). @vue/compiler-sfc needs filesystem access to resolve prop types that cross a package boundary, which the vendored primitives do, and the resolver it uses is not compatible with TypeScript 7. The React stack stays on 7.

Removed

  • The hand-rolled components the shadcn primitives replace: PrimaryButton, SecondaryButton, DangerButton, TextInput, InputLabel, Checkbox, Modal, Dropdown, NavLink and ResponsiveNavLink from both Inertia stacks, DropdownLink from the Vue stack, and NavLinkComponent and ResponsiveNavLinkComponent from Hotwire. The buttons, inputs and labels map onto Button, Input and Label with a variant; the navigation links have no successor, because the sidebar replaced what used them.

Fixed

  • kaze install exits non-zero when it fails. Every step is guarded, so the installer already stopped at the first failure and withheld its success message — but the process still exited 0, so a script or CI job saw a green step over a half-installed application. This is the same class of silent failure as #11, in the exit code rather than the output. Anything that runs kaze install unattended and currently passes over a failure will now fail, which is the point.

Upgrading

Kaze scaffolds rather than vendors, so nothing changes under an existing application on its own. Re-running kaze install over one built with 1.4.0 or earlier does not remove what this release replaced — the installer copies files in and never deletes, deliberately, since by then they are yours and may be edited. The replaced files are left behind for you to delete:

stack left behind
all app/controllers/profile_controller.rb, app/controllers/password_controller.rb
react, vue app/javascript/Components/{PrimaryButton,SecondaryButton,DangerButton,TextInput,InputLabel,Checkbox,Modal,Dropdown,NavLink,ResponsiveNavLink}, DropdownLink on vue, and the whole of app/javascript/Pages/Profile/
hotwire app/components/{nav_link,responsive_nav_link}_component.rb, app/views/layouts/_navigation.html.erb, and the whole of app/views/profile/

On the React stack this is not optional: tsc typechecks every file under app/javascript, and the stale Pages/Profile/Edit.tsx still passes a header prop that the layout no longer takes, so the build fails until that directory is gone. Vue and Hotwire build and run with the stale files in place — they are dead weight rather than a break, since nothing routes to them any more.