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(): switch component #90

Closed
devversion opened this issue Feb 21, 2016 · 10 comments
Closed

feat(): switch component #90

devversion opened this issue Feb 21, 2016 · 10 comments
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix new component This issue is tracking a new component to be added to the library
Milestone

Comments

@devversion
Copy link
Member

Hello,
Just wanted to know, if someone is already working on the switch component?
As I recently trying things with Angular 2 I built a few components and would like to help if desired at the material2 component. I know it's still in early stages, but I think it never hurts to ask.

Preview

@jelbourn
Copy link
Member

We definitely plan on building one, but we're waiting for completion of both the checkbox (#35) since it will share most of the code, and gestures (#72) for having a common way of doing the sliding. Once those pieces are done I'll come back and update this issue.

@jelbourn jelbourn added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Feb 24, 2016
@jelbourn jelbourn added this to the before beta milestone Feb 27, 2016
@jelbourn jelbourn added the new component This issue is tracking a new component to be added to the library label Feb 27, 2016
@devversion
Copy link
Member Author

@jelbourn Is this now unblocked? Since HammerJS is now available.

@jelbourn jelbourn removed the blocked label Apr 21, 2016
@jelbourn
Copy link
Member

@devversion I suppose it is. Is this something you want to contribute?

Couple of notes:

  • A lot of the TS code should be shared between this and checkbox.
  • Users should be able to drag the switch part.

@jelbourn
Copy link
Member

cc @kara

@devversion
Copy link
Member Author

devversion commented Apr 21, 2016

@jelbourn Yes definitely.

I already implemented it myself a few months ago (#7)

  • But you may have noticed, it used much things from Material 1 and even used an internal gesture service.

I will start working on this new component the next days (ngMaterial 1.1.0) and will not reuse some old snippets of Material 1.

I try to extend as much as possible and also work on the drag for the switch part.

@jelbourn
Copy link
Member

jelbourn commented Apr 21, 2016

@devversion it would be good to break the work into stages. Something like:

  1. Add empty skeleton for slide-toggle
  2. Refactor any checkbox code that would be used by both (could also be borken into smaller PRs)
  3. Add the dragging to the slide-toggle

(I forgot to mention earlier, we want to change the name to md-slide-toggle since "switch" is already overloaded with the switch control construct, e.g., ng-switch).

@devversion
Copy link
Member Author

@jelbourn Yea this sounds good. Am I allowed to ask some questions on Slack, if needed?

@jelbourn
Copy link
Member

@devversion of course!

@devversion
Copy link
Member Author

devversion commented May 18, 2016

Closed with #362.

@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 Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix new component This issue is tracking a new component to be added to the library
Projects
None yet
Development

No branches or pull requests

2 participants