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

feat(material-experimental/mdc-slider): implement the mdc slider #22596

Merged
merged 35 commits into from May 7, 2021

Conversation

wagnermaciel
Copy link
Contributor

No description provided.

* clearing the outdated code from mdc-slider
* this will also make future commit messages easier to read
…erAdapter (angular#21645)

* create slider-adapter.ts
* add method stubs for MDCSliderAdapter implementation
* add MDCSliderFoundation class variable to MatSlider
…erThumb (angular#21655)

* created slider-thumb.ts
* created MatSliderThumb directive for the mdc-slider input
…ngular#21844)

* feat(material-experimental/mdc-slider): implement the SliderAdapter

* complete the core logic for MatSliderThumb and MatSlider
* collapse slider-thumb.ts and slider-adapter.ts into slider.ts
…ular#21971)

* fix(material-experimental/mdc-slider): init step on thumb inputs
)

* feat(material-experimental/mdc-slider): add slider styles

* implement _MatSliderMixinBase
* add color input to MatSlider
* extend _MatSliderMixinBase from MatSlider
* use without-ripple mixin for slider.scss
* @include all other mdc-slider mixins except thumb-ripple-color in _slider-theme.scss
* implement primary, accent, and warn colors in _slider-theme.scss
angular#21979)

* create MatSliderVisualThumb
* create slider-thumb.html & slider-thumb.scss
…sor (angular#22016)

* feat(material-experimental/mdc-slider): implement control value accessor
…ts (angular#22072)

* feat(material-experimental/mdc-slider): implement some basic unit tests

* implement unit tests for the standard slider, standard range slider, and for the slider ripple states
* add mdc-slider theme to all-theme
* use #waitForAsync to wait for foundation to finish initializing & layout
* use forwardRef to avoid injection errors that only throw on ci
* disable the mat ripple on the slider thumbs to prevent the automatic launch that happens on click/touch
  the problem is easily reproduced if you undo this change and test it out on a mobile device.
* note: we use touch events instead of pointer events when testing on ios because pointerdown,
  pointerup, and pointermove are not supported
…th set min and max

* add support for changing the min, max, or step after the component has already been initialized
* in view engine, MatSliders inputs are not initialized before MatSliderThumbs constructor is called.
  This means we cannot initialize the slider value attribute in the constructor. To fix this, we
  are initializing the value attribute in ngOnInit which is still before ngAfterViewInit but after
  MatSliders inputs are initialized
…ar#22195)

* remove mdc-slider theme from theme.scss since it is already included in all-theme now
* avoid using deprecated mdc-theme prop-value function in _slider-theme.scss
angular#22196)

* feat(material-experimental/mdc-slider): add support for rtl/ltr toggle
angular#22199)

* feat(material-experimental/mdc-slider): add support for disabling ripples
angular#22216)

* fix(material-experimental/mdc-slider): add slider to mdc_scss_deps_lib
angular#22214)

* test(material-experimental/mdc-slider): add tests for sliders with set steps
angular#22238)

* test(material-experimental/mdc-slider): add tests for slider with set displayWith

* fix(material-experimental/mdc-slider): trigger change detection when the value indicator text changes
angular#22286)

* fix(material-experimental/mdc-slider): fix change events on slider inputs

* create GlobalChangeAndInputListener to handle listening for change events that occur on the document
* stop all of the slider inputs change events from reaching users
* dispatch our own fake change events from #emitChangeEvent in the slider adapter
* use the GlobalChangeAndInputListener for change events instead of adding our own event listener
  in #registerInputEventHandler
* keep track of and unsubscribe from the GlobalChangeAndInputListener in
  #deregisterInputEventHandler
… the mdc slider

* use #fromEvent to simplify the global change and input listener
* go back to dispatching real events instead of using Angular's event emitter system
* fix how the global change and input listener is used in the slider adapter
* Rename fake event indicator boolean
* Simplified change & input event logic to make things more readable
…ngular#22445)

* add exportAs: matSliderThumb to MatSliderThumb
* create focus and blur methods in MatSliderThumb to match the old demo
* create basic tests for standard, disabled, and range sliders
…angular#22546)

* test(material-experimental/mdc-slider): add custom form control tests

* fix bug where setting the disabled state on the overall
  slider was not disabling the individual slider thumbs
  control value accessor disabled state.
…r#22571)

* whenStable was causing tests to pass even when they should have been failing
…undation (angular#22579)

* The MDC Foundation stores the bounding client rect when layout is first called.
  This means that if the position of the slider changes after the initial layout,
  the slider will break. To fix this broken behavior, we have to keep
  calling layout.
* Added a unit test to ensure layout changes does not break the slider.
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 29, 2021
* define the width for the unit test component styles
* fix decimal step tests that were failing because of the firefox
  decimal imprecision bug
@jelbourn jelbourn added target: minor This PR is targeted for the next minor release action: merge The PR is ready for merge by the caretaker labels Apr 30, 2021
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes were approved in individual PRs

@jelbourn jelbourn marked this pull request as ready for review April 30, 2021 21:38
@josephperrott josephperrott removed the request for review from a team April 30, 2021 22:30
@crisbeto crisbeto added the P2 The issue is important to a large percentage of users, with a workaround label May 3, 2021
@mmalerba mmalerba merged commit 8dcc94d into angular:master May 7, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants