Use shared Button component across Inertia pages - #1658
skyfallwastaken wants to merge 1 commit into
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a05ac9-bb70-7199-8653-27edb2c033ee Co-authored-by: Amp <amp@ampcode.com>
Greptile SummaryThis PR standardizes button usage across Inertia/Svelte pages without intentionally changing behavior or appearance.
Confidence Score: 5/5The PR appears safe to merge with no concrete behavioral, accessibility, styling, or security regression identified. The shared Button’s unstyled path preserves custom classes and forwards the explicit types, handlers, and accessibility attributes used by the migrated controls. Important Files Changed
Reviews (1): Last reviewed commit: "Use shared Button across Inertia pages" | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR aligns Inertia Svelte UI with the project convention of using the shared Button component by replacing remaining raw <button> elements across Setup flow pages, Admin Timeline interactions and the UserPicker component. The replacements use unstyled to preserve existing bespoke styling while keeping explicit type, handlers and accessibility attributes.
Changes:
- Replaced raw
<button>usage with the sharedButtoncomponent in Setup flow screens and shared Setup components. - Updated Admin Timeline interactive controls (search results selection, chip removal and trust action) to use
Button. - Updated
UserPicker’s “Clear” action to useButtonand added the necessary import.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/javascript/pages/Setup/VsCodeSteps.svelte | Uses shared Button for the zoomable step image while keeping custom styling via unstyled. |
| app/javascript/pages/Setup/TerminalCommand.svelte | Replaces OS tab <button> elements with Button while preserving tab styling and behaviour. |
| app/javascript/pages/Setup/Index.svelte | Replaces the “Back” control with Button and adds the import. |
| app/javascript/pages/Setup/components/TwoChoiceCard.svelte | Switches the card’s clickable button to the shared Button component with unstyled. |
| app/javascript/pages/Setup/components/SetupCodeBlock.svelte | Uses shared Button for the copy action and adds the import. |
| app/javascript/pages/Admin/Timeline.svelte | Converts user-selection and admin actions in the timeline UI to use Button with unstyled. |
| app/javascript/components/UserPicker.svelte | Converts the “Clear” control to use shared Button and adds the import. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
f1786c8 to
6101271
Compare
Summary of the problem
Several Inertia Svelte pages and components still used raw HTML buttons instead of the shared
Buttoncomponent required by project conventions.Describe your changes
Replaces nine raw buttons in
UserPicker, Admin Timeline and Setup with the shared component. Each replacement usesunstyledso bespoke classes and appearance remain intact while preserving explicit button types, event behaviour, semantics and accessibility attributes.Screenshots / Media
Not included because appearance is unchanged.