Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,15 @@ function handleMouseMove(e: PointerEvent) {
function handleMouseUp() {
const newValue = dragValue.value
if (newValue === undefined) return
modelValue.value = newValue
dragValue.value = undefined

if (dragDelta.value === 0) {
if (newValue === modelValue.value) {
textEdit.value = true
inputField.value?.focus()
inputField.value?.setSelectionRange(0, -1)
}

modelValue.value = newValue
dragValue.value = undefined
dragDelta.value = 0
}

Expand Down Expand Up @@ -202,9 +203,13 @@ const sliderWidth = computed(() => {
:class="cn(WidgetInputBaseClass, 'grow text-xs flex h-7 relative')"
>
<div
class="bg-primary-background/15 absolute left-0 bottom-0 h-full rounded-lg pointer-events-none"
:style="{ width: `${sliderWidth}%` }"
/>
class="absolute size-full rounded-lg pointer-events-none overflow-clip"
>
<div
class="bg-primary-background/15 size-full"
:style="{ width: `${sliderWidth}%` }"
/>
</div>
Comment on lines 205 to +212
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

LGTM! The nested structure with overflow-clip correctly prevents slider overflow.

The outer container with rounded-lg and overflow-clip ensures the track is clipped at small values while maintaining rounded corners at the ends.

Minor clarity improvement: since the inline style overrides width, you could use h-full instead of size-full on the inner div to make the intent clearer:

♻️ Optional: clarify width/height intent
       <div
-        class="bg-primary-background/15 size-full"
+        class="bg-primary-background/15 h-full"
         :style="{ width: `${sliderWidth}%` }"
       />
🤖 Prompt for AI Agents
In
`@src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberInput.vue`
around lines 205 - 212, The inner track element uses the class "size-full" while
its width is controlled via inline style; update the inner div (the element
currently having class "bg-primary-background/15 size-full") to use "h-full"
instead of "size-full" so the intent (full height, variable width) is clearer
and avoids implying the width is fixed.

<Button
v-if="!buttonsDisabled"
data-testid="decrement"
Expand Down