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(tabs): add ripples to the tab group and nav bar links #1700

Merged
merged 5 commits into from
Nov 14, 2016

Conversation

andrewseguin
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 2, 2016
@@ -2,7 +2,7 @@

<div class="demo-nav-bar">
<nav md-tab-nav-bar aria-label="weather navigation links">
<a md-tab-link
<a md-tab-link md-ripple
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the user have to add the ripple themselves if using tab-link?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this isn't so ideal. I talked to Jeremy and I might be able to play around a bit more with md-tab-link to get it working as a ripple. I'll send a message when this PR has that incorporated

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, sounds good. If you haven't already, you might want to check out md-button's ripple. It's also an attr directive on an anchor.

@andrewseguin andrewseguin changed the title feat(tabs): add ripples to the tab group; demo nav bar ripple feat(tabs): add ripples to the tab group and nav bar links Nov 2, 2016
@andrewseguin
Copy link
Contributor Author

Okay, I made MdTabLink extend the MdRipple so that it automatically applies the ripple effect on the element. What do you guys think of this approach?

@andrewseguin
Copy link
Contributor Author

Tests are failing due to lacking changes from PR #1684 which fixes ripple pointer events

@andrewseguin
Copy link
Contributor Author

Tests are passing, able to be reviewed now

@@ -24,7 +25,7 @@ export class MdTabNavBar {
@Directive({
selector: '[md-tab-link]',
})
export class MdTabLink {
export class MdTabLink extends MdRipple {
Copy link
Contributor

Choose a reason for hiding this comment

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

Conceptually, I find it a bit confusing that the link extends a ripple. Any reason why we wouldn't convert this to a component and use the md-ripple-trigger property?

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 agree, it's odd to say that the md tab link extends a ripple. I'd prefer to keep this an attribute directive to preserve the end user's HTML using all native elements (nav, a), e.g.:

<nav md-tab-nav-bar>
  <a md-tab-link>Link</a>
  <a md-tab-link>Link</a>
</nav>

So there are two more alternatives:

  1. Add [md-tab-link] selector to the MdRipple
  2. Create a new MdTabLinkRipple directive that will only extend MdRipple and match [md-tab-link]

In talking with Jeremy, I think (2) sounds better than MdTabLink extending MdRipple and (1) just sounds more silly than either.

Copy link
Contributor Author

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

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

Ripple has been extracted out of the md tab link

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn
Copy link
Member

@andrewseguin can you rebase?

@andrewseguin
Copy link
Contributor Author

Conflicts resolved, thanks

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Nov 14, 2016
@kara kara merged commit b9fe75a into angular:master Nov 14, 2016
@andrewseguin andrewseguin deleted the tabs-ripple branch December 20, 2016 22:58
@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