Closed mdodgelooker closed 3 years ago
Status | Category | Percentage | Covered / Total |
---|---|---|---|
π’ | Statements | 94.84% | 7290/7687 |
π‘ | Branches | 87.14% | 4643/5328 |
π’ | Functions | 93.63% | 2101/2244 |
π’ | Lines | 95.38% | 7054/7396 |
Status of coverage: π’ - ok, π‘ - slightly more than threshold, π΄ - under the threshold
Report generated by π§ͺjest coverage report action from 77c2084cef3ad2362b7c3721ee9985c72be0e99c
@lukelooker I see your point about the placeholder. With text fields, Material seems to allow placeholder but barely mention it in docs: https://material.angular.io/components/form-field/overview#form-field-appearance
But it doesn't seem to exist at all for selects. But the label does move up on focus for selects: https://material-components.github.io/material-web/demos/select/
Do we want to stop just supporting placeholder
on Select
when externalLabel: false
? Or at least I can remove it from our examples...
My guess is that we have quite a few uses of placeholder
's in select, I would be hesitant to remove them.
@lukelooker I was trippin about externalLabel
in the stories β it does show in the controls whether or not you have it in the story args.
As for the Select
placeholder... it seems like we need to move the label up immediately on focus to be material-y, but disabling placeholder
might be too risky. Maybe we just discourage its use in the docs (once we turn externalLabel
off by default in 3.0) or say to only use it with externalLabe={true}
? Any other ideas?
@lukelooker I was trippin about
externalLabel
in the stories β it does show in the controls whether or not you have it in the story args.
π
As for the
Select
placeholder... it seems like we need to move the label up immediately on focus to be material-y, but disablingplaceholder
might be too risky. Maybe we just discourage its use in the docs (once we turnexternalLabel
off by default in 3.0) or say to only use it withexternalLabe={true}
? Any other ideas?
I'm fine with moving ahead as-is β I suspect we'll see people downplay the use of placeholders in designs with this new design and I do think it'll be less disconcerting with real placeholder / label text. :)
Happy to re-review when the stories are cleaned up (use externalLabel = true
in template instead of modifying all stories) :)
@lukelooker I think the externalLabel fixes are all in.
FloatingLabelField
:FieldSelect
FieldChips
hasValue
is derived simply fromprops.values
checkValueOnBlur
is set tofalse
, meaningFloatingLabelField
doesn't need to check for a value in the internal input on blur event, since that is automatically converted to a chip on blur (viaonChange
)FieldTime
checkValueOnBlur
since there are actually 3 internal inputs to checkFieldTimeSelect
ExtendedComponentsThemeProvider
so thatexternalLabel
can be toggled in the controlsexternalLabel: false
stories for each component