fix(NcSelect): floating label design using NcTextField#8570
Open
skjnldsv wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8570 +/- ##
==========================================
+ Coverage 54.55% 55.28% +0.73%
==========================================
Files 106 106
Lines 3439 3451 +12
Branches 1002 1008 +6
==========================================
+ Hits 1876 1908 +32
+ Misses 1322 1308 -14
+ Partials 241 235 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
54aa738 to
86ca380
Compare
2f91d67 to
e9d00bd
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
e9d00bd to
9f239c6
Compare
b6c2cd5 to
5445b57
Compare
Contributor
Author
|
Ok @kra-mo @jancborchardt seems I fixed it all! Please update your reviews 🙇 |
2e74a7f to
fc5d953
Compare
Replace the plain `<input>` in NcSelect's search slot with NcTextField to get consistent floating label, border, and focus styling across all form fields. Single mode: - NcTextField owns the border and floating label - Selected value overlays the input (position: absolute, z-index: 2) - Label floats on focus or when value selected via :has(.vs__selected) Multi mode: - Border on .vs__dropdown-toggle (contains tags + search input) - Floating label via #header slot, centered when empty, floats on border when tags present or dropdown open - Search input inline with tags (flex-grow, no layout jump on open) - Tags hidden behind actions prevented via padding-inline-end Drop-up: - Border/radius inverted (transparent top, rounded bottom) - Label moves to bottom border Other fixes: - Forward vue-select events (keydown, blur, focus, IME) via filterEvents() to reach the native <input> - Scope CSS variables to .v-select.select (not body) - Dropdown menu variables set directly (teleported to body by floating-ui, can't inherit from .v-select.select) - Inline inputLikeBorder mixin to fix @media doubled-selector bug - Dark/light theme border overrides with correct selectors - No-wrap overflow clips before actions area Signed-off-by: skjnldsv <skjnldsv@users.noreply.github.com> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
fc5d953 to
e8979d2
Compare
Member
Member
Contributor
Author
|
I'm definitely missing my last commit because those are 3 issues I fixed thhis morning 🙈 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


☑️ Resolves
Summary
Replace the plain
<input>in NcSelect's#searchslot withNcTextFieldso the component shares the same floating label, border, and focus styling asNcTextFieldandNcTextArea.Single mode:
:has(.vs__selected)Multi mode:
.vs__dropdown-toggle(contains tags + search input)#headerslot, centered when empty, floats on border when tags present or dropdown openmax-widthin no-wrap modeDrop-up:
CSS scoping:
data-v-new-selectattribute on root element for manual scoping[data-v-new-select].v-select.select.vs__dropdown-menu(teleported to body by floating-ui)inputLikeBordermixin inlined to fix@media #{&}doubled-selector bugOther:
filterEvents()v-bindbefore explicit props (Vue 3 last-binding-wins)--color-border-darkTests added:
Docs added:
🖼️ Screenshots
🚧 Tasks
data-v-new-select🏁 Checklist
stable8for maintained Vue 2 version or not applicable