Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

refactor: material-slider #255

Closed
wants to merge 1 commit into from
Closed

refactor: material-slider #255

wants to merge 1 commit into from

Conversation

ajoslin
Copy link
Contributor

@ajoslin ajoslin commented Sep 9, 2014

WIP of the slider. Not quite ready to merge yet.

@marcysutton
Copy link
Contributor

@ajoslin let me know when you're ready for an accessibility pass on the slider.

@ajoslin
Copy link
Contributor Author

ajoslin commented Sep 10, 2014

All that's left is a few unit tests.

@marcysutton Ready for the pass!

*
* This should be added in a better place later.
*/
angular.element.prototype.focus = function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(function(proto) { !proto.focus && proto.focus = function() { ... }; })(angular.element.prototype);

@ajoslin
Copy link
Contributor Author

ajoslin commented Sep 15, 2014

Test out using ease transitions, especially for the bubble, or even try a bounce.

@ajoslin
Copy link
Contributor Author

ajoslin commented Sep 15, 2014

Fix slider thumb top being clipped on focus.

@ajoslin
Copy link
Contributor Author

ajoslin commented Sep 15, 2014

Doesn't support choosing from a given set of options (like a select or radio button).

Pending feature: support <material-slider ng-model="petId" ng-options="pet.id as pet.name for pet in pets">

* @param {number=} max The maximum value the user is allowed to pick. Default 100.
*/
function SliderDirective() {
var hasTouch = !!('ontouchend' in document);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecated in favor of hammerjs

@ajoslin ajoslin force-pushed the wip-slider branch 3 times, most recently from 1579b50 to 88e165b Compare September 16, 2014 17:50
};
}
// Default values, overridable by attrs
attr.min ? attr.$observe('min', updateMin) : updateMin(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should just make aria-valuemin the default attribute here, so we don't have to bind and maintain multiple attributes. Sliders need aria-valuemax and aria-valuenow as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's keep min and max as the default attributes, since that matches the native slider.

We can bind to valuemin and valuemax from the min and max, then make valuenow updated when the model is updated.

ajoslin added a commit that referenced this pull request Sep 16, 2014
@ajoslin ajoslin closed this in 5ea4dbc Sep 16, 2014
@ajoslin ajoslin deleted the wip-slider branch September 17, 2014 19:24
ajoslin added a commit that referenced this pull request Sep 19, 2014
Closes #260. Closes #245. Closes #221. Closes #160. Closes #36.
Closes #31. Closes #21. Closes #255.
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants