-
Notifications
You must be signed in to change notification settings - Fork 132
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 support for id and inner attributes #206
Conversation
`Options.id` allows users to specify the `id` that can then be used with the new DOM API. `Options.inner` allows users to specify attributes on `inner` elements of components that support it.
What about |
@OvermindDL1: @aforemny is looking into (some variant of) the attach idea, see here. |
@@ -99,7 +99,7 @@ type alias Config m = | |||
, cols : Maybe Int | |||
, autofocus : Bool | |||
, maxlength : Maybe Int | |||
, style : List (Options.Style m) | |||
, inner : List (Options.Style m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We lost style
, so this needs to be merged in master, not v7, yes?
Maybe keep the name style
in v7, then switch it to inner in master, add the switch to a new file MIGRATION.md
in master, where we collect migration notes for the eventual v8 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Textfield actually does not expose Config
so this is a MINOR
change according to elm-package diff
I made some minor line notes, but I like this. Merge it when you've settled the v7/master question. |
Ordering is important to avoid problems with having users provide important attributes with Options.inner and overriding the ones that are necessary for proper functionality
Resolves #204
Options.id
allows users to specify theid
that can then beused with the new DOM API.
Options.inner
allows users to specify attributes oninner
elements of components that support it.
I went through the list by @debois in #204. Only components that I really found needing support for
Options.inner
wereTextfield
as well asToggles
, both of them haveinput
elements that the users can now add attributes to withOptions.inner
.Most of the other components have users specify sections of content already and for those they can just use
Options.id
(such as Tabs and Grids). For other components there was really no clearinner
element that would benefit from enabling this support.As always looking for feedback and suggestions, especially if there is a component that could really use
Options.inner
support