From bfbfaeb903705dcbbb78d6ca8f74163d64330994 Mon Sep 17 00:00:00 2001 From: cesnimda Date: Tue, 10 Nov 2026 23:10:21 +0100 Subject: [PATCH] fix(applications): keep row actions within viewport --- job-tracker-ui/src/components/JobTable.tsx | 23 +++++++++---------- job-tracker-ui/src/job-table-density.test.tsx | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/job-tracker-ui/src/components/JobTable.tsx b/job-tracker-ui/src/components/JobTable.tsx index 1eeb1ded..69a04f6c 100644 --- a/job-tracker-ui/src/components/JobTable.tsx +++ b/job-tracker-ui/src/components/JobTable.tsx @@ -352,18 +352,17 @@ export default function JobTable({ refreshToken, pageSize, onPageSizeChange, col const expanded = menuJob?.id === job.id; const label = `${t("jobTableActions")}: ${job.jobTitle}`; return ( - - setRowMenu({ id: job.id, anchor: event.currentTarget, mobile: isMobile, mode })} - sx={{ flexShrink: 0, width: isMobile ? 44 : 32, height: isMobile ? 44 : 32, "@media (pointer: coarse)": { width: 44, height: 44 } }} - > - - - + setRowMenu({ id: job.id, anchor: event.currentTarget, mobile: isMobile, mode })} + sx={{ flexShrink: 0, width: isMobile ? 44 : 32, height: isMobile ? 44 : 32, "@media (pointer: coarse)": { width: 44, height: 44 } }} + > + + ); }; diff --git a/job-tracker-ui/src/job-table-density.test.tsx b/job-tracker-ui/src/job-table-density.test.tsx index c1473f9f..e26799b4 100644 --- a/job-tracker-ui/src/job-table-density.test.tsx +++ b/job-tracker-ui/src/job-table-density.test.tsx @@ -205,7 +205,7 @@ test("density survives an empty result and a failed refresh with the existing re fireEvent.click(screen.getByRole("button", { name: /retry/i })); await waitFor(() => expect(screen.queryByRole("alert")).not.toBeInTheDocument()); expect(screen.getByRole("combobox", { name: t.listDensity })).toHaveTextContent(t.densityCompact); - expect(screen.queryByText(job.jobTitle)).not.toBeInTheDocument(); + await waitFor(() => expect(screen.queryByText(job.jobTitle)).not.toBeInTheDocument()); }); test("Bokmål display localizes standard statuses without changing API values or custom status filters", async () => {