Skip to content

Commit

Permalink
feat: improve blocks configuration UI interaction
Browse files Browse the repository at this point in the history
- make CSS/XPath selector to resizable textarea with auto fit to content height,
  instead of a narrow one-line input
- make block options expanded by default, for show clear what options are available/modified between switching blocks
  • Loading branch information
zthxxx committed Apr 26, 2024
1 parent 09a15c0 commit 0c17761
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/newtab/workflow/edit/EditInteractionBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
/>
</div>
<edit-autocomplete v-if="!hideSelector" class="mb-1">
<ui-input
<ui-textarea
v-if="!hideSelector"
:model-value="data.selector"
:placeholder="t('workflow.blocks.base.selector')"
autocomplete="off"
autoresize
class="w-full"
@change="updateData({ selector: $event })"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/UiExpand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { watch, ref } from 'vue';
const props = defineProps({
modelValue: {
type: Boolean,
default: false,
default: true,
},
panelClass: {
type: String,
Expand Down
1 change: 0 additions & 1 deletion src/components/ui/UiTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
ref="textarea"
:value="modelValue"
class="ui-textarea ui-input bg-input w-full rounded-lg px-4 py-2 transition"
:class="{ 'overflow-hidden resize-none': autoresize }"
@input="emitValue"
@keyup="$emit('keyup', $event)"
@keydown="$emit('keydown', $event)"
Expand Down

0 comments on commit 0c17761

Please sign in to comment.