Skip to content

Commit cb503b1

Browse files
fix Select field in pipeline run dialog
fix #537
1 parent 95c68a2 commit cb503b1

5 files changed

Lines changed: 32 additions & 31 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
## Added
10+
## [0.5.2] - 2025-11-30
1111

12-
- Add libsql database support (#525)
12+
### Added
13+
14+
- Add libsql database support ([#525](https://github.com/lucafaggianelli/plombery/issues/525))
15+
16+
### Fixed
17+
18+
- Fix Select field in pipeline run dialog ([#537](https://github.com/lucafaggianelli/plombery/issues/537))
1319

1420
## [0.5.1] - 2025-10-28
1521

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plombery",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"description": "",
55
"license": "MIT",
66
"author": {

frontend/src/components/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Dialog: React.FC<Props> = ({
2020
}) => {
2121
return (
2222
<Transition show={isOpen} as={Fragment}>
23-
<HUDialog onClose={onClose} className="relative z-50">
23+
<HUDialog onClose={onClose} className="relative z-10">
2424
<Transition.Child
2525
as={Fragment}
2626
enter="ease-out duration-300"

frontend/src/components/JsonSchemaForm.tsx

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
import { QuestionMarkCircleIcon } from '@heroicons/react/24/outline'
1+
import { Field, Label, Select } from '@headlessui/react'
22
import {
3-
Flex,
4-
Icon,
5-
NumberInput,
6-
Select,
7-
SelectItem,
8-
Text,
9-
TextInput,
10-
} from '@tremor/react'
3+
ChevronDownIcon,
4+
QuestionMarkCircleIcon,
5+
} from '@heroicons/react/24/outline'
6+
import { Flex, Icon, NumberInput, Text, TextInput } from '@tremor/react'
117
import { JSONSchema7, JSONSchema7TypeName } from 'json-schema'
12-
import { useCallback, useState } from 'react'
8+
import React, { useCallback } from 'react'
139

1410
import RangeSlider from './RangeSlider'
15-
import React from 'react'
1611

1712
interface Props {
1813
schema: JSONSchema7
@@ -91,23 +86,23 @@ const renderers: Record<
9186
)
9287
},
9388
select: (field: FieldDefinition) => {
94-
const [value, setValue] = useState<string>(field.defaultValue || '')
95-
9689
return (
97-
<div>
90+
<div className="relative">
9891
<Select
92+
name={field.name}
9993
defaultValue={field.defaultValue}
100-
onValueChange={setValue}
101-
value={value}
94+
className="appearance-none text-sm/6 w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border px-3 py-1.5 shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted pl-3 bg-tremor-background dark:bg-dark-tremor-background hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted text-tremor-content dark:text-dark-tremor-content border-tremor-border dark:border-dark-tremor-border"
10295
>
10396
{field.value.enum!.map((item) => (
104-
<SelectItem key={item?.toString()} value={item!.toString()}>
97+
<option key={item?.toString()} value={item!.toString()}>
10598
{item?.toString()}
106-
</SelectItem>
99+
</option>
107100
))}
108101
</Select>
109-
110-
<input type="hidden" name={field.name} value={value} />
102+
<ChevronDownIcon
103+
className="group pointer-events-none absolute top-2.5 right-2.5 size-4"
104+
aria-hidden="true"
105+
/>
111106
</div>
112107
)
113108
},
@@ -216,12 +211,12 @@ const JsonSchemaForm: React.FC<Props> = ({ errors = {}, schema }) => {
216211
})
217212

218213
return (
219-
<div key={key}>
220-
<Flex className="justify-between">
221-
<Text className="mb-2">
214+
<Field key={key}>
215+
<Flex className="mb-2 justify-between">
216+
<Label className="text-sm font-medium">
222217
{label}
223218
{required && ' *'}
224-
</Text>
219+
</Label>
225220

226221
{value.description && (
227222
<Icon
@@ -238,11 +233,11 @@ const JsonSchemaForm: React.FC<Props> = ({ errors = {}, schema }) => {
238233
{errors[key]}
239234
</Text>
240235
)}
241-
</div>
236+
</Field>
242237
)
243238
})
244239

245-
return <Flex className="gap-4 flex-col items-stretch">{inputFields}</Flex>
240+
return <Flex className="gap-6 flex-col items-stretch">{inputFields}</Flex>
246241
}
247242

248243
export default JsonSchemaForm

src/plombery/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Keep it aligned with version in package.json
22

3-
__version__ = "0.5.1"
3+
__version__ = "0.5.2"

0 commit comments

Comments
 (0)