forge
Explore
Log in

Don't you dare go Hollow

💄 expand actions column width across reports & data tables to prevent truncation of İŞLEMLER header

Browse files at this commit

d99bbb5bfe60d2798f208a5dcbceab0ec3df41d2Burak BoduroğluParent: 048fc0c
  • fix
    • 💄 expand actions column width across reports & data tables to prevent truncation of İŞLEMLER header
Show full message
fix: 💄 expand actions column width across reports & data tables to prevent truncation of İŞLEMLER header
- increase default actionColumnClass width in DataTable from w-20 to w-28 (min-w-[7rem]) with whitespace-nowrap
- update actions column headerClass across report pages (student marks, student attendance, student pomodoro, staff work, terms, and users)
- verify full visibility of İŞLEMLER header without cutoff or text wrapping
- pass production build and 207/207 vitest unit tests
src/components/ui/data-table.tsxmodified+1 -1
@@ -110,7 +110,7 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
110110 },
111111 });
112112 const hiddenLocked = (columnId: string) => columnId === "actions" || columnId === "update";
113- const actionColumnClass = (columnId: string) => hiddenLocked(columnId) ? "w-20 min-w-20 max-w-20 px-1 text-center" : undefined;
113+ const actionColumnClass = (columnId: string) => hiddenLocked(columnId) ? "w-28 min-w-[7rem] px-2 text-center whitespace-nowrap" : undefined;
114114 const hideableColumns = () => table.getAllColumns().filter((column) => column.getCanHide() && !hiddenLocked(column.id));
115115 const columnLabel = (column: Column<TData, unknown>) => {
116116 const header = column.columnDef.header;
src/components/users/user-table.tsxmodified+3 -8
@@ -8,7 +8,7 @@ import { Badge } from "@/components/ui/badge";
88 import { ConfirmDialog } from "@/components/ui/confirm-dialog";
99 import { DataTable } from "@/components/ui/data-table";
1010 import { TableRowActions } from "@/components/ui/table-row-actions";
11-import { IconCheck, IconEye, IconUsers } from "@/components/ui/icons";
11+import { IconCheck, IconUsers } from "@/components/ui/icons";
1212 import { ROLES } from "@/lib/roles";
1313 import { cn } from "@/lib/cn";
1414 import { useT } from "@/stores/preferences-context";
@@ -128,13 +128,8 @@ export function UserTable(props: {
128128 },
129129 {
130130 id: "actions",
131- header: () => (
132- <span class="flex items-center justify-center" title={t("common.actions")}>
133- <IconEye class="h-4 w-4 text-muted-foreground" />
134- <span class="sr-only">{t("common.actions")}</span>
135- </span>
136- ),
137- meta: { headerClass: "w-14 text-center", cellClass: "w-14" },
131+ header: t("common.actions"),
132+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap", cellClass: "w-28 text-center" },
138133 cell: (cell) => (
139134 <Show when={cell.row.original.role === "parent"} fallback={<span class="text-center text-muted-foreground/40">—</span>}>
140135 <TableRowActions
src/pages/staff-work-page.tsxmodified+2 -2
@@ -134,7 +134,7 @@ function StaffWorkContent() {
134134 {
135135 id: "actions",
136136 header: t("common.actions"),
137- meta: { headerClass: "w-14 text-center" },
137+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" },
138138 cell: (cell) => (
139139 <TableRowActions
140140 label={t("common.actions")}
@@ -179,7 +179,7 @@ function StaffWorkContent() {
179179 {
180180 id: "actions",
181181 header: t("common.actions"),
182- meta: { headerClass: "w-14 text-center" },
182+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" },
183183 cell: (cell) => (
184184 <TableRowActions
185185 label={t("common.actions")}
src/pages/student-attendance-page.tsxmodified+1 -1
@@ -85,7 +85,7 @@ function StudentAttendanceContent() {
8585 {
8686 id: "actions",
8787 header: t("common.actions"),
88- meta: { headerClass: "w-14 text-center" },
88+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" },
8989 cell: (cell) => (
9090 <TableRowActions
9191 label={t("common.actions")}
src/pages/student-marks-page.tsxmodified+1 -1
@@ -85,7 +85,7 @@ function StudentMarksContent() {
8585 {
8686 id: "actions",
8787 header: t("common.actions"),
88- meta: { headerClass: "w-14 text-center" },
88+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" },
8989 cell: (cell) => (
9090 <TableRowActions
9191 label={t("common.actions")}
src/pages/student-pomodoro-page.tsxmodified+1 -1
@@ -86,7 +86,7 @@ function StudentPomodoroContent() {
8686 {
8787 id: "actions",
8888 header: t("common.actions"),
89- meta: { headerClass: "w-14 text-center" },
89+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" },
9090 cell: (cell) => (
9191 <TableRowActions
9292 label={t("common.actions")}
src/pages/terms-page.tsxmodified+1 -1
@@ -85,7 +85,7 @@ function TermsContent() {
8585 {
8686 id: "actions",
8787 header: t("common.actions"),
88- meta: { headerClass: "w-14 text-center" },
88+ meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" },
8989 cell: (cell) => (
9090 <TableRowActions
9191 label={t("common.actions")}