From 7f3994b4d1db0920baa3d331974d2d094a821ac1 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 18 Dec 2024 10:49:30 +0000 Subject: [PATCH 01/34] reduces the thickness of the focus-visible --- apps/webapp/tailwind.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/tailwind.config.js b/apps/webapp/tailwind.config.js index b7c505964f..54a5769d10 100644 --- a/apps/webapp/tailwind.config.js +++ b/apps/webapp/tailwind.config.js @@ -212,7 +212,7 @@ module.exports = { prod: prodEnv, }, focusStyles: { - outline: "2px solid", + outline: "1px solid", outlineOffset: "0px", outlineColor: textLink, borderRadius: "2px", From 7020df3f20d7c101dc53c16d339b772ada0e47a9 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 18 Dec 2024 10:49:48 +0000 Subject: [PATCH 02/34] More subtle Input style --- apps/webapp/app/components/primitives/Input.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/webapp/app/components/primitives/Input.tsx b/apps/webapp/app/components/primitives/Input.tsx index a78d11ed3c..7cb4b8a32d 100644 --- a/apps/webapp/app/components/primitives/Input.tsx +++ b/apps/webapp/app/components/primitives/Input.tsx @@ -4,7 +4,7 @@ import { cn } from "~/utils/cn"; import { Icon, RenderIcon } from "./Icon"; const containerBase = - "has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-text-link has-[:focus-visible]:ring-offset-0 has-[:focus]:border-ring has-[:focus]:outline-none has-[:focus]:ring-2 has-[:focus]:ring-ring has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50 ring-offset-background transition cursor-text"; + "has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-charcoal-650 has-[:focus-visible]:ring-offset-0 has-[:focus]:border-ring has-[:focus]:outline-none has-[:focus]:ring-1 has-[:focus]:ring-ring has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50 ring-offset-background transition cursor-text"; const inputBase = "h-full w-full text-text-bright bg-transparent file:border-0 file:bg-transparent file:text-base file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed outline-none ring-0 border-none"; @@ -17,27 +17,27 @@ const variants = { container: "px-1 w-full h-10 rounded-[3px] border border-charcoal-800 bg-charcoal-750 hover:border-charcoal-600 hover:bg-charcoal-650", input: "px-2 text-sm", - iconSize: "h-4 w-4 ml-1", + iconSize: "size-4 ml-1", shortcut: "mr-1 min-w-[22px] rounded-sm py-[3px] px-[5px] text-[0.6rem] select-none", }, medium: { container: "px-1 h-8 w-full rounded border border-charcoal-800 bg-charcoal-750 hover:border-charcoal-600 hover:bg-charcoal-650", input: "px-1.5 rounded text-sm", - iconSize: "h-4 w-4 ml-0.5", + iconSize: "size-4 ml-0.5", shortcut: "min-w-[22px] rounded-sm py-[3px] px-[5px] text-[0.6rem]", }, small: { container: "px-1 h-6 w-full rounded border border-charcoal-800 bg-charcoal-750 hover:border-charcoal-600 hover:bg-charcoal-650", input: "px-1 rounded text-xs", - iconSize: "h-3 w-3 ml-0.5", + iconSize: "size-3 ml-0.5", shortcut: "min-w-[22px] rounded-[2px] py-px px-[3px] text-[0.5rem]", }, tertiary: { container: "px-1 h-6 w-full rounded hover:bg-charcoal-750", input: "px-1 rounded text-xs", - iconSize: "h-3 w-3 ml-0.5", + iconSize: "size-3 ml-0.5", shortcut: "min-w-[22px] rounded-[2px] py-px px-[3px] text-[0.5rem]", }, }; From dc2e0632225f16dd3f12b871c7a42b783627446a Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 18 Dec 2024 10:52:38 +0000 Subject: [PATCH 03/34] Updates focus-visible styles for the SimpleSelect --- apps/webapp/app/components/primitives/SimpleSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/app/components/primitives/SimpleSelect.tsx b/apps/webapp/app/components/primitives/SimpleSelect.tsx index 61ea34133f..d7b9e4cccb 100644 --- a/apps/webapp/app/components/primitives/SimpleSelect.tsx +++ b/apps/webapp/app/components/primitives/SimpleSelect.tsx @@ -29,7 +29,7 @@ const SelectTrigger = React.forwardRef< Date: Wed, 18 Dec 2024 11:32:55 +0000 Subject: [PATCH 04/34] Tables tab through rows and action cells only --- apps/webapp/app/components/primitives/Table.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 045d54b4e9..d7e8cad749 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -78,8 +78,9 @@ export const TableRow = forwardRef( return ( ( colSpan={colSpan} > {to ? ( - + {children} ) : onClick ? ( - ) : ( From 5dc8d7f5d2c33acbc55593f5038bb22dc275752d Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 18 Dec 2024 11:33:06 +0000 Subject: [PATCH 05/34] Refined focus visible style --- apps/webapp/tailwind.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/tailwind.config.js b/apps/webapp/tailwind.config.js index 54a5769d10..e57368fb3c 100644 --- a/apps/webapp/tailwind.config.js +++ b/apps/webapp/tailwind.config.js @@ -215,7 +215,7 @@ module.exports = { outline: "1px solid", outlineOffset: "0px", outlineColor: textLink, - borderRadius: "2px", + borderRadius: "3px", }, borderRadius: { lg: radius, From a1c37d669509d4e79a1877608b061b10a8087e5e Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 18 Dec 2024 11:39:35 +0000 Subject: [PATCH 06/34] Adds the custom focus visible to the TextLink --- apps/webapp/app/components/primitives/TextLink.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/webapp/app/components/primitives/TextLink.tsx b/apps/webapp/app/components/primitives/TextLink.tsx index 984edbf610..e5c8e7d487 100644 --- a/apps/webapp/app/components/primitives/TextLink.tsx +++ b/apps/webapp/app/components/primitives/TextLink.tsx @@ -4,9 +4,9 @@ import { cn } from "~/utils/cn"; const variations = { primary: - "text-indigo-500 transition hover:text-indigo-400 inline-flex gap-0.5 items-center group", + "text-indigo-500 transition hover:text-indigo-400 inline-flex gap-0.5 items-center group focus-visible:focus-custom", secondary: - "text-text-dimmed transition underline underline-offset-2 decoration-dimmed/50 hover:decoration-dimmed inline-flex gap-0.5 items-center group", + "text-text-dimmed transition underline underline-offset-2 decoration-dimmed/50 hover:decoration-dimmed inline-flex gap-0.5 items-center group focus-visible:focus-custom", } as const; type TextLinkProps = { @@ -34,14 +34,14 @@ export function TextLink({ {children}{" "} {trailingIcon && ( - + )} ) : href ? ( {children}{" "} {trailingIcon && ( - + )} ) : ( From 687ead4a5f6f238d6ed9634f659cf487d63fad67 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Wed, 18 Dec 2024 13:34:30 +0000 Subject: [PATCH 07/34] Moves the onClick handling to the table row rather than the cell --- .../app/components/primitives/Table.tsx | 72 +++++++++++-------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index d7e8cad749..76cc612d59 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -1,6 +1,6 @@ import { ChevronRightIcon } from "@heroicons/react/24/solid"; -import { Link } from "@remix-run/react"; -import { ReactNode, forwardRef, useState } from "react"; +import { useNavigate } from "@remix-run/react"; +import React, { ReactNode, forwardRef, useState } from "react"; import { cn } from "~/utils/cn"; import { Popover, PopoverContent, PopoverVerticalEllipseTrigger } from "./Popover"; import { InfoIconTooltip } from "./Tooltip"; @@ -44,6 +44,7 @@ export const TableHeader = forwardRef "sticky top-0 z-10 bg-background-dimmed after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-grid-bright", className )} + tabIndex={-1} > {children} @@ -71,16 +72,49 @@ type TableRowProps = { children: ReactNode; disabled?: boolean; isSelected?: boolean; + to?: string; + onClick?: (event: React.KeyboardEvent | React.MouseEvent) => void; }; export const TableRow = forwardRef( - ({ className, disabled, isSelected, children }, ref) => { + ({ className, disabled, isSelected, children, to, onClick }, ref) => { + const navigate = useNavigate(); + + const handleInteraction = (event: React.KeyboardEvent | React.MouseEvent) => { + if ((event.target as HTMLElement).closest('button, a, [role="button"]')) { + return; + } + + const firstCellWithTo = React.Children.toArray(children).find((child) => { + if (React.isValidElement(child) && child.type === TableCell) { + return child.props.to; + } + return false; + }) as React.ReactElement | undefined; + + if (firstCellWithTo?.props.to) { + navigate(firstCellWithTo.props.to); + } else if (onClick) { + onClick(event); + } + }; + + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === "Enter") { + event.preventDefault(); + event.stopPropagation(); + handleInteraction(event); + } + }; + return ( {hiddenLabel ? ( {children} @@ -154,7 +189,7 @@ type TableCellProps = TableCellBasicProps & { const rowHoverStyles = { default: - "group-hover/table-row:bg-charcoal-800 group-hover/table-row:before:absolute group-hover/table-row:before:bg-charcoal-750 group-hover/table-row:before:top-[-1px] group-hover/table-row:before:left-0 group-hover/table-row:before:h-px group-hover/table-row:before:w-3 group-hover/table-row:after:absolute group-hover/table-row:after:bg-charcoal-750 group-hover/table-row:after:bottom-0 group-hover/table-row:after:left-0 group-hover/table-row:after:h-px group-hover/table-row:after:w-3", + "group-hover/table-row:bg-charcoal-800 group-focus-visible/table-row:bg-background-bright group-hover/table-row:before:absolute group-hover/table-row:before:bg-charcoal-750 group-hover/table-row:before:top-[-1px] group-hover/table-row:before:left-0 group-hover/table-row:before:h-px group-hover/table-row:before:w-3 group-hover/table-row:after:absolute group-hover/table-row:after:bg-charcoal-750 group-hover/table-row:after:bottom-0 group-hover/table-row:after:left-0 group-hover/table-row:after:h-px group-hover/table-row:after:w-3", dimmed: "group-hover/table-row:bg-charcoal-850 group-hover/table-row:before:absolute group-hover/table-row:before:bg-charcoal-800 group-hover/table-row:before:top-[-1px] group-hover/table-row:before:left-0 group-hover/table-row:before:h-px group-hover/table-row:before:w-3 group-hover/table-row:after:absolute group-hover/table-row:after:bg-charcoal-800 group-hover/table-row:after:bottom-0 group-hover/table-row:after:left-0 group-hover/table-row:after:h-px group-hover/table-row:after:w-3", bright: @@ -193,22 +228,13 @@ export const TableCell = forwardRef( break; } - const flexClasses = cn( - "flex w-full whitespace-nowrap px-3 py-3 text-xs text-text-dimmed", - alignment === "left" - ? "justify-start text-left" - : alignment === "center" - ? "justify-center text-center" - : "justify-end text-right" - ); - return ( ( )} colSpan={colSpan} > - {to ? ( - - {children} - - ) : onClick ? ( - - ) : ( - <>{children} - )} + {children} ); } From 758a96d21d7ab0ad62004469e6fe482ddf72c1fb Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Thu, 19 Dec 2024 12:00:25 +0000 Subject: [PATCH 08/34] Makes table row heights consistent --- apps/webapp/app/components/primitives/Table.tsx | 5 ++--- .../route.tsx | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 76cc612d59..a3c4002fd6 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -209,8 +209,6 @@ export const TableCell = forwardRef( alignment = "left", children, colSpan, - to, - onClick, hasAction = false, isSticky = false, rowHoverStyle = "default", @@ -233,8 +231,9 @@ export const TableCell = forwardRef( ref={ref} className={cn( "text-xs text-charcoal-400", - hasAction ? "cursor-pointer" : "px-3 py-3 align-middle", + hasAction ? "cursor-pointer" : "h-10 min-h-10 px-3 align-middle", alignmentClassName, + actionClassName, isSticky && stickyStyles, isSelected && isSelectedStyle, !isSelected && rowHoverStyles[rowHoverStyle], diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx index 29876d96dc..496c270f69 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx @@ -460,6 +460,7 @@ function AlertChannelDetails({ alertChannel }: { alertChannel: AlertChannelListP label={"Email"} description={alertChannel.properties.email} boxClassName="group-hover/table-row:bg-charcoal-800" + className="h-12" /> ); } From 8fd2948d6713264053e6750bacef2e8f8e683546 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Thu, 19 Dec 2024 12:12:58 +0000 Subject: [PATCH 09/34] Adds gap between task search bar and button --- .../route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx index 74d5ca966c..ca6f902ace 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx @@ -224,7 +224,7 @@ export default function Page() {
{!userHasTasks && }
-
+
Date: Thu, 19 Dec 2024 12:15:30 +0000 Subject: [PATCH 10/34] Prevents long tag values from wrapping --- apps/webapp/app/components/runs/v3/RunTag.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/app/components/runs/v3/RunTag.tsx b/apps/webapp/app/components/runs/v3/RunTag.tsx index 875457dc2e..014bb15fa2 100644 --- a/apps/webapp/app/components/runs/v3/RunTag.tsx +++ b/apps/webapp/app/components/runs/v3/RunTag.tsx @@ -22,7 +22,7 @@ export function RunTag({ tag }: { tag: string }) { {tagResult.key} - + {tagResult.value} From 9f577c7259e16970bdfd785ab448d79857969f35 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 23 Dec 2024 10:23:42 +0000 Subject: [PATCH 11/34] Removes unnecessary rows from table header --- .../app/components/runs/v3/TaskRunsTable.tsx | 310 +++++++++--------- .../route.tsx | 28 +- .../route.tsx | 10 +- 3 files changed, 171 insertions(+), 177 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index 957be45dc1..bf344a0c4c 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -106,173 +106,171 @@ export function TaskRunsTable({ return ( - - {allowSelection && ( - - {runs.length > 0 && ( - r.id))} - onChange={(element) => { - const ids = runs.map((r) => r.id); - const checked = element.currentTarget.checked; - if (checked) { - select(ids); - } else { - deselect(ids); - } - }} - ref={(r) => { - checkboxes.current[0] = r; - }} - onKeyDown={(event) => navigateCheckboxes(event, 0)} - /> - )} - - )} - Run # - Env - Task - Version - - {filterableTaskRunStatuses.map((status) => ( -
-
- -
- - {descriptionForTaskRunStatus(status)} - -
- ))} - - } - > - Status + {allowSelection && ( + + {runs.length > 0 && ( + r.id))} + onChange={(element) => { + const ids = runs.map((r) => r.id); + const checked = element.currentTarget.checked; + if (checked) { + select(ids); + } else { + deselect(ids); + } + }} + ref={(r) => { + checkboxes.current[0] = r; + }} + onKeyDown={(event) => navigateCheckboxes(event, 0)} + /> + )} - Started - -
-
- - Queued duration -
- - The amount of time from when the run was created to it starting to run. - -
-
-
- Run duration + )} + Run # + Env + Task + Version + + {filterableTaskRunStatuses.map((status) => ( +
+
+
- - The total amount of time from the run starting to it finishing. This includes - all time spent waiting. + + {descriptionForTaskRunStatus(status)}
-
-
- - Compute duration -
- - The amount of compute time used in the run. This does not include time spent - waiting. - + ))} +
+ } + > + Status +
+ Started + +
+
+ + Queued duration
-
- } - > - Duration -
- {showCompute && ( - <> - Compute - - )} - Test - Created at - - - When you want to trigger a task now, but have it run at a later time, you can use - the delay option. + + The amount of time from when the run was created to it starting to run. - - Runs that are delayed and have not been enqueued yet will display in the dashboard - with a “Delayed” status. - - - Read docs -
- } - > - Delayed until - - - - You can set a TTL (time to live) when triggering a task, which will automatically - expire the run if it hasn’t started within the specified time. - - - All runs in development have a default ttl of 10 minutes. You can disable this by - setting the ttl option. +
+
+ Run duration +
+ + The total amount of time from the run starting to it finishing. This includes all + time spent waiting. - - Read docs -
- } - > - TTL -
- - - You can add tags to a run and then filter runs using them. - - - You can add tags when triggering a run or inside the run function. +
+
+ + Compute duration +
+ + The amount of compute time used in the run. This does not include time spent + waiting. - - Read docs -
- } - > - Tags -
- - Go to page - - +
+ } + > + Duration +
+ {showCompute && ( + <> + Compute + + )} + Test + Created at + + + When you want to trigger a task now, but have it run at a later time, you can use + the delay option. + + + Runs that are delayed and have not been enqueued yet will display in the dashboard + with a “Delayed” status. + + + Read docs + + + } + > + Delayed until + + + + You can set a TTL (time to live) when triggering a task, which will automatically + expire the run if it hasn’t started within the specified time. + + + All runs in development have a default ttl of 10 minutes. You can disable this by + setting the ttl option. + + + Read docs + + + } + > + TTL + + + + You can add tags to a run and then filter runs using them. + + + You can add tags when triggering a run or inside the run function. + + + Read docs + + + } + > + Tags + + + Go to page +
{total === 0 && !hasFilters ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx index ca6f902ace..c2f1319bdc 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx @@ -245,16 +245,14 @@ export default function Page() {
- - Task ID - Task - Running - Queued - Activity (7d) - Avg. duration - Environments - Go to page - + Task ID + Task + Running + Queued + Activity (7d) + Avg. duration + Environments + Go to page {filteredItems.length > 0 ? ( @@ -291,13 +289,13 @@ export default function Page() { {task.slug} - + - + @@ -313,7 +311,7 @@ export default function Page() { - + }> {(data) => { @@ -323,7 +321,7 @@ export default function Page() { - + }> {(data) => { @@ -343,7 +341,7 @@ export default function Page() { - + }> {(data) => { diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx index 57c10df9ff..9c19dadf4a 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx @@ -210,12 +210,10 @@ function TaskSelector({ )}
- - - Task - - File path - + + Task + + File path {filteredItems.length > 0 ? ( From 6028ef301856fa06ac2f5bb1c82de54b4951538e Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 23 Dec 2024 10:42:50 +0000 Subject: [PATCH 12/34] Added gap between search and filters --- apps/webapp/app/components/runs/v3/ScheduleFilters.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/ScheduleFilters.tsx b/apps/webapp/app/components/runs/v3/ScheduleFilters.tsx index 66f6743938..7cbb182e76 100644 --- a/apps/webapp/app/components/runs/v3/ScheduleFilters.tsx +++ b/apps/webapp/app/components/runs/v3/ScheduleFilters.tsx @@ -93,7 +93,7 @@ export function ScheduleFilters({ possibleEnvironments, possibleTasks }: Schedul }, []); return ( -
+
handleSearchChange(e.target.value)} /> - +
- - Name - Alert types - Environments - Channel - Enabled - Actions - + Name + Alert types + Environments + Channel + Enabled + Actions {alertChannels.length > 0 ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx index ea9c9c4e2e..cea798a085 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx @@ -85,14 +85,12 @@ export default function Page() {
- - Environment - Secret key - Key generated - Latest version - Env vars - Actions - + Environment + Secret key + Key generated + Latest version + Env vars + Actions {environments.map((environment) => ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx index b4ef617d52..86d72566b8 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx @@ -80,12 +80,10 @@ export default function Page() {
- - Environment - Queued - Running - Concurrency limit - + Environment + Queued + Running + Concurrency limit }> diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx index 411698cdb6..c0ee8e0a9a 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx @@ -120,39 +120,37 @@ export default function Page() {
- - Deploy - Env - Version - - {deploymentStatuses.map((status) => ( -
-
- -
- - {deploymentStatusDescription(status)} - + Deploy + Env + Version + + {deploymentStatuses.map((status) => ( +
+
+
- ))} -
- } - > - Status -
- Tasks - Deployed at - Deployed by - Go to page - + + {deploymentStatusDescription(status)} + +
+ ))} + + } + > + Status +
+ Tasks + Deployed at + Deployed by + Go to page
{deployments.length > 0 ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx index 9b3d2aa566..f937e63046 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx @@ -214,15 +214,13 @@ export default function Page() { )}
- - Key - {environments.map((environment) => ( - - - - ))} - Actions - + Key + {environments.map((environment) => ( + + + + ))} + Actions {environmentVariables.length > 0 ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx index 85915e1594..920b58584f 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx @@ -385,64 +385,62 @@ function SchedulesTable({ return (
- - ID - Task ID - -
-
-
- - {scheduleTypeName("DECLARATIVE")} -
+ ID + Task ID + +
+
+
+ + {scheduleTypeName("DECLARATIVE")}
- - Declarative schedules are defined in a{" "} - schedules.task with the{" "} - cron - property. They sync when you update your{" "} - schedules.task definition and run - the CLI dev or deploy commands. -
-
-
-
- - {scheduleTypeName("IMPERATIVE")} -
+ + Declarative schedules are defined in a{" "} + schedules.task with the{" "} + cron + property. They sync when you update your{" "} + schedules.task definition and run + the CLI dev or deploy commands. + +
+
+
+
+ + {scheduleTypeName("IMPERATIVE")}
- - Imperative schedules are defined here in the dashboard or by using the SDK - functions to create or delete them. They can be created, updated, disabled, and - deleted from the dashboard or using the SDK. -
- - View the docs - + + Imperative schedules are defined here in the dashboard or by using the SDK + functions to create or delete them. They can be created, updated, disabled, and + deleted from the dashboard or using the SDK. +
- } - > - Type - - External ID - CRON - CRON description - Timezone - Next run - Last run - Deduplication key - Environments - Enabled - + + View the docs + +
+ } + > + Type + + External ID + CRON + CRON description + Timezone + Next run + Last run + Deduplication key + Environments + Enabled {schedules.length === 0 ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx index b509a9728f..0c0a22c6ca 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx @@ -207,14 +207,12 @@ export default function Page() { <>
- - Task - Runs - Average duration - Average cost - Total duration - Total cost - + Task + Runs + Average duration + Average cost + Total duration + Total cost {tasks.length === 0 ? ( From 4ab3f3c6b87ec4c86993f55dfff2359366457820 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 23 Dec 2024 12:30:31 +0000 Subject: [PATCH 15/34] Removed isSelected styles (not working) --- apps/webapp/app/components/primitives/Table.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index a3c4002fd6..a598ea4d6f 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -313,10 +313,7 @@ export const TableCellMenu = forwardRef<
{/* Hidden buttons that show on hover */} From f9caa9f0ab36cca3d65e1f8d14141cba137d9bcd Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Tue, 31 Dec 2024 14:30:54 +0000 Subject: [PATCH 16/34] Added
back to the main Table compontent --- .../app/components/primitives/Table.tsx | 3 +- .../route.tsx | 60 +++++++++---------- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index a598ea4d6f..abe38a81c3 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -44,9 +44,8 @@ export const TableHeader = forwardRef "sticky top-0 z-10 bg-background-dimmed after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-grid-bright", className )} - tabIndex={-1} > - {children} + {children} ); } diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx index ceb620624f..cb03cdfbae 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx @@ -134,38 +134,36 @@ function BatchesTable({ batches, hasFilters, filters }: BatchList) { return (
- - ID - Env - - {allBatchStatuses.map((status) => ( -
-
- -
- - {descriptionForBatchStatus(status)} - + ID + Env + + {allBatchStatuses.map((status) => ( +
+
+
- ))} -
- } - > - Status -
- Runs - Duration - Created - Finished - - Go to batch - - + + {descriptionForBatchStatus(status)} + +
+ ))} + + } + > + Status +
+ Runs + Duration + Created + Finished + + Go to batch +
{batches.length === 0 && !hasFilters ? ( From b2394741fa2ed6b908e00673b1a395ae89ca7146 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Fri, 3 Jan 2025 17:16:55 +0000 Subject: [PATCH 17/34] Table row handles modifier keys --- .../app/components/primitives/Table.tsx | 52 ++++++++++++++----- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index abe38a81c3..02809dbae3 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -79,20 +79,45 @@ export const TableRow = forwardRef( ({ className, disabled, isSelected, children, to, onClick }, ref) => { const navigate = useNavigate(); - const handleInteraction = (event: React.KeyboardEvent | React.MouseEvent) => { - if ((event.target as HTMLElement).closest('button, a, [role="button"]')) { + const handleNavigation = (event: React.KeyboardEvent | React.MouseEvent) => { + // Don't trigger navigation if clicking on interactive elements + if ((event.target as HTMLElement).closest('button, a, [role="button"], [role="menu"]')) { return; } - const firstCellWithTo = React.Children.toArray(children).find((child) => { - if (React.isValidElement(child) && child.type === TableCell) { - return child.props.to; + // For mouse events + if ("button" in event) { + // Handle middle mouse button click + if (event.button === 1) { + return; // Let default behavior handle middle click } - return false; - }) as React.ReactElement | undefined; - if (firstCellWithTo?.props.to) { - navigate(firstCellWithTo.props.to); + // Handle CMD/CTRL + Click + if (event.metaKey || event.ctrlKey) { + if (to) { + window.open(to, "_blank"); + } + return; + } + } + + // For keyboard events + if ("key" in event) { + if (event.key === "Enter") { + if (event.metaKey || event.ctrlKey) { + if (to) { + window.open(to, "_blank"); + } + return; + } + } else { + return; // Only handle Enter key for keyboard events + } + } + + // Default navigation behavior + if (to) { + navigate(to); } else if (onClick) { onClick(event); } @@ -102,22 +127,24 @@ export const TableRow = forwardRef( if (event.key === "Enter") { event.preventDefault(); event.stopPropagation(); - handleInteraction(event); + handleNavigation(event); } }; return ( {children} @@ -236,6 +263,7 @@ export const TableCell = forwardRef( isSticky && stickyStyles, isSelected && isSelectedStyle, !isSelected && rowHoverStyles[rowHoverStyle], + "child:pointer-events-none [&>[role=button]]:pointer-events-auto [&>[role=menu]]:pointer-events-auto [&>a]:pointer-events-auto [&>button]:pointer-events-auto", className )} colSpan={colSpan} From 8a814d434ff85b8ab9c2305d336074f659d86094 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Fri, 3 Jan 2025 17:28:28 +0000 Subject: [PATCH 18/34] Adds to={path} to the TableRow only --- .../app/components/runs/v3/TaskRunsTable.tsx | 40 ++++++++----------- .../route.tsx | 16 ++++---- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index bf344a0c4c..18b7906aef 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -283,7 +283,7 @@ export function TaskRunsTable({ runs.map((run, index) => { const path = v3RunSpanPath(organization, project, run, { spanId: run.spanId }); return ( - + {allowSelection && ( )} - - {formatNumber(run.number)} - - + {formatNumber(run.number)} + - + {run.taskIdentifier} {run.rootTaskRunId === null ? Root : null} - {run.version ?? "–"} - + {run.version ?? "–"} + } /> - - {run.startedAt ? : "–"} - - + {run.startedAt ? : "–"} +
{run.startedAt ? ( @@ -340,7 +336,7 @@ export function TaskRunsTable({ )}
- +
{run.startedAt && run.finishedAt ? ( @@ -354,7 +350,7 @@ export function TaskRunsTable({ )}
- +
{run.usageDurationMs > 0 @@ -365,21 +361,17 @@ export function TaskRunsTable({
{showCompute && ( - + {run.costInCents > 0 ? formatCurrencyAccurate(run.costInCents / 100) : "–"} )} - + {run.isTest ? : "–"} - - {run.createdAt ? : "–"} - - - {run.delayUntil ? : "–"} - - {run.ttl ?? "–"} - + {run.createdAt ? : "–"} + {run.delayUntil ? : "–"} + {run.ttl ?? "–"} +
{run.tags.map((tag) => ) || "–"}
diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx index c2f1319bdc..c289e25956 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx @@ -279,8 +279,8 @@ export default function Page() { : v3TestPath(organization, project); return ( - - + +
} @@ -289,13 +289,13 @@ export default function Page() { {task.slug}
- + - + @@ -311,7 +311,7 @@ export default function Page() { - + }> {(data) => { @@ -321,7 +321,7 @@ export default function Page() { - + }> {(data) => { @@ -341,7 +341,7 @@ export default function Page() { - + }> {(data) => { @@ -355,7 +355,7 @@ export default function Page() { - + Date: Sat, 4 Jan 2025 15:26:02 +0000 Subject: [PATCH 19/34] Revert "Adds to={path} to the TableRow only" This reverts commit 8a814d434ff85b8ab9c2305d336074f659d86094. --- .../app/components/runs/v3/TaskRunsTable.tsx | 40 +++++++++++-------- .../route.tsx | 16 ++++---- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index 18b7906aef..bf344a0c4c 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -283,7 +283,7 @@ export function TaskRunsTable({ runs.map((run, index) => { const path = v3RunSpanPath(organization, project, run, { spanId: run.spanId }); return ( - + {allowSelection && ( )} - {formatNumber(run.number)} - + + {formatNumber(run.number)} + + - + {run.taskIdentifier} {run.rootTaskRunId === null ? Root : null} - {run.version ?? "–"} - + {run.version ?? "–"} + } /> - {run.startedAt ? : "–"} - + + {run.startedAt ? : "–"} + +
{run.startedAt ? ( @@ -336,7 +340,7 @@ export function TaskRunsTable({ )}
- +
{run.startedAt && run.finishedAt ? ( @@ -350,7 +354,7 @@ export function TaskRunsTable({ )}
- +
{run.usageDurationMs > 0 @@ -361,17 +365,21 @@ export function TaskRunsTable({
{showCompute && ( - + {run.costInCents > 0 ? formatCurrencyAccurate(run.costInCents / 100) : "–"} )} - + {run.isTest ? : "–"} - {run.createdAt ? : "–"} - {run.delayUntil ? : "–"} - {run.ttl ?? "–"} - + + {run.createdAt ? : "–"} + + + {run.delayUntil ? : "–"} + + {run.ttl ?? "–"} +
{run.tags.map((tag) => ) || "–"}
diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx index c289e25956..c2f1319bdc 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx @@ -279,8 +279,8 @@ export default function Page() { : v3TestPath(organization, project); return ( - - + +
} @@ -289,13 +289,13 @@ export default function Page() { {task.slug}
- + - + @@ -311,7 +311,7 @@ export default function Page() { - + }> {(data) => { @@ -321,7 +321,7 @@ export default function Page() { - + }> {(data) => { @@ -341,7 +341,7 @@ export default function Page() { - + }> {(data) => { @@ -355,7 +355,7 @@ export default function Page() { - + Date: Sat, 4 Jan 2025 15:26:15 +0000 Subject: [PATCH 20/34] Revert "Table row handles modifier keys" This reverts commit b2394741fa2ed6b908e00673b1a395ae89ca7146. --- .../app/components/primitives/Table.tsx | 52 +++++-------------- 1 file changed, 12 insertions(+), 40 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 02809dbae3..abe38a81c3 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -79,45 +79,20 @@ export const TableRow = forwardRef( ({ className, disabled, isSelected, children, to, onClick }, ref) => { const navigate = useNavigate(); - const handleNavigation = (event: React.KeyboardEvent | React.MouseEvent) => { - // Don't trigger navigation if clicking on interactive elements - if ((event.target as HTMLElement).closest('button, a, [role="button"], [role="menu"]')) { + const handleInteraction = (event: React.KeyboardEvent | React.MouseEvent) => { + if ((event.target as HTMLElement).closest('button, a, [role="button"]')) { return; } - // For mouse events - if ("button" in event) { - // Handle middle mouse button click - if (event.button === 1) { - return; // Let default behavior handle middle click + const firstCellWithTo = React.Children.toArray(children).find((child) => { + if (React.isValidElement(child) && child.type === TableCell) { + return child.props.to; } + return false; + }) as React.ReactElement | undefined; - // Handle CMD/CTRL + Click - if (event.metaKey || event.ctrlKey) { - if (to) { - window.open(to, "_blank"); - } - return; - } - } - - // For keyboard events - if ("key" in event) { - if (event.key === "Enter") { - if (event.metaKey || event.ctrlKey) { - if (to) { - window.open(to, "_blank"); - } - return; - } - } else { - return; // Only handle Enter key for keyboard events - } - } - - // Default navigation behavior - if (to) { - navigate(to); + if (firstCellWithTo?.props.to) { + navigate(firstCellWithTo.props.to); } else if (onClick) { onClick(event); } @@ -127,24 +102,22 @@ export const TableRow = forwardRef( if (event.key === "Enter") { event.preventDefault(); event.stopPropagation(); - handleNavigation(event); + handleInteraction(event); } }; return (
{children} @@ -263,7 +236,6 @@ export const TableCell = forwardRef( isSticky && stickyStyles, isSelected && isSelectedStyle, !isSelected && rowHoverStyles[rowHoverStyle], - "child:pointer-events-none [&>[role=button]]:pointer-events-auto [&>[role=menu]]:pointer-events-auto [&>a]:pointer-events-auto [&>button]:pointer-events-auto", className )} colSpan={colSpan} From 8ad74430290f876cbeddbc2aa39d7235fc3853c5 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sat, 4 Jan 2025 17:08:18 +0000 Subject: [PATCH 21/34] Table reverted to use linked cells rather than rows --- .../app/components/primitives/Table.tsx | 63 ++++++++----------- 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index abe38a81c3..8e1be1d576 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -1,5 +1,5 @@ import { ChevronRightIcon } from "@heroicons/react/24/solid"; -import { useNavigate } from "@remix-run/react"; +import { Link, useNavigate } from "@remix-run/react"; import React, { ReactNode, forwardRef, useState } from "react"; import { cn } from "~/utils/cn"; import { Popover, PopoverContent, PopoverVerticalEllipseTrigger } from "./Popover"; @@ -76,42 +76,11 @@ type TableRowProps = { }; export const TableRow = forwardRef( - ({ className, disabled, isSelected, children, to, onClick }, ref) => { - const navigate = useNavigate(); - - const handleInteraction = (event: React.KeyboardEvent | React.MouseEvent) => { - if ((event.target as HTMLElement).closest('button, a, [role="button"]')) { - return; - } - - const firstCellWithTo = React.Children.toArray(children).find((child) => { - if (React.isValidElement(child) && child.type === TableCell) { - return child.props.to; - } - return false; - }) as React.ReactElement | undefined; - - if (firstCellWithTo?.props.to) { - navigate(firstCellWithTo.props.to); - } else if (onClick) { - onClick(event); - } - }; - - const handleKeyDown = (event: React.KeyboardEvent) => { - if (event.key === "Enter") { - event.preventDefault(); - event.stopPropagation(); - handleInteraction(event); - } - }; - + ({ className, disabled, isSelected, children }, ref) => { return ( ( alignment = "left", children, colSpan, + to, + onClick, hasAction = false, isSticky = false, rowHoverStyle = "default", @@ -225,14 +196,22 @@ export const TableCell = forwardRef( break; } + const flexClasses = cn( + "flex w-full whitespace-nowrap px-3 py-3 items-center text-xs text-text-dimmed", + alignment === "left" + ? "justify-start text-left" + : alignment === "center" + ? "justify-center text-center" + : "justify-end text-right" + ); + return ( ); } From 796e0d348c83c1e0a27c773c7d974bd1ad5f5e58 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sat, 4 Jan 2025 17:49:32 +0000 Subject: [PATCH 22/34] Set the tab index of a cell and style the table row when tabbed --- .../webapp/app/components/primitives/Table.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 8e1be1d576..ea316f4065 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -80,9 +80,9 @@ export const TableRow = forwardRef( return ( ( isSticky = false, rowHoverStyle = "default", isSelected, + isTabbableCell = false, }, ref ) => { @@ -220,11 +222,19 @@ export const TableCell = forwardRef( colSpan={colSpan} > {to ? ( - + {children} ) : onClick ? ( - ) : ( From 17302b84f5d5478f650f292a7681d46b99b45dac Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sat, 4 Jan 2025 18:50:49 +0000 Subject: [PATCH 23/34] Tabbed row style applied to the sticky cells --- apps/webapp/app/components/primitives/Table.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index ea316f4065..17da458968 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -166,7 +166,7 @@ const rowHoverStyles = { }; const stickyStyles = - "sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 w-[--sticky-width] [&:has(.group-hover\\/table-row\\:block)]:w-auto"; + "sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 [&:has(.group-hover\\/table-row\\:block)]:w-auto group-has-[[tabindex='0']:focus]:bg-background-bright"; const isSelectedStyle = "bg-charcoal-750 group-hover:bg-charcoal-750"; @@ -212,7 +212,7 @@ export const TableCell = forwardRef( ref={ref} className={cn( "text-xs text-charcoal-400", - to || onClick || hasAction ? "cursor-pointer" : "px-3 py-3 align-middle", + to || onClick || hasAction ? "cursor-pointer" : "cursor-default px-3 py-3 align-middle", !to && !onClick && alignmentClassName, isSticky && stickyStyles, isSelected && isSelectedStyle, @@ -311,7 +311,7 @@ export const TableCellMenu = forwardRef<
{/* Hidden buttons that show on hover */} From 9edd0e2c1a46638bc7df30c276d9f62629b58147 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sat, 4 Jan 2025 18:52:07 +0000 Subject: [PATCH 24/34] Adds isTabbableCell to each table --- apps/webapp/app/components/runs/v3/TaskRunsTable.tsx | 2 +- .../route.tsx | 2 +- .../route.tsx | 6 ++++-- .../route.tsx | 6 ++---- .../route.tsx | 2 +- .../route.tsx | 2 +- .../route.tsx | 1 + 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index bf344a0c4c..32bfbd1f74 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -298,7 +298,7 @@ export function TaskRunsTable({ /> )} - + {formatNumber(run.number)} diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx index c2f1319bdc..945ee803d6 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx @@ -280,7 +280,7 @@ export default function Page() { return ( - +
} diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx index cb03cdfbae..ebf23664cd 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx @@ -185,7 +185,9 @@ function BatchesTable({ batches, hasFilters, filters }: BatchList) { const path = v3BatchRunsPath(organization, project, batch); return ( - {batch.friendlyId} + + {batch.friendlyId} + - + Legacy batch } diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx index 7678f53633..1ec85e3aa4 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx @@ -210,10 +210,8 @@ export default function Page() {
( )} colSpan={colSpan} > - {children} + {to ? ( + + {children} + + ) : onClick ? ( + + ) : ( + <>{children} + )}
- - Task - File path - + Task + File path {deployment.tasks.map((t) => { diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx index c0ee8e0a9a..c3ee4779b1 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx @@ -168,7 +168,7 @@ export default function Page() { const isSelected = deploymentParam === deployment.shortCode; return ( - +
{deployment.shortCode} {deployment.label && ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx index 920b58584f..182a4f91c5 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx @@ -452,7 +452,7 @@ function SchedulesTable({ const cellClass = schedule.active ? "" : "opacity-50"; return ( - + {schedule.friendlyId} diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx index 9c19dadf4a..e6e946467a 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx @@ -264,6 +264,7 @@ function TaskRow({ task, environmentSlug }: { task: TaskListItem; environmentSlu From 5b11f5cbec4b66a48dc36f5a71ae532b34e7d72c Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sat, 4 Jan 2025 19:02:12 +0000 Subject: [PATCH 25/34] Improves the spcificity of the row highlighting --- apps/webapp/app/components/primitives/Table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 17da458968..856779a934 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -166,7 +166,7 @@ const rowHoverStyles = { }; const stickyStyles = - "sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 [&:has(.group-hover\\/table-row\\:block)]:w-auto group-has-[[tabindex='0']:focus]:bg-background-bright"; + "sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 [&:has(.group-hover\\/table-row\\:block)]:w-auto group-has-[[tabindex='0']:focus]/table-row:bg-background-bright"; const isSelectedStyle = "bg-charcoal-750 group-hover:bg-charcoal-750"; @@ -311,7 +311,7 @@ export const TableCellMenu = forwardRef<
{/* Hidden buttons that show on hover */} From 2219abc03351bafb6293827ca65c9dc3c5082818 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sat, 4 Jan 2025 19:19:50 +0000 Subject: [PATCH 26/34] Reduces the height of the task rows to match the other tables --- .../route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx index 945ee803d6..7ff742f6eb 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx @@ -321,7 +321,7 @@ export default function Page() { - + }> {(data) => { From ab32e4d097fabbee272913dbce60679c6ae9dcd8 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Sun, 5 Jan 2025 12:52:44 +0000 Subject: [PATCH 27/34] Adds tab styles to fill in row dividers top and bottom --- apps/webapp/app/components/primitives/Table.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 856779a934..ac115eb5ad 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -168,6 +168,9 @@ const rowHoverStyles = { const stickyStyles = "sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 [&:has(.group-hover\\/table-row\\:block)]:w-auto group-has-[[tabindex='0']:focus]/table-row:bg-background-bright"; +const tabFocusRowDividerStyles = + "has-[[tabindex='0']:focus]:after:absolute has-[[tabindex='0']:focus]:after:bottom-0 has-[[tabindex='0']:focus]:after:left-0 has-[[tabindex='0']:focus]:after:right-0 has-[[tabindex='0']:focus]:after:h-px has-[[tabindex='0']:focus]:after:bg-grid-dimmed has-[[tabindex='0']:focus]:before:absolute has-[[tabindex='0']:focus]:before:left-0 has-[[tabindex='0']:focus]:before:-top-px has-[[tabindex='0']:focus]:before:h-px has-[[tabindex='0']:focus]:before:w-3 has-[[tabindex='0']:focus]:before:bg-grid-dimmed"; + const isSelectedStyle = "bg-charcoal-750 group-hover:bg-charcoal-750"; export const TableCell = forwardRef( @@ -217,6 +220,7 @@ export const TableCell = forwardRef( isSticky && stickyStyles, isSelected && isSelectedStyle, !isSelected && rowHoverStyles[rowHoverStyle], + tabFocusRowDividerStyles, className )} colSpan={colSpan} From 2d46781ea5822991b06f8e7f28f9350c62b4343f Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 10:08:07 +0000 Subject: [PATCH 28/34] Removed old row onClick and to props --- apps/webapp/app/components/primitives/Table.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index ac115eb5ad..2ff7e73918 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -1,5 +1,5 @@ import { ChevronRightIcon } from "@heroicons/react/24/solid"; -import { Link, useNavigate } from "@remix-run/react"; +import { Link } from "@remix-run/react"; import React, { ReactNode, forwardRef, useState } from "react"; import { cn } from "~/utils/cn"; import { Popover, PopoverContent, PopoverVerticalEllipseTrigger } from "./Popover"; @@ -71,8 +71,6 @@ type TableRowProps = { children: ReactNode; disabled?: boolean; isSelected?: boolean; - to?: string; - onClick?: (event: React.KeyboardEvent | React.MouseEvent) => void; }; export const TableRow = forwardRef( From 399896152871933f3df8bad1b81ce92e4e2d3288 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 10:08:17 +0000 Subject: [PATCH 29/34] Removed duplicate table header row --- .../route.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx index a246a32ab3..5456cf4db7 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx @@ -303,10 +303,8 @@ export default function Page() { Next 5 runs
- - {!isUtc && {schedule.timezone}} - UTC - + {!isUtc && {schedule.timezone}} + UTC {schedule.active ? ( From e7fd0c7a6942549c8a5c667cff27f185f9cf5157 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 17:03:10 +0000 Subject: [PATCH 30/34] Creates table style variants so tables look good in the inspector panels --- .../app/components/primitives/Table.tsx | 124 +++++++++++------- .../app/components/runs/v3/TaskRunsTable.tsx | 5 +- .../route.tsx | 4 +- 3 files changed, 83 insertions(+), 50 deletions(-) diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 2ff7e73918..d01c0c6c15 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -1,10 +1,33 @@ import { ChevronRightIcon } from "@heroicons/react/24/solid"; import { Link } from "@remix-run/react"; -import React, { ReactNode, forwardRef, useState } from "react"; +import React, { ReactNode, forwardRef, useState, useContext, createContext } from "react"; import { cn } from "~/utils/cn"; import { Popover, PopoverContent, PopoverVerticalEllipseTrigger } from "./Popover"; import { InfoIconTooltip } from "./Tooltip"; +const variants = { + bright: { + header: "bg-background-bright", + cell: "group-hover/table-row:bg-charcoal-750 group-has-[[tabindex='0']:focus]/table-row:bg-charcoal-750", + stickyCell: "bg-background-bright group-hover/table-row:bg-charcoal-750", + menuButton: + "bg-background-bright group-hover/table-row:bg-charcoal-750 group-hover/table-row:ring-charcoal-600/70 group-has-[[tabindex='0']:focus]/table-row:bg-charcoal-750", + menuButtonDivider: "group-hover/table-row:border-charcoal-600/70", + rowSelected: "bg-charcoal-750 group-hover/table-row:bg-charcoal-750", + }, + dimmed: { + header: "bg-background-dimmed", + cell: "group-hover/table-row:bg-charcoal-800 group-has-[[tabindex='0']:focus]/table-row:bg-background-bright", + stickyCell: "group-hover/table-row:bg-charcoal-800", + menuButton: + "bg-background-dimmed group-hover/table-row:bg-charcoal-800 group-hover/table-row:ring-grid-bright group-has-[[tabindex='0']:focus]/table-row:bg-background-bright", + menuButtonDivider: "group-hover/table-row:border-grid-dimmed", + rowSelected: "bg-charcoal-750 group-hover/table-row:bg-charcoal-750", + }, +} as const; + +export type TableVariant = keyof typeof variants; + type TableProps = { containerClassName?: string; className?: string; @@ -12,20 +35,25 @@ type TableProps = { fullWidth?: boolean; }; -export const Table = forwardRef( - ({ className, containerClassName, children, fullWidth }, ref) => { +// Add TableContext +const TableContext = createContext<{ variant: TableVariant }>({ variant: "dimmed" }); + +export const Table = forwardRef( + ({ className, containerClassName, children, fullWidth, variant = "dimmed" }, ref) => { return ( -
-
- {children} -
-
+ +
+ + {children} +
+
+
); } ); @@ -33,15 +61,18 @@ export const Table = forwardRef( type TableHeaderProps = { className?: string; children: ReactNode; + variant?: TableVariant; }; -export const TableHeader = forwardRef( +export const TableHeader = forwardRef>( ({ className, children }, ref) => { + const { variant } = useContext(TableContext); return ( @@ -71,18 +102,19 @@ type TableRowProps = { children: ReactNode; disabled?: boolean; isSelected?: boolean; + variant?: TableVariant; }; -export const TableRow = forwardRef( +export const TableRow = forwardRef>( ({ className, disabled, isSelected, children }, ref) => { + const { variant } = useContext(TableContext); return ( @@ -95,7 +127,7 @@ export const TableRow = forwardRef( type TableCellBasicProps = { className?: string; alignment?: "left" | "center" | "right"; - children: ReactNode; + children?: ReactNode; colSpan?: number; }; @@ -149,29 +181,14 @@ type TableCellProps = TableCellBasicProps & { hasAction?: boolean; isSticky?: boolean; actionClassName?: string; - rowHoverStyle?: keyof typeof rowHoverStyles; + rowHoverStyle?: string; isSelected?: boolean; isTabbableCell?: boolean; + variant?: TableVariant; + children?: ReactNode; }; -const rowHoverStyles = { - default: - "group-hover/table-row:bg-charcoal-800 group-focus-visible/table-row:bg-background-bright group-hover/table-row:before:absolute group-hover/table-row:before:bg-charcoal-750 group-hover/table-row:before:top-[-1px] group-hover/table-row:before:left-0 group-hover/table-row:before:h-px group-hover/table-row:before:w-3 group-hover/table-row:after:absolute group-hover/table-row:after:bg-charcoal-750 group-hover/table-row:after:bottom-0 group-hover/table-row:after:left-0 group-hover/table-row:after:h-px group-hover/table-row:after:w-3", - dimmed: - "group-hover/table-row:bg-charcoal-850 group-hover/table-row:before:absolute group-hover/table-row:before:bg-charcoal-800 group-hover/table-row:before:top-[-1px] group-hover/table-row:before:left-0 group-hover/table-row:before:h-px group-hover/table-row:before:w-3 group-hover/table-row:after:absolute group-hover/table-row:after:bg-charcoal-800 group-hover/table-row:after:bottom-0 group-hover/table-row:after:left-0 group-hover/table-row:after:h-px group-hover/table-row:after:w-3", - bright: - "group-hover/table-row:bg-charcoal-750 group-hover/table-row:before:absolute group-hover/table-row:before:bg-charcoal-700 group-hover/table-row:before:top-[-1px] group-hover/table-row:before:left-0 group-hover/table-row:before:h-px group-hover/table-row:before:w-3 group-hover/table-row:after:absolute group-hover/table-row:after:bg-charcoal-700 group-hover/table-row:after:bottom-0 group-hover/table-row:after:left-0 group-hover/table-row:after:h-px group-hover/table-row:after:w-3", -}; - -const stickyStyles = - "sticky right-0 bg-background-dimmed group-hover/table-row:bg-charcoal-750 [&:has(.group-hover\\/table-row\\:block)]:w-auto group-has-[[tabindex='0']:focus]/table-row:bg-background-bright"; - -const tabFocusRowDividerStyles = - "has-[[tabindex='0']:focus]:after:absolute has-[[tabindex='0']:focus]:after:bottom-0 has-[[tabindex='0']:focus]:after:left-0 has-[[tabindex='0']:focus]:after:right-0 has-[[tabindex='0']:focus]:after:h-px has-[[tabindex='0']:focus]:after:bg-grid-dimmed has-[[tabindex='0']:focus]:before:absolute has-[[tabindex='0']:focus]:before:left-0 has-[[tabindex='0']:focus]:before:-top-px has-[[tabindex='0']:focus]:before:h-px has-[[tabindex='0']:focus]:before:w-3 has-[[tabindex='0']:focus]:before:bg-grid-dimmed"; - -const isSelectedStyle = "bg-charcoal-750 group-hover:bg-charcoal-750"; - -export const TableCell = forwardRef( +export const TableCell = forwardRef>( ( { className, @@ -183,7 +200,6 @@ export const TableCell = forwardRef( onClick, hasAction = false, isSticky = false, - rowHoverStyle = "default", isSelected, isTabbableCell = false, }, @@ -207,18 +223,22 @@ export const TableCell = forwardRef( ? "justify-center text-center" : "justify-end text-right" ); + const { variant } = useContext(TableContext); return ( & { className?: string; isSticky?: boolean; onClick?: (event: React.MouseEvent) => void; @@ -283,6 +303,7 @@ export const TableCellMenu = forwardRef< popoverContent?: ReactNode; children?: ReactNode; isSelected?: boolean; + variant?: TableVariant; } >( ( @@ -299,6 +320,7 @@ export const TableCellMenu = forwardRef< ref ) => { const [isOpen, setIsOpen] = useState(false); + const { variant } = useContext(TableContext); return (
{/* Hidden buttons that show on hover */} {hiddenButtons && ( -
+
{hiddenButtons}
)} diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index 32bfbd1f74..003817da07 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -39,6 +39,7 @@ import { TableHeader, TableHeaderCell, TableRow, + TableVariant, } from "../../primitives/Table"; import { CancelRunDialog } from "./CancelRunDialog"; import { LiveTimer } from "./LiveTimer"; @@ -58,6 +59,7 @@ type RunsTableProps = { runs: RunListItem[]; isLoading?: boolean; allowSelection?: boolean; + variant?: TableVariant; }; export function TaskRunsTable({ @@ -67,6 +69,7 @@ export function TaskRunsTable({ runs, isLoading = false, allowSelection = false, + variant = "dimmed", }: RunsTableProps) { const user = useUser(); const organization = useOrganization(); @@ -104,7 +107,7 @@ export function TaskRunsTable({ ); return ( - +
{allowSelection && ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx index 5456cf4db7..0bfcb85ad2 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx @@ -220,6 +220,7 @@ export default function Page() { TrailingIcon={ExitIcon} shortcut={{ key: "esc" }} shortcutPosition="before-trailing-icon" + className="pl-1" />
@@ -297,11 +298,12 @@ export default function Page() { }} runs={schedule.runs} isLoading={false} + variant="bright" />
Next 5 runs -
+
{!isUtc && {schedule.timezone}} UTC From 176541bd2f2add8477daec3fc6695462aa8bce45 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 17:19:28 +0000 Subject: [PATCH 31/34] Full width tables on the schedules inspector panel --- .../route.tsx | 108 +++++++++--------- 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx index 0bfcb85ad2..126f7202cc 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules.$scheduleParam/route.tsx @@ -224,8 +224,8 @@ export default function Page() { />
-
-
+
+
Schedule ID @@ -283,60 +283,62 @@ export default function Page() { )} -
- Last 5 runs - -
-
- Next 5 runs -
- - {!isUtc && {schedule.timezone}} - UTC - - - {schedule.active ? ( - schedule.nextRuns.length ? ( - schedule.nextRuns.map((run, index) => ( - - {!isUtc && ( - - - - )} + +
+ Last 5 runs + +
+
+ Next 5 runs +
+ + {!isUtc && {schedule.timezone}} + UTC + + + {schedule.active ? ( + schedule.nextRuns.length ? ( + schedule.nextRuns.map((run, index) => ( + + {!isUtc && ( - + - - )) - ) : ( - - - - ) + )} + + + + + )) ) : ( - + - )} - -
-
- {!isImperative && ( + ) + ) : ( + + + + )} + + +
+ {!isImperative && ( +
- )} -
+
+ )}
{isImperative && ( From 46b979e07036486e052d757476b5066e8068f818 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 17:19:41 +0000 Subject: [PATCH 32/34] Reduce padding on Alerts page table rows --- .../route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx index ca8a3d5717..42dba07567 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx @@ -214,7 +214,7 @@ export default function Page() { /> ))} - + From 3c0639e1da098bf870027e2ccb82b488855a75a0 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 17:31:39 +0000 Subject: [PATCH 33/34] Updates the Deploy page inspector table to the new style --- .../route.tsx | 202 +++++++++--------- 1 file changed, 106 insertions(+), 96 deletions(-) diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx index 1ec85e3aa4..4fb4db5b81 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments.$deploymentParam/route.tsx @@ -4,7 +4,6 @@ import { typedjson, useTypedLoaderData } from "remix-typedjson"; import { ExitIcon } from "~/assets/icons/ExitIcon"; import { UserAvatar } from "~/components/UserProfilePhoto"; import { AdminDebugTooltip } from "~/components/admin/debugTooltip"; -import { CodeBlock } from "~/components/code/CodeBlock"; import { EnvironmentLabel } from "~/components/environments/EnvironmentLabel"; import { Badge } from "~/components/primitives/Badge"; import { LinkButton } from "~/components/primitives/Buttons"; @@ -108,107 +107,118 @@ export default function Page() { -
-
- - - Deploy - - {deployment.shortCode} - {deployment.label && {deployment.label}} - - - - Environment - - - - - - Version - {deployment.version} - - - Status - - - - - - Tasks - {deployment.tasks ? deployment.tasks.length : "–"} - - - SDK Version - {deployment.sdkVersion ? deployment.sdkVersion : "–"} - - - CLI Version - {deployment.cliVersion ? deployment.cliVersion : "–"} - - - Started at - - UTC - - - - Built at - - {deployment.builtAt ? ( - <> - UTC - - ) : ( - "–" - )} - - - - Deployed at - - {deployment.deployedAt ? ( - <> - UTC - - ) : ( - "–" - )} - - - - Deployed by - - {deployment.deployedBy ? ( -
- - - {deployment.deployedBy.name ?? deployment.deployedBy.displayName} - -
- ) : ( - "–" - )} -
-
-
+
+
+
+ + + Deploy + + {deployment.shortCode} + {deployment.label && {deployment.label}} + + + + Environment + + + + + + Version + {deployment.version} + + + Status + + + + + + Tasks + {deployment.tasks ? deployment.tasks.length : "–"} + + + SDK Version + + {deployment.sdkVersion ? deployment.sdkVersion : "–"} + + + + CLI Version + + {deployment.cliVersion ? deployment.cliVersion : "–"} + + + + Started at + + UTC + + + + Built at + + {deployment.builtAt ? ( + <> + UTC + + ) : ( + "–" + )} + + + + Deployed at + + {deployment.deployedAt ? ( + <> + UTC + + ) : ( + "–" + )} + + + + Deployed by + + {deployment.deployedBy ? ( +
+ + + {deployment.deployedBy.name ?? deployment.deployedBy.displayName} + +
+ ) : ( + "–" + )} +
+
+
+
{deployment.tasks ? (
- +
Task File path From 2be75bfcf62fbe6499b7184f51c1094805f23932 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Mon, 6 Jan 2025 17:49:04 +0000 Subject: [PATCH 34/34] Removes the duplicate Table Row from the table headers in v2 --- .../app/components/events/EventsTable.tsx | 24 ++++++++-------- apps/webapp/app/components/jobs/JobsTable.tsx | 16 +++++------ apps/webapp/app/components/runs/RunsTable.tsx | 28 +++++++++---------- .../route.tsx | 14 ++++------ .../route.tsx | 12 ++++---- .../route.tsx | 14 ++++------ 6 files changed, 48 insertions(+), 60 deletions(-) diff --git a/apps/webapp/app/components/events/EventsTable.tsx b/apps/webapp/app/components/events/EventsTable.tsx index c80de1d96a..fd54902855 100644 --- a/apps/webapp/app/components/events/EventsTable.tsx +++ b/apps/webapp/app/components/events/EventsTable.tsx @@ -52,19 +52,17 @@ export function EventsTable({ return (
- - Event - Env - Received Time - Delivery Time - Delivered - Canceled Time - Test - Runs - - Go to page - - + Event + Env + Received Time + Delivery Time + Delivered + Canceled Time + Test + Runs + + Go to page + {total === 0 && !hasFilters ? ( diff --git a/apps/webapp/app/components/jobs/JobsTable.tsx b/apps/webapp/app/components/jobs/JobsTable.tsx index 451fa9b868..fa42e667fd 100644 --- a/apps/webapp/app/components/jobs/JobsTable.tsx +++ b/apps/webapp/app/components/jobs/JobsTable.tsx @@ -31,15 +31,13 @@ export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResul return (
- - Job - ID - Integrations - Properties - Last run - Status - Go to page - + Job + ID + Integrations + Properties + Last run + Status + Go to page {jobs.length > 0 ? ( diff --git a/apps/webapp/app/components/runs/RunsTable.tsx b/apps/webapp/app/components/runs/RunsTable.tsx index c194da9532..535727525f 100644 --- a/apps/webapp/app/components/runs/RunsTable.tsx +++ b/apps/webapp/app/components/runs/RunsTable.tsx @@ -58,21 +58,19 @@ export function RunsTable({ return (
- - Run - {showJob && Job} - Env - Status - Started - Duration - Exec Time - Test - Version - Created at - - Go to page - - + Run + {showJob && Job} + Env + Status + Started + Duration + Exec Time + Test + Version + Created at + + Go to page + {total === 0 && !hasFilters ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints.$httpEndpointParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints.$httpEndpointParam/route.tsx index b8c9a1bb8b..332a6cc820 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints.$httpEndpointParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints.$httpEndpointParam/route.tsx @@ -114,14 +114,12 @@ export default function Page() {
- - Environment - Endpoint URL - Secret - Source - Respond to request? - Updated - + Environment + Endpoint URL + Secret + Source + Respond to request? + Updated {httpEndpoint.httpEndpointEnvironments.map((httpEnvironment) => { diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints._index/route.tsx index 5887a111fa..d05197a014 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.http-endpoints._index/route.tsx @@ -67,13 +67,11 @@ export default function Page() {
- - ID - Title - Updated - Environments - Go to page - + ID + Title + Updated + Environments + Go to page {httpEndpoints.length > 0 ? ( diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.triggers._index/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.triggers._index/route.tsx index 8903add2e8..6025b0dc20 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.triggers._index/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.triggers._index/route.tsx @@ -49,14 +49,12 @@ export default function Integrations() {
- - Integration - Dynamic - Properties - Environment - Active - Go to page - + Integration + Dynamic + Properties + Environment + Active + Go to page {triggers.length > 0 ? (