Skip to content

Conversation

@kara
Copy link
Contributor

@kara kara commented Jul 21, 2016

r: @jelbourn

This PR adds custom position support to menu. The default menu opens "after" and "below" the trigger. If you want to change that, you can modify the "x-position" and "y-position" attributes (see design doc here).

x-position: 'before' | 'after'
y-position: 'above' | 'below'

Examples:

<md-menu x-position="before">
...
</md-menu>

FYI, this PR needs to wait until my other menu PR goes in, so check out the last commit.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 21, 2016
private _showClickCatcher: boolean = false;
private _classList: Object;
positionX: 'before' | 'after' = 'after';
positionY: 'above' | 'below' = 'below';
Copy link
Member

Choose a reason for hiding this comment

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

Create a type for these, i.e.,

export type MenuPositionX: 'before' | 'after';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call! Way better.

@kara kara force-pushed the position branch 4 times, most recently from 6ca221e to 0829631 Compare July 21, 2016 20:32
@kara
Copy link
Contributor Author

kara commented Jul 21, 2016

@jelbourn comments should be addressed:
0829631

page = new MenuPage();
});

it('should open menu when the trigger is clicked', function () {
Copy link
Member

Choose a reason for hiding this comment

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

() =>

Copy link
Contributor Author

@kara kara Jul 21, 2016

Choose a reason for hiding this comment

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

Oh, whoa. Updated!

})
export class MdMenu {
private _showClickCatcher: boolean = false;
private _classList: Object;
Copy link
Member

Choose a reason for hiding this comment

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

Object isn't super clear; add a comment explaining that this is the input into ngClass with an example?

@jelbourn
Copy link
Member

LGTM aside from existing comments; did you figure out the scrollbars on SauceLabs thing?

@kara kara added the action: merge The PR is ready for merge by the caretaker label Jul 22, 2016
@robertmesserle robertmesserle merged commit 16eb6be into angular:master Jul 22, 2016
@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 6, 2019
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants