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(tab): Add MDCTab component #2421

Merged
merged 29 commits into from
Mar 20, 2018
Merged

feat(tab): Add MDCTab component #2421

merged 29 commits into from
Mar 20, 2018

Conversation

patrickrodee
Copy link
Contributor

@patrickrodee patrickrodee commented Mar 16, 2018

Fixes #2376

@codecov-io
Copy link

codecov-io commented Mar 16, 2018

Codecov Report

Merging #2421 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2421      +/-   ##
==========================================
+ Coverage   98.86%   98.88%   +0.01%     
==========================================
  Files         101      104       +3     
  Lines        4149     4210      +61     
  Branches      529      533       +4     
==========================================
+ Hits         4102     4163      +61     
  Misses         47       47
Impacted Files Coverage Δ
packages/mdc-tab/foundation.js 100% <100%> (ø)
packages/mdc-tab/index.js 100% <100%> (ø)
packages/mdc-tab/constants.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87ececa...8105d23. Read the comment docs.

@@ -56,6 +57,7 @@ autoInit.register('MDCLinearProgress', linearProgress.MDCLinearProgress);
autoInit.register('MDCNotchedOutline', notchedOutline.MDCNotchedOutline);
autoInit.register('MDCRadio', radio.MDCRadio);
autoInit.register('MDCSnackbar', snackbar.MDCSnackbar);
autoInit.register('MDCTab_', tab.MDCTab);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A working but imperfect solution to avoid naming collision.

}

/** @return {!MDCRipple} */
get ripple() {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a get ripple method on MDCTab?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure. I was following other components and exposing a getter for MDCRipple seems to be common practice.

But is it necessary? Probably not.

/**
* The [de]activation animation affects color for text label and icon
*/
.mdc-tab--animating-activate .mdc-tab__text-label,
Copy link
Contributor

Choose a reason for hiding this comment

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

should we just have an mdc-tab--animating class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The separate classes are because activation has a 100ms delay.

Copy link
Contributor Author

@patrickrodee patrickrodee Mar 20, 2018

Choose a reason for hiding this comment

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

Offline discussion: keep em both

{
"name": "@material/tab",
"description": "The Material Components for the web tab component",
"version": "0.33.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be version 0.0.0 I think...then Lerna up the version number later.

I forget where the docs are, but somewhere there are docs saying how to create a new package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dope, I'll check that out.

@@ -63,6 +63,7 @@
"slider": "/demos/slider.scss",
"snackbar": "/demos/snackbar.scss",
"switch": "/demos/switch.scss",
"tab": "/demos/tab.scss",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ask Andy if we still need these golden files. I think the webpack refactor is over...so maybe we can remove these files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed with @acdvorak these are necessary for now.

@patrickrodee patrickrodee merged commit a8b3193 into master Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants