Skip to content

fix(tabs): update tab output names #7134

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

Merged
merged 5 commits into from
Oct 3, 2017
Merged

Conversation

amcdnl
Copy link
Contributor

@amcdnl amcdnl commented Sep 17, 2017

Updates the tabs to the following new apis per #6677

  • selectChange to selectedTabChange
  • onCentering to _onCentering
  • onCentered to _onCentered

@amcdnl amcdnl self-assigned this Sep 17, 2017
@amcdnl amcdnl requested a review from jelbourn September 17, 2017 18:09
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 17, 2017
@amcdnl amcdnl removed the request for review from andrewseguin September 17, 2017 18:09
@Output() selectChange: EventEmitter<MdTabChangeEvent> = new EventEmitter<MdTabChangeEvent>(true);

/** Event emitted when the tab selection has changed. */
@Output() selectedTabChange: EventEmitter<MdTabChangeEvent> =
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 duplicating the creation of the EventEmitter and then having to call both, why not just have selectedTabChange get the selectChange value currently.

/**
 * Event emitted when the tab selection has changed.
 * @deprecated Use `selectedTabChange` instead.
 */
@Output() get selectChange(): EventEmitter<MdTabChangeEvent> {
  return this.selectedTabChange;
}

/** Event emitted when the tab selection has changed. */
@Output() get selectedTabChange(): EventEmitter<MdTabChangeEvent> = 
  new EventEmitter<MdTabChangeEvent>(true);

Doing it this way, allows for users to move to the new output, and ultimately allows for the removal of the @Output with minimal change to the code in the future as no change is needed below in the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Updated!

Copy link
Member

@jelbourn jelbourn 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 jelbourn changed the title chore(api): update tab api #6677 fix(tabs): update tab output names #6677 Sep 19, 2017
@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 19, 2017
@jelbourn jelbourn added the P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful label Sep 22, 2017
@mmalerba
Copy link
Contributor

@amcdnl your closing mat-tab-body tag looks like it got turned into a md-tab-body tag somehow, mind fixing so I can presubmit?

@mmalerba mmalerba removed the action: merge The PR is ready for merge by the caretaker label Sep 22, 2017
@amcdnl
Copy link
Contributor Author

amcdnl commented Sep 24, 2017

@mmalerba - done :)

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Sep 24, 2017
@andrewseguin andrewseguin added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Sep 29, 2017
@amcdnl
Copy link
Contributor Author

amcdnl commented Oct 3, 2017

@andrewseguin - rebased.

@mmalerba mmalerba added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Oct 3, 2017
@kara kara changed the title fix(tabs): update tab output names #6677 fix(tabs): update tab output names Oct 3, 2017
@kara kara merged commit 38268d3 into angular:master Oct 3, 2017
@amcdnl amcdnl deleted the tab-outputs-6677 branch October 4, 2017 14:12
@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 7, 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 P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants