-
Notifications
You must be signed in to change notification settings - Fork 448
Feat: add floating label to textarea #7121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
93a986e
feat: add floating label to textarea
DrJKL bbad49c
test: Update test to check label instead of placeholder.
DrJKL aded612
[automated] Update test expectations
invalid-email-address 34ac5f9
Consistency
DrJKL b9533c2
We have a label now.
DrJKL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
+85 Bytes
(100%)
...odes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+95 Bytes
(100%)
...eractions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+181 Bytes
(100%)
...nks/linkInteraction.spec.ts-snapshots/vue-node-dragging-link-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+195 Bytes
(100%)
...nkInteraction.spec.ts-snapshots/vue-node-input-drag-ctrl-alt-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+173 Bytes
(100%)
...eraction.spec.ts-snapshots/vue-node-input-drag-reuses-origin-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+174 Bytes
(100%)
...inkInteraction.spec.ts-snapshots/vue-node-reroute-input-drag-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...raction.spec.ts-snapshots/vue-node-reroute-output-shift-drag-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+164 Bytes
(100%)
...teraction.spec.ts-snapshots/vue-node-shift-output-multi-link-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+196 Bytes
(100%)
...inks/linkInteraction.spec.ts-snapshots/vue-node-snap-to-node-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+166 Bytes
(100%)
...inks/linkInteraction.spec.ts-snapshots/vue-node-snap-to-slot-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-484 Bytes
(100%)
...interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+343 Bytes
(100%)
.../nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+347 Bytes
(100%)
...deStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+985 Bytes
(100%)
...ors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+936 Bytes
(100%)
...rs.spec.ts-snapshots/vue-node-custom-colors-light-all-colors-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+312 Bytes
(100%)
...Nodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid
:idand:placeholderbindings (will not compile).TextAreacurrently uses:idand:placeholderwithout expressions, which is invalid Vue syntax and will fail at compile time. Bind them explicitly to the corresponding script variables.<Textarea v-bind="filteredProps" - :id + :id="id" v-model="modelValue" :class="cn(WidgetInputBaseClass, 'size-full text-xs resize-none')" - :placeholder + :placeholder="placeholder" :aria-label="widget.name" :readonly="widget.options?.read_only" :disabled="widget.options?.read_only"📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://vuejs.org/guide/essentials/template-syntax#same-name-shorthand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
💡 Result:
Short answer: Vue 3.4 added a "same-name" v-bind shorthand so you can omit the value when the attribute name equals the bound variable name — e.g.
expands to :src="src" (works with both : and v-bind:). [1][2]
Example:
Notes: this requires Vue 3.4+ and linters/formatters may need updates (eslint-plugin-vue has options to enforce/ignore this style). [1][2][4]
Sources: Vue 3.4 announcement and docs. [1][2][3][4]
@DrJKL, you're absolutely right! I apologize for the incorrect comment. Vue 3.4+ introduced same-name shorthand syntax where
:idis equivalent to:id="id"when the attribute name matches the variable name in scope. Since you haveconst id = useId()andplaceholderas a prop, the syntax:idand:placeholderis completely valid.Thank you for the correction—please disregard my previous suggestion.
(๑•﹏•) ears drooping apologetically
✏️ Learnings added
🧠 Learnings used