fix(web): keep settings section actions aligned on narrow screens (#1727)
The section header squeezed the actions toolbar next to the title, so on smaller widths the Workflows toolbar wrapped with its second row left-dangling (Add Workflow floating alone). The header now stacks the actions under the title below sm, protects them from compression by long descriptions, and right-aligns wrapped toolbar rows beside the title. Co-authored-by: Kandev Agent <agent@kandev.dev> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,15 +17,18 @@ export function SettingsSection({
|
||||
}: SettingsSectionProps) {
|
||||
return (
|
||||
<section className="space-y-4">
|
||||
<div className="flex items-start justify-between">
|
||||
<div>
|
||||
{/* Stack the action row under the title on narrow screens instead of
|
||||
squeezing both onto one line; shrink-0 keeps the actions from being
|
||||
compressed by a long description when side by side. */}
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div className="min-w-0">
|
||||
<h3 className="text-lg font-semibold flex items-center gap-2">
|
||||
{icon}
|
||||
{title}
|
||||
</h3>
|
||||
{description && <p className="text-sm text-muted-foreground mt-1">{description}</p>}
|
||||
</div>
|
||||
{action && <div>{action}</div>}
|
||||
{action && <div className="shrink-0">{action}</div>}
|
||||
</div>
|
||||
{children}
|
||||
</section>
|
||||
|
||||
@@ -20,7 +20,9 @@ export function WorkflowSectionActions({
|
||||
onGitHubSync,
|
||||
}: WorkflowSectionActionsProps) {
|
||||
return (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
// sm:justify-end keeps wrapped rows right-aligned next to the section
|
||||
// title; below sm the toolbar sits under the title, left-aligned.
|
||||
<div className="flex flex-wrap gap-2 sm:justify-end">
|
||||
<WorkflowSyncButton onClick={onGitHubSync} />
|
||||
<Button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user