Comments (5)
Hey @AeonFr thanks for your thoughts and the very detailed comments. I totally agree, and this has been on my roadmap for a while. It's a bit of work, and a lot of thinking to get it there though. I know I want it to be a single component, and I'm still searching for a good definition of what I want the DX to be like.
I've got a couple other components lined up for the next release, so this one probably wont make it in, but it is 100% coming.
from vuetensils.
Good to know this is on the roadmap!
I took a peak into the dropdown component from Vue Bootstrap. I liked the API they have, because they only use two components. (at the moment, they don't support search but do support arrow navigation.)
<b-dropdown>
<template v-slot:button-content>
Custom <strong>Content</strong> with <em>HTML</em> via Slot
</template>
<b-dropdown-item href="#">An item</b-dropdown-item>
<b-dropdown-item href="#">Another item</b-dropdown-item>
</b-dropdown>
Again, thanks for the response and I hope this examples are useful as a reference
from vuetensils.
Yeah, so this is part of what I want to figure out. Until now, each component has only used one tag, which I prefer. I never liked when a library required me to use so many custom components. But using a single tag also means I need to rely on scoped slots more to provide the functionality and attributes needed to hook things up.
My feelings right now is that this should be either a <select>
with a more custom UI, an ARIA listbox, or an ARIA
combobox. It seems like most implementations I've looked at that consider a11y use
listbox`
from vuetensils.
So I'll add my 2 cents into this.
Since a native select element is a compound tag (it requires that you use an option element inside of it) then this is an instance where making a compound component that needs 2 components is not unreasonable.
from vuetensils.
Thanks for the input @alex-nextraq. I would push back on your comment about the select
element. I did get around compound components in the VInput component which can implement a select
by accepting an array of options. Also, you don't really need a custom component for the <option>
tag since there isn't anything you can do to customize it. Just pass them through the component <slot>
.
To be clear, I'm not entirely against them. But my history with them has been that too many libraries implement them so much, that my codebase feels littered with them. I'm a bit of a purist, so I like that Vuetensils sticks closely to native HTML (IMO). I also like to think that Vuetensils makes it relatively easy to swap components in or out by keeping implementation simple. (but that may just be a biased assumption)
On the other hand, this is one of those cases where it helps greatly to get community feedback. A lot of my development is done in a silo, so Im just going off my own needs and expectations. It's funny how little feedback I actually get (not sure if that's good or bad). But as community members chime in more, I can make more informed decisions. Such as in this case. You may be right that a compound component makes more sense. I feel like a scoped slot would not be as nice to work with.
from vuetensils.
Related Issues (20)
- Intersect question: how to observe many child elements in v-for loop HOT 3
- [feature] - add complementary role to VAlert HOT 7
- Feature request? tree component? HOT 2
- Error "export 'version' was not found in 'vue' HOT 6
- Feature: Focusout HOT 2
- Import errors in Vue2 with Vite HOT 7
- [Vue warn]: Error in render: "TypeError: errors.get is not a function" HOT 5
- [Feature Request] allow localization of the buttons of the datepicker HOT 5
- [Feature Request] i18n HOT 1
- [Feature Request] VDate: allow inline usage HOT 3
- vue 3 support ? HOT 2
- Website docs don't show any examples anymore HOT 5
- VAlert dismissible doesn't work with scoped css HOT 5
- Vuetensils: TypeError: Object(...) is not a function HOT 5
- Drawer sliding animation HOT 4
- Browser compatibility HOT 7
- [Feature Request] Support Vue 2.7 by upgrading vue-demi to ^0.13 HOT 6
- Failed to resolve entry for package "vuetensils" HOT 3
- Input still has error styling after changing error conditions HOT 9
- Enable class customisation for individual notifications HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetensils.