From f918b0b066e4529dd9730553a3595fac446198ec Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Mon, 9 Oct 2023 12:20:17 -0500 Subject: [PATCH] Various UI improvements (#279) --- README.md | 3 ++ apps/platform/src/api.ts | 2 ++ apps/ui/src/types.ts | 1 + apps/ui/src/ui/Modal.css | 2 +- apps/ui/src/ui/Tag.css | 4 +++ apps/ui/src/ui/Tag.tsx | 2 +- apps/ui/src/views/journey/JourneyEditor.tsx | 5 +-- apps/ui/src/views/settings/ApiKeys.tsx | 9 ++++-- apps/ui/src/views/settings/Subscriptions.tsx | 10 ++++-- apps/ui/src/views/settings/Tags.tsx | 33 ++++++-------------- apps/ui/src/views/users/UserDetailEvents.tsx | 27 +++++++++------- 11 files changed, 56 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 678a0f60..05c7e953 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,6 @@ AUTH_BASIC_PASSWORD=password For full documentation on the platform and more information on deployment, check out our docs. **[Explore the Docs ยป](https://docs.parcelvoy.com)** + +### Contributing +You can report bugs, suggest features, or just say hi on [Github discussions](https://github.com/parcelvoy/platform/discussions/new/choose) diff --git a/apps/platform/src/api.ts b/apps/platform/src/api.ts index 1c1bb367..d0048229 100644 --- a/apps/platform/src/api.ts +++ b/apps/platform/src/api.ts @@ -29,6 +29,8 @@ export default class Api extends Koa { ctx.status = error.statusCode ?? 400 ctx.body = error return + } else if (error.status === 404) { + return } else { ctx.status = 400 ctx.body = process.env.NODE_ENV === 'production' diff --git a/apps/ui/src/types.ts b/apps/ui/src/types.ts index 287e2ca4..e3b46c45 100644 --- a/apps/ui/src/types.ts +++ b/apps/ui/src/types.ts @@ -205,6 +205,7 @@ export interface UserEvent { id: number name: string data: Record + created_at: string } export type ListState = 'ready' | 'loading' diff --git a/apps/ui/src/ui/Modal.css b/apps/ui/src/ui/Modal.css index 3cc98ee3..9d132692 100644 --- a/apps/ui/src/ui/Modal.css +++ b/apps/ui/src/ui/Modal.css @@ -1,5 +1,5 @@ .modal { - position: absolute; + position: fixed; height: 100vh; width: 100vw; top: 0; diff --git a/apps/ui/src/ui/Tag.css b/apps/ui/src/ui/Tag.css index 701aea1d..6e68286e 100644 --- a/apps/ui/src/ui/Tag.css +++ b/apps/ui/src/ui/Tag.css @@ -49,6 +49,10 @@ border-radius: var(--border-radius-inner); } +.ui-tag.large { + padding: 10px; +} + .ui-tag.tiny .icon { width: 12px; height: 12px; diff --git a/apps/ui/src/ui/Tag.tsx b/apps/ui/src/ui/Tag.tsx index 254c7214..f4ae4ccf 100644 --- a/apps/ui/src/ui/Tag.tsx +++ b/apps/ui/src/ui/Tag.tsx @@ -3,7 +3,7 @@ import './Tag.css' import clsx from 'clsx' export type TagVariant = 'info' | 'plain' | 'success' | 'error' | 'warn' -export type TagSize = 'tiny' | 'regular' +export type TagSize = 'tiny' | 'regular' | 'large' export type TagProps = PropsWithChildren<{ onClick?: () => void diff --git a/apps/ui/src/views/journey/JourneyEditor.tsx b/apps/ui/src/views/journey/JourneyEditor.tsx index 51aea144..0c83064a 100644 --- a/apps/ui/src/views/journey/JourneyEditor.tsx +++ b/apps/ui/src/views/journey/JourneyEditor.tsx @@ -528,12 +528,13 @@ export default function JourneyEditor() { onClose={() => navigate('../journeys')} actions={ <> - + {journey.published ? 'Published' : 'Draft'}