Skip to content

Commit

Permalink
Showing 14 changed files with 55 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scenario_name": "Scenario name",
"scenario_trigger_object_type": "Trigger Object",
"number_of_created_decisions": "Number of decisions",
"number_of_created_decisions": "Decisions",
"status": "Status",
"created_at": "Created at",
"started_at": "Started at",
15 changes: 8 additions & 7 deletions packages/app-builder/src/components/Decisions/DecisionsList.tsx
Original file line number Diff line number Diff line change
@@ -84,26 +84,26 @@ export function DecisionsList({
{
id: 'created_at',
header: t('decisions:created_at'),
size: 50,
size: 100,
},
),
columnHelper.accessor((row) => row.scenario.name, {
id: 'scenario_name',
header: t('decisions:scenario.name'),
size: 100,
size: 200,
}),
columnHelper.accessor((row) => row.trigger_object_type, {
id: 'trigger_object_type',
header: t('decisions:trigger_object.type'),
size: 100,
size: 200,
cell: ({ getValue }) => (
<span className="capitalize">{getValue()}</span>
),
}),
columnHelper.accessor((row) => row.case?.name ?? '-', {
id: 'case',
header: t('decisions:case'),
size: 100,
size: 200,
cell: ({ getValue, row }) =>
row.original.case ? (
<div className="flex w-fit flex-row items-center justify-center gap-1">
@@ -127,13 +127,13 @@ export function DecisionsList({
columnHelper.accessor((row) => row.score, {
id: 'score',
header: t('decisions:score'),
size: 50,
size: 100,
cell: ({ getValue }) => <Score score={getValue()} />,
}),
columnHelper.accessor((row) => row.outcome, {
id: 'outcome',
header: t('decisions:outcome'),
size: 50,
size: 100,
cell: ({ getValue }) => (
<Outcome border="square" size="big" outcome={getValue()} />
),
@@ -165,7 +165,8 @@ export function DecisionsList({
}}
/>
),
size: 30,
size: 58,
enableResizing: false,
}),
);
}
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export function VersionSelect({
<Select.Default
value={currentIteration.id}
border="rounded"
className="min-w-[126px]"
className="min-w-[126px] shrink-0"
onValueChange={(selectedId) => {
const elem = scenarioIterations.find(({ id }) => id === selectedId);
if (!elem?.id) return;
Original file line number Diff line number Diff line change
@@ -53,9 +53,11 @@ function ScheduledExecutionDetailsInternal({
name="download"
disabled={downloadingDecisions}
>
{downloadingDecisions
? t('scheduledExecution:downloading_decisions')
: t('scheduledExecution:download_decisions')}
<span className="line-clamp-1 shrink-0">
{downloadingDecisions
? t('scheduledExecution:downloading_decisions')
: t('scheduledExecution:download_decisions')}
</span>
</Button>
);
}
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ export function ScheduledExecutionsList({
accessorFn: (s) =>
s.status == 'success' ? s.number_of_created_decisions : '0',
header: t('scheduledExecution:number_of_created_decisions'),
size: 200,
size: 100,
},
{
id: 'status',
@@ -104,12 +104,12 @@ export function ScheduledExecutionsList({

const getStatusIcon = (status: string) => {
if (status === 'success') {
return <Icon icon="tick" className="size-6 text-green-100" />;
return <Icon icon="tick" className="size-6 shrink-0 text-green-100" />;
}
if (status === 'failure') {
return <Icon icon="cross" className="size-6 text-red-100" />;
return <Icon icon="cross" className="size-6 shrink-0 text-red-100" />;
}
return <Icon icon="restart-alt" className="text-grey-50 size-6" />;
return <Icon icon="restart-alt" className="text-grey-50 size-6 shrink-0" />;
};

const getStatusTKey = (status: string): ParseKeys<['scheduledExecution']> => {
10 changes: 5 additions & 5 deletions packages/app-builder/src/routes/_builder+/data.tsx
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ function TableDetails({
{
id: 'required',
accessorKey: 'required',
size: 80,
size: 100,
header: t('data:field_required'),
cell: ({ cell }) => {
return cell.row.original.nullable
@@ -198,26 +198,26 @@ function TableDetails({
id: 'foreignKey',
accessorKey: 'foreignKey',
header: t('data:foreign_key'),
size: 50,
size: 150,
enableSorting: true,
},
{
id: 'parentTable',
accessorKey: 'parentTable',
size: 50,
size: 150,
header: t('data:parent_table'),
},
{
id: 'parentFieldName',
accessorKey: 'parentFieldName',
header: t('data:parent_field_name'),
size: 50,
size: 150,
},
{
id: 'exampleUsage',
accessorKey: 'exampleUsage',
header: t('data:example_usage'),
size: 100,
size: 300,
},
],
[t],
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ export default function Lists() {
columnHelper.accessor((row) => row.value, {
id: 'value',
header: t('lists:value', { count: listValues.length }),
size: 600,
size: 500,
sortingFn: 'text',
enableSorting: true,
cell: ({ getValue }) => {
Original file line number Diff line number Diff line change
@@ -80,12 +80,14 @@ export default function ScenarioEditLayout() {

return (
<Page.Container>
<Page.Header className="justify-between">
<Page.Header className="justify-between gap-4">
<div className="flex flex-row items-center gap-4">
<Link to={getRoute('/scenarios/')}>
<Page.BackButton />
</Link>
{currentScenario.name}
<span className="line-clamp-2 text-ellipsis">
{currentScenario.name}
</span>
<VersionSelect
scenarioIterations={sortedScenarioIterations}
currentIteration={currentIteration}
Original file line number Diff line number Diff line change
@@ -47,25 +47,25 @@ export default function Inbox() {
const columns = useMemo(() => {
return [
columnHelper.accessor((row) => row.user_id, {
id: 'name:',
id: 'name',
header: t('settings:inboxes.name'),
size: 100,
size: 200,
cell: ({ getValue }) => {
const user = orgUsers.find((u) => u.userId === getValue());
if (!user) return;
return `${user.firstName} ${user.lastName}`;
},
}),
columnHelper.accessor((row) => row.role, {
id: 'role:',
id: 'role',
header: t('settings:inboxes.inbox_details.role'),
size: 100,
size: 200,
cell: ({ getValue }) =>
t(tKeyForInboxUserRole(getValue<InboxUserRole>())),
}),
columnHelper.display({
id: 'actions',
size: 50,
size: 100,
cell: ({ cell }) => {
return (
<div className="text-grey-00 group-hover:text-grey-100 flex gap-2">
8 changes: 4 additions & 4 deletions packages/app-builder/src/routes/_builder+/settings+/tags.tsx
Original file line number Diff line number Diff line change
@@ -39,12 +39,12 @@ export default function Tags() {
columnHelper.accessor((row) => row.name, {
id: 'name',
header: t('settings:tags.name'),
size: 100,
size: 200,
}),
columnHelper.accessor((row) => row.color, {
id: 'color',
header: t('settings:tags.color'),
size: 50,
size: 100,
cell: ({ getValue }) => (
<div
className="size-4 rounded-full"
@@ -55,11 +55,11 @@ export default function Tags() {
columnHelper.accessor((row) => row.cases_count, {
id: 'cases',
header: t('settings:tags.cases'),
size: 100,
size: 200,
}),
columnHelper.display({
id: 'actions',
size: 50,
size: 100,
cell: ({ cell }) => {
return (
<div className="text-grey-00 group-hover:text-grey-100 flex gap-2">
6 changes: 3 additions & 3 deletions packages/app-builder/src/routes/_builder+/settings+/users.tsx
Original file line number Diff line number Diff line change
@@ -54,20 +54,20 @@ export default function Users() {
columnHelper.accessor((row) => `${row.firstName} ${row.lastName}`, {
id: 'name',
header: t('settings:users.name'),
size: 100,
size: 150,
}),
columnHelper.accessor((row) => row.email, {
id: 'email',
header: t('settings:users.email'),
size: 100,
size: 150,
cell: ({ getValue }) => (
<div className="overflow-hidden text-ellipsis">{getValue()}</div>
),
}),
columnHelper.accessor((row) => row.role, {
id: 'role',
header: t('settings:users.role'),
size: 100,
size: 150,
cell: ({ getValue }) => t(tKeyForUserRole(getValue())),
}),
columnHelper.accessor((row) => row.userId, {
Original file line number Diff line number Diff line change
@@ -107,7 +107,9 @@ const NewDraftButton = ({
<HiddenInputs iterationId={iterationId} />
<Button type="submit">
<Icon icon="plus" className="size-6" />
{t('scenarios:create_iteration.title')}
<span className="line-clamp-1 hidden shrink-0 lg:block">
{t('scenarios:create_iteration.title')}
</span>
</Button>
</fetcher.Form>
);
@@ -131,7 +133,9 @@ const ExistingDraftModal = ({
<Modal.Trigger asChild>
<Button>
<Icon icon="plus" className="size-6" />
{t('scenarios:create_iteration.title')}
<span className="line-clamp-1 hidden shrink-0 lg:block">
{t('scenarios:create_iteration.title')}
</span>
</Button>
</Modal.Trigger>
<Modal.Content>
Original file line number Diff line number Diff line change
@@ -277,7 +277,9 @@ const DeploymentModal = ({
<Modal.Trigger asChild>
<Button {...buttonConfig.props}>
<Icon icon={buttonConfig.icon.trigger} className="size-6" />
{t(buttonConfig.label)}
<span className="line-clamp-1 hidden shrink-0 lg:block">
{t(buttonConfig.label)}
</span>
</Button>
</Modal.Trigger>
<Modal.Content className="bg-grey-00">
@@ -305,7 +307,9 @@ const DisabledDeploymentButton = ({
>
<Button {...buttonConfig.props} disabled>
<Icon icon={buttonConfig.icon.trigger} className="size-6" />
{t(buttonConfig.label)}
<span className="line-clamp-1 hidden shrink-0 lg:block">
{t(buttonConfig.label)}
</span>
</Button>
</Tooltip.Default>
);
2 changes: 2 additions & 0 deletions packages/ui-design-system/src/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -28,6 +28,8 @@ function TableContainer({
'border-grey-10 border-spacing-0 rounded-lg border',
className,
)}
orientation="both"
type="auto"
>
<table
className="w-full table-fixed border-separate border-spacing-0"

0 comments on commit 73bef91

Please sign in to comment.