Skip to content
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

Combo rendering not working well #7

Closed
Trashtalk217 opened this issue Jul 9, 2020 · 6 comments
Closed

Combo rendering not working well #7

Trashtalk217 opened this issue Jul 9, 2020 · 6 comments

Comments

@Trashtalk217
Copy link
Contributor

Trashtalk217 commented Jul 9, 2020

All of the issues below have been found by testing the combo function in the alloy-examples package.

I've been testing out the software for the last few days and noticed the following two things. The combo doesn't correctly overlay the rest of the UI: example

It's also possible to select the value NIL even thought that's not in the options list: example-2-electric-boogalo
This can be reproduced by double clicking the box that opens the drop-down.

Also another minor nit-pick, what is currently called a combo-box in the code is actually a drop-down. A combo-box usually has a search function: Wikipedia

@Shinmera
Copy link
Member

Shinmera commented Jul 9, 2020

I think the overlapping is a problem with the renderer's z-sorting.

Also, it is a combo-box, just not a combination of a search field and drop down, but a button and a drop down.

@Trashtalk217
Copy link
Contributor Author

Trashtalk217 commented Jul 9, 2020

Would it be handy for a combo box to have a default value as in:
(combo (alloy:represent selection 'alloy:combo-set :value-set '(:a :b :c) :default :foo)))
to fill the box with when nothing is explicitly chosen? When no :default is supplied the box stays empty.

Maybe this default value could also be the first element of the :value-set and you would supply NIL if you wanted the box to be empty.

@Shinmera
Copy link
Member

Shinmera commented Jul 9, 2020

The "default" is whatever the data is set to when you represent it. So in your case, make sure selection is set to an actual element that's part of the value-set.

@Shinmera
Copy link
Member

Shinmera commented Jul 9, 2020

Having the combo be a search field to trim down on possible entries in the set would be very good though. Just not sure how to go about it yet.

@Trashtalk217
Copy link
Contributor Author

There are definitely a lot of "modern" UI components that would be nice to have. From elements as small as chips to things as big as date selectors.

@Shinmera
Copy link
Member

Shinmera commented Jul 9, 2020

Stuff like a date selector, and arguably the combo, too, should rather be structures than components. So far I've intended on keeping components as minimal as possible, and instead making everything else a structure -- a combination of layouts and components.

That part of Alloy needs some rethinking, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants