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

Add ListComboBox #627

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open

Add ListComboBox #627

wants to merge 90 commits into from

Conversation

hamen
Copy link
Collaborator

@hamen hamen commented Oct 14, 2024

Overview

This PR contains new components that are meant to replace the Dropdown composable.

ListComboBox

This is the simplest way to create an editable dropdown menu that shows a list and allows adding a value that is not present in the list. The API is very minimal to keep things "nice and easy":

public fun ListComboBox(
    items: List<String>,
    listItemContent: @Composable (String, Boolean, Boolean) -> Unit,
)

ComboBox

This is one of the building blocks and represents the editable version of the dropdown component, containing the empty popup and the editable text field.

NotEditableComboBox

This is one of the building blocks and represents the editable version of the dropdown component, containing the empty popup and the text label.

SimpleListItem

This is a pre-made composable that can help to create a list ComboBox without stressing over the styling.

PopupContainer

This is the empty popup used by the ComboBox that can be filled with custom composables.

@hamen hamen self-assigned this Oct 14, 2024
@hamen hamen marked this pull request as ready for review October 14, 2024 10:36
@hamen hamen requested a review from rock3r October 14, 2024 10:36
@rock3r rock3r added the new component A new component to implement label Oct 14, 2024
@rock3r
Copy link
Collaborator

rock3r commented Oct 14, 2024

When testing, I found these issues:

This is just a quick smoke test. I will not review this PR until these are fixed, as it's bound to introduce more changes (and hopefully not more bugs)

hamen and others added 19 commits October 16, 2024 15:22
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
hamen and others added 25 commits October 16, 2024 15:23
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
Signed-off-by: Ivan Morgillo <[email protected]>
They changed the config and didn't implement a migration of the old
config to the new config 🤦
Stuff is still broken, maybe more than before :P
hamen and others added 2 commits October 16, 2024 16:18
Signed-off-by: Ivan Morgillo <[email protected]>
* rename a bunch of lambdas to make the linter happy

Signed-off-by: Ivan Morgillo <[email protected]>

* Fix #632

Signed-off-by: Ivan Morgillo <[email protected]>

* stitch broken tests

Signed-off-by: Ivan Morgillo <[email protected]>

* update API files

Signed-off-by: Ivan Morgillo <[email protected]>

* stitch IDE sample

Signed-off-by: Ivan Morgillo <[email protected]>

* make the formatter happy

* renamed a bunch of lambdas and shushed the linter

Signed-off-by: Ivan Morgillo <[email protected]>

* format EditableComboBox

* improve test for disabled ComboBox

Signed-off-by: Ivan Morgillo <[email protected]>

---------

Signed-off-by: Ivan Morgillo <[email protected]>
Co-authored-by: morgillo <[email protected]>
* remove rounded corner from IntUiBridge SimpleListItemMetrics

Signed-off-by: Ivan Morgillo <[email protected]>

* make the formatter happy

---------

Signed-off-by: Ivan Morgillo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new component A new component to implement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListComboBox feature list Split out popup window background from menus
2 participants