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(md-checkbox): Implement md-checkbox. #131

Closed
wants to merge 1 commit into from

Conversation

traviskaufman
Copy link
Contributor

This commit adds the md-checkbox component to the material2 repo. It
includes unit tests and demos for the component. Note that while there
is a demo which exhibits all functionality of the component, the "Nested
Checklist" demo is still a WIP.

Fixes #35

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 7, 2016
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
xml:space="preserve">
Copy link
Member

Choose a reason for hiding this comment

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

Are xml:space and xmlns:xlink necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think xmlns:xlink is but I'd argue xml:space is because it explicitly instructs browsers how to parse the SVG XML. From the MDN Docs

Note that this attribute influences the way a browser should parse the xml content and therefore will change the way the DOM is built.

@@ -18,6 +18,11 @@ $pi: 3.14159265;
// Easing Curves
// TODO(jelbourn): all of these need to be revisited

// The default animation curves used by material design.
$linear-out-slow-in-timing-function: cubic-bezier(0.0, 0.0, 0.2, 0.1) !default;
Copy link
Member

Choose a reason for hiding this comment

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

Can you prefix these variables with md-? (it's a bug that the existing ones don't have a prefix)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@traviskaufman traviskaufman force-pushed the feat-md-checkbox branch 2 times, most recently from 3589e32 to e579751 Compare March 8, 2016 23:16
@traviskaufman
Copy link
Contributor Author

@jelbourn all changes made!

var fixture: ComponentFixture;

beforeEach(function(done: () => void) {
builder.createAsync(CheckboxEndAlignedController).then(function(_fixture_) {
Copy link
Member

Choose a reason for hiding this comment

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

Rather than _fixture_, I'd be fine with just saying f (since the first thing you do is set it to fixture)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@traviskaufman
Copy link
Contributor Author

@jelbourn all changes made!

@jelbourn
Copy link
Member

jelbourn commented Mar 9, 2016

LGTM

@kara can you do a pass? I think it's generally good to have a second set of eyes on any larger change.

@jelbourn
Copy link
Member

jelbourn commented Mar 9, 2016

@traviskaufman Looks like CI is failing:

IE 11.0.0 (Windows 8.1 0.0.0) MdCheckbox when the checkbox is clicked toggles the checked value FAILED
    TypeError: Object doesn't support this action

Is this something we can change in the code? Looks like there's a missing polyfill.

}

.md-checkbox-background {
@extend %md-checkbox-background;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: do you think it's confusing that the class and the placeholder share the same name? Since the comment above cites the "outer box", that might be a more descriptive name for the placeholder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@traviskaufman
Copy link
Contributor Author

@jelbourn @kara @marcysutton all changes made!

@jelbourn
Copy link
Member

jelbourn commented Mar 9, 2016

@traviskaufman looks like there a few failures left on CI?

@traviskaufman
Copy link
Contributor Author

@jelbourn looking into it now

@traviskaufman traviskaufman force-pushed the feat-md-checkbox branch 3 times, most recently from f1c1693 to c9da559 Compare March 10, 2016 20:48
This commit adds the `md-checkbox` component to the material2 repo. It
includes unit tests and demos for the component. Note that while there
is a demo which exhibits all functionality of the component, the "Nested
Checklist" demo is still a WIP.

Fixes angular#35
@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mdCheckbox
6 participants