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

component(): sidenav. #24

Merged
merged 1 commit into from
Feb 1, 2016
Merged

component(): sidenav. #24

merged 1 commit into from
Feb 1, 2016

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Jan 20, 2016

@jelbourn @robertmesserle @kara

Design:

Todo:

  • Backdrop
  • Unit tests
    • MdSidenav
    • MdSidenavContainer
  • LTR/RTL
  • container attribute on the drawers.
  • display: none when fully closed (after transition end).
  • Documentation.
    • MdSidenav
    • MdSidenavContainer
  • Side-by-side mode.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 20, 2016
@hansl hansl added the in progress This issue is currently in progress label Jan 20, 2016
z-index: $z-index-drawer;
box-sizing: border-box;

background-color: white;
Copy link
Member

Choose a reason for hiding this comment

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

Color should be defined in terms of the current theme.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that slipped through :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, it seems the default background is rgba(0,0,0,0) which I find awkward.

@hansl hansl force-pushed the md-sidenav branch 11 times, most recently from 193bd15 to a4cb50f Compare January 27, 2016 23:08
@hansl hansl force-pushed the md-sidenav branch 2 times, most recently from 7d88492 to b24708f Compare January 28, 2016 00:10
@hansl
Copy link
Contributor Author

hansl commented Jan 28, 2016

@jelbourn @kara @robertmesserle

Please review style and content, but not tests.

private start_: MdSidenav;
private end_: MdSidenav;
private right_: MdSidenav;
private left_: MdSidenav;
Copy link
Member

Choose a reason for hiding this comment

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

Why are there left_ and right_ properties? If they're just aliases, I think that's confusing and prone to errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because left_ and right_ are on the right/left independently of direction, while start/end changes based on direction.

Copy link
Member

Choose a reason for hiding this comment

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

Add explanation?

@jelbourn
Copy link
Member

cc @juliemr would you be able to take a quick peek at the unit tests here to make sure we're setting ourselves up with good practices?

justindujardin added a commit to justindujardin/ng2-material that referenced this pull request Jan 31, 2016
describe('methods', () => {
it('should be able to open and close', (done: any) => {
let testComponent: BasicTestApp;
let fixture: ComponentFixture;
Copy link
Member

Choose a reason for hiding this comment

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

What do you gain from declaring fixture out here? Why not just do .then(fixture: ComponentFixture) in each of the tests and save some lines?

@hansl
Copy link
Contributor Author

hansl commented Jan 31, 2016

@juliemr I am chaining all the promises. In order to do that I'd need to return the fixture for every executor function.

@juliemr
Copy link
Member

juliemr commented Jan 31, 2016

ah, gotcha. OK, test looks good to me.

/**
* Whether the sidenav is opened. We overload this because we trigger an event when it
* starts or end.
* @returns {boolean}
Copy link
Member

Choose a reason for hiding this comment

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

We should leave the types out of the JsDoc since they're just part of the language

@jelbourn
Copy link
Member

jelbourn commented Feb 1, 2016

LGTM, though tests seem to be failing

@jelbourn jelbourn added pr: lgtm and removed in progress This issue is currently in progress labels Feb 1, 2016
@hansl
Copy link
Contributor Author

hansl commented Feb 1, 2016

It's weird that we have methods that returns something with a @returns JSDoc, and technically the type is non optional. That's probably why WebStorm added the type to it.

Tests are flaky. I'll rerun them until they pass. :/

@hansl hansl merged commit bd8cfef into angular:master Feb 1, 2016
@hansl hansl deleted the md-sidenav branch February 2, 2016 00:39
@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.

None yet

6 participants