-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(select): Add enhanced select variant #3949
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3949 +/- ##
==========================================
- Coverage 98.48% 98.48% -0.01%
==========================================
Files 120 126 +6
Lines 5227 5594 +367
Branches 657 746 +89
==========================================
+ Hits 5148 5509 +361
- Misses 79 85 +6
Continue to review full report at Codecov.
|
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.
This should be fine, but has merge conflicts with #3929. Since you also reviewed that, could you take a look at the conflicts?
Also FYI I added a BREAKING CHANGE note into the PR description to use for the commit.
.travis.yml
Outdated
@@ -13,6 +13,7 @@ branches: | |||
# This prevents excessive resource usage and CI slowness. | |||
only: | |||
- master | |||
- feat/select-new |
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.
Remove this before merging
packages/mdc-select/index.js
Outdated
if (this.menuElement_) { | ||
this.selectedText_.addEventListener('keydown', this.handleKeydown_); | ||
this.menu_.listen(menuSurfaceConstants.strings.CLOSED_EVENT, this.handleMenuClosed_); | ||
// Menu should open to the last selected element. |
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.
Move this comment into the body of handleMenuOpened_
(around L279)
882d6d9
to
2e860a3
Compare
🤖 Beep boop! Screenshot test report 🚦100 screenshots changed from Details36 Changed:
64 Added: |
🤖 Beep boop! Screenshot test report 🚦100 screenshots changed from Details36 Changed:
64 Added: |
packages/mdc-select/_mixins.scss
Outdated
@include mdc-select-outline-color($mdc-select-outlined-idle-border); | ||
@include mdc-select-hover-outline-color($mdc-select-outlined-hover-border); | ||
@include mdc-select-focused-outline-color(primary); | ||
@include mdc-floating-label-float-position($mdc-select-outlined-label-position-y); |
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.
I think this line is now redundant since mdc-select-outline-shape-radius invokes this a few lines later. This line was removed in #3929 (and was one of the conflicts listed earlier, I think).
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.
This needs one more rebase but then LGTM presuming no unexpected screenshot diffs.
I put a BREAKING CHANGE note in the PR description, copy that into the commit description (and tweak if you like).
🤖 Beep boop! Screenshot test report 🚦100 screenshots changed from Details36 Changed:
64 Added: |
BREAKING CHANGE: Adds a new DOM element for the mdc-select.
9c7ec3a
to
3212c8a
Compare
🤖 Beep boop! Screenshot test report 🚦100 screenshots changed from Details36 Changed:
64 Added: |
🤖 Beep boop! Screenshot test report 🚦124 screenshots changed from Details36 Changed:
88 Added: |
🤖 Beep boop! Screenshot test report 🚦124 screenshots changed from Details36 Changed:
88 Added: |
🤖 Beep boop! Screenshot test report 🚦124 screenshots changed from Details36 Changed:
88 Added: |
🤖 Beep boop! Screenshot test report 🚦124 screenshots changed from Details36 Changed:
88 Added: |
I don't know much about MDC internals, but couldn't helper-text and probably icon be moved to their own component avoiding code duplication? As you did with line-ripple |
@porfirioribeiro That is the plan in the future. We didn't have time for this release to separate the internals into their own packages but we'll end up doing that in the long run. |
Ok thats great, avoiding code duplication if you use both. |
Adds the leading icon variant to the select.
Adds the helper text to the select.
Adds the rotating dropdown icon to the select.
Adds the enhanced menu version of the select.
fixes #2552, fixes #3706, fixes #3629, fixes #3627, fixes #3628, fixes #291, fixes #3728, fixes #3648, fixes #3729, fixes #2275, fixes #2211, fixes #2227, fixes #1835
BREAKING CHANGE: Several adapter APIs were added to support the enhanced variant. The drop-down arrow is now its own element. The change event is now MDCSelect:change for all variants. See the README for full details.