fix(app): align schedules screen shell with app conventions

Move the New schedule button out of the screen header (the only screen
using MenuHeader rightContent) into the content filter row, and match the
History screen's full-width layout instead of the 720px centered column.

Tighten the shared sm SegmentedControl and Button vertical padding so the
status switcher and button sit flush with the host-filter pill; this is a
global sm change and also affects settings and the schedule form sheet.
This commit is contained in:
Mohamed Boudra
2026-07-02 15:41:08 +02:00
parent 6513b56571
commit 27f1f1d207
5 changed files with 41 additions and 54 deletions
@@ -24,7 +24,7 @@ interface SchedulesTableProps {
rows: ScheduleRowView[];
/**
* The form sheet is owned by the screen (it serves both create and edit and
* shares the header's "New schedule" button), so the table delegates edit
* shares the screen's "New schedule" button), so the table delegates edit
* upward rather than mounting a second sheet here.
*/
onEditSchedule: (schedule: AggregatedSchedule) => void;
@@ -32,9 +32,9 @@ interface SchedulesTableProps {
/**
* The schedules list: a single settings-style card of rows across every
* connected host, in a centered, width-constrained reading column matching the
* projects list. Rows own their host-scoped mutations (pause/resume/run/delete
* via the mutations hook + a destructive confirm) and delegate editing upward.
* connected host, in a full-width list matching the History screen. Rows own
* their host-scoped mutations (pause/resume/run/delete via the mutations hook +
* a destructive confirm) and delegate editing upward.
*/
export function SchedulesTable({ rows, onEditSchedule }: SchedulesTableProps): ReactElement {
return (
@@ -145,14 +145,9 @@ function SchedulesTableRow({
);
}
const CONTENT_MAX_WIDTH = 720;
const styles = StyleSheet.create((theme) => ({
// Center the card in a readable column, matching settings and projects.
// Full-width list padding matching the History screen.
listContent: {
width: "100%",
maxWidth: CONTENT_MAX_WIDTH,
alignSelf: "center",
paddingHorizontal: theme.spacing[4],
paddingHorizontal: { xs: theme.spacing[3], md: theme.spacing[6] },
},
}));
+1 -1
View File
@@ -50,7 +50,7 @@ const styles = StyleSheet.create((theme) => ({
borderRadius: theme.borderRadius.md,
},
sm: {
paddingVertical: theme.spacing[2],
paddingVertical: theme.spacing[1.5],
paddingHorizontal: theme.spacing[3],
borderRadius: theme.borderRadius.md,
},
@@ -161,7 +161,7 @@ const styles = StyleSheet.create((theme) => ({
gap: theme.spacing[1],
},
segmentSm: {
paddingVertical: theme.spacing[2],
paddingVertical: theme.spacing[1.5],
paddingHorizontal: theme.spacing[4],
},
segmentMd: {