Skip to content

Use shared Button component across Inertia pages - #1658

Open
skyfallwastaken wants to merge 1 commit into
mainfrom
chore/inertia-shared-buttons-sep-2026
Open

skyfallwastaken wants to merge 1 commit into
mainfrom
chore/inertia-shared-buttons-sep-2026

Conversation

@skyfallwastaken

Copy link
Copy Markdown
Member

Summary of the problem

Several Inertia Svelte pages and components still used raw HTML buttons instead of the shared Button component required by project conventions.

Describe your changes

Replaces nine raw buttons in UserPicker, Admin Timeline and Setup with the shared component. Each replacement uses unstyled so 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.

Copilot AI lite review requested due to automatic review settings September 1, 2026 02:35
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR standardizes button usage across Inertia/Svelte pages without intentionally changing behavior or appearance.

  • Replaces nine native buttons with the shared Button component.
  • Preserves explicit button types, event handlers, accessibility attributes, and custom classes through the unstyled variant.
  • Covers user selection, admin timeline controls, and setup-flow interactions.

Confidence Score: 5/5

The 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

Filename Overview
app/javascript/components/UserPicker.svelte Replaces the selected-user clear control with an unstyled shared Button while preserving its type, handler, and classes.
app/javascript/pages/Admin/Timeline.svelte Migrates search results, selected-user removal, and trust controls to shared Buttons with their existing events and attributes retained.
app/javascript/pages/Setup/Index.svelte Migrates the setup-flow back control to the shared Button without changing navigation behavior.
app/javascript/pages/Setup/TerminalCommand.svelte Migrates operating-system tab controls to shared Buttons and explicitly retains type="button".
app/javascript/pages/Setup/VsCodeSteps.svelte Migrates image zoom controls while retaining click behavior and accessible labels.
app/javascript/pages/Setup/components/SetupCodeBlock.svelte Migrates the clipboard control while preserving its explicit type, handler, and custom styling.
app/javascript/pages/Setup/components/TwoChoiceCard.svelte Migrates the reusable choice card to the shared Button while preserving its event and visual behavior.

Reviews (1): Last reviewed commit: "Use shared Button across Inertia pages" | Re-trigger Greptile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 shared Button component 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 use Button and 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.

This branch has not been deployed

No deployments
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.

2 participants