Add custom-styled dropdown component to Tsunami framework#2539
Add custom-styled dropdown component to Tsunami framework#2539
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
|
@copilot don't change the go.mod and go.sum files for the tsunami demos... |
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
|
@copilot ah this is just using the native select/option tags. it is providing basically zero (or even negative leverage). the tsunami framework (backend) could just output H("select") and H("option") tags easily. the point of this is to give a more styled dropdown that does NOT use the native controls. think more like the shadcn type of dropdown components. |
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Replaced the native select with a custom-styled dropdown component in commit bbd943f. The new implementation:
This provides real value over native elements since the backend can easily output |
Adding Custom Dropdown Element to Tsunami Framework ✅
Completed Implementation:
✅ Core Component (
dropdown.tsx) - Custom Styled Dropdown<select>tags, uses divs/buttons for full styling controlDropdownOptionandDropdownProps✅ VDOM Integration (
vdom.tsx)Dropdownimport from@/element/dropdownWaveDropdownwrapper function withuseVDomhook"wave:dropdown"inWaveTagMap✅ Demo Application (
demo/dropdowntest/)✅ Documentation (
README-DROPDOWN.md)✅ Verification
Key Design Features:
Why This Provides Value:
<select>elements can be easily created withH("select")in backendFiles Changed:
tsunami/frontend/src/element/dropdown.tsx(new - custom styled)tsunami/frontend/src/element/README-DROPDOWN.md(new)tsunami/frontend/src/vdom.tsx(updated)tsunami/demo/dropdowntest/app.go(new)tsunami/demo/dropdowntest/go.mod(new)tsunami/demo/dropdowntest/go.sum(new)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.