mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Polish YAML workflow channel scope
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
@@ -177,7 +177,12 @@ export function ChannelCombobox({
|
||||
<button
|
||||
aria-disabled="true"
|
||||
aria-label={`${ariaLabel}: ${selectedLabel}. Read only.`}
|
||||
className="flex w-full cursor-default items-center justify-center rounded-lg px-3 py-2 text-lg font-semibold text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring"
|
||||
className={cn(
|
||||
"flex w-full cursor-default items-center rounded-lg px-3 py-2 text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
|
||||
variant === "header" &&
|
||||
"justify-center border-0 bg-transparent text-lg font-semibold",
|
||||
variant === "field" && "text-sm font-normal",
|
||||
)}
|
||||
id={id}
|
||||
type="button"
|
||||
>
|
||||
|
||||
@@ -453,7 +453,7 @@ export function WorkflowDialog({
|
||||
<div className="space-y-1">
|
||||
<ChannelCombobox
|
||||
channels={channels}
|
||||
defaultOpen={mode === "create"}
|
||||
defaultOpen={mode === "create" && editorMode === "form"}
|
||||
disabled={mutation.isPending}
|
||||
id="wf-channel-select"
|
||||
onChange={(value) => {
|
||||
@@ -462,6 +462,7 @@ export function WorkflowDialog({
|
||||
if (value) onEditorPaneChange({ type: "trigger" });
|
||||
}}
|
||||
required
|
||||
variant={editorMode === "yaml" ? "field" : "header"}
|
||||
value={selectedChannelId}
|
||||
/>
|
||||
{channels.length === 0 ? (
|
||||
@@ -476,6 +477,7 @@ export function WorkflowDialog({
|
||||
id="wf-channel-select"
|
||||
onChange={setSelectedChannelId}
|
||||
readOnly
|
||||
variant={editorMode === "yaml" ? "field" : "header"}
|
||||
value={selectedChannel.id}
|
||||
/>
|
||||
) : null
|
||||
|
||||
Reference in New Issue
Block a user