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

238 put options for the dropdown in their own type #239

Merged
merged 5 commits into from
Jun 27, 2023

Conversation

jachin
Copy link

@jachin jachin commented Jun 23, 2023

The goal of this PR is to try help use the Elm type system to make the code more clear and hopefully avoid some bugs.

I'm not sure this PR actually fixes any bugs but I do feel like this is an improvement.

There are a lot of places in Much Select where we have a list of options. In some cases we actually know more about that list of options then that it's just a list of options.

There are several places in MuchSelect where we need to know which options are in the drop drown. Once we have that figured out, we could "capture" that bit of information and "encode" it in a type. This PR adds types for that.

I ended up having to add a couple of types because we also group options (think the <optgroup> tag).

These changes should make working on #141 and easier and safer goal.

Jachin Rupe added 2 commits June 23, 2023 12:24
@jachin jachin linked an issue Jun 23, 2023 that may be closed by this pull request
@jachin jachin merged commit 58684e2 into master Jun 27, 2023
@jachin jachin deleted the 238-put-options-for-the-dropdown-in-their-own-type branch June 27, 2023 16:19
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

Successfully merging this pull request may close these issues.

Put Options for the Dropdown in their own type
1 participant