Conversation
| value?: string; | ||
| copyable?: boolean; | ||
| }) => ( | ||
| <div className="grid h-7 min-w-0 grid-cols-[minmax(0,1.5fr)_minmax(0,2fr)_30px] gap-1"> |
There was a problem hiding this comment.
How would this render on bigger viewports? I think we can make more use of the screen space
There was a problem hiding this comment.
holding off on that until the redesign. have a completely new UI I'm introducing this month. this is exclusively for P1 bug fixes
| import { useMemo } from 'react'; | ||
|
|
||
| export const PipelineStatusBadge = ({ state }: { state?: Pipeline_State }) => { | ||
| const statusConfig = useMemo(() => { |
There was a problem hiding this comment.
Do we need this use memo? Maybe it's overkill for this small component. How often do we expect pipeline state to change?
There was a problem hiding this comment.
pretty often, the bug I'm fixing here is that the button was not responsive to state updates. feels like an easy optimization with no downside to use useMemo here.
| const state = query?.state?.data?.response?.pipeline?.state; | ||
| // Poll every 2 seconds when pipeline is in transitional state (STARTING or STOPPING) | ||
| const shouldPoll = state === Pipeline_State.STARTING || state === Pipeline_State.STOPPING; | ||
| return shouldPoll ? 2000 : false; |
There was a problem hiding this comment.
Maybe we can store it as a const
| pipelinesApi.refreshPipelines(_force); | ||
| } | ||
|
|
||
| componentWillUnmount() { |
There was a problem hiding this comment.
removed and instead we determine this at the header.tsx level like everything else
Fixes critical bugs discovered during bug bashing and holiday internal testing.
Start/Stop pipeline button
The start/stop button was stuck in in-between states ("starting" and "stopping", which had been solved in legacy UI with retries, which were lacking the modern react-query implementation). Now:
Refresh header
Removed the "refresh" button from the header on all of the new wizard routes (new RPCN wizard as well as API wizard). Given legacy routes just render new UI components, had to add additional
uiStateprop to disable refresh buttons from showing (only relevant for view/edit pipeline routes).Pipeline meta
onChange improvements
When modifying a pipeline name, description, etc. wouldn't correctly show inline errors until after submission. Given scroll position, wasn't always apparent why you couldn't add/edit a pipeline. So changed to firing zod validation
onChange. And improved error messaging.Missing fields
Some pipeline fields were missing (like url). Made values copyable.
Deleting a pipeline
event bubbling prevented users from deleting pipelines, fixed.