Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

feat(tabs): Add disabled tab + improvements #369

Merged
merged 20 commits into from
Nov 13, 2017
Merged

feat(tabs): Add disabled tab + improvements #369

merged 20 commits into from
Nov 13, 2017

Conversation

trimox
Copy link
Owner

@trimox trimox commented Nov 9, 2017

mdc-tab

  • Add disabled: boolean property to mdc-tab
  • Refactor active property
  • Add changeDetection: ChangeDetectionStrategy.OnPush
  • Add preserveWhitespaces: false
  • Add getComputedWidth(): number; return the computed width for tab.
  • Add getComputedLeft(): number; return the computed left offset for tab.
  • Add isActive() return true if tab is active.
  • Add setActive(boolean); set tab active property to value passed.
  • Add getPreventDefaultOnClick(): boolean; return true if the tab prevents the default click action.
  • Add setPreventDefaultOnClick(boolean); sets tabs preventDefaultOnClick property to the value passed.
  • Add measureSelf(); sets computedWidth and computedLeft for a tab.

mdc-tab-bar

  • Add getComputedWidth(): number
  • Add layout(): void
  • Add changeDetection: ChangeDetectionStrategy.OnPush
  • Add preserveWhitespaces: false
  • Add getActiveTabIndex(): number
  • Add switchToTabAtIndex(index: number, shouldNotify: boolean = true)
  • Add MdcTabBarIndicator directive
  • Add setPreventDefaultOnClickForTabAtIndex(index: number, preventDefaultOnClick: boolean)
  • Add isDefaultPreventedOnClickForTabAtIndex(index: number): boolean

mdc-tab-bar-scroller

  • Add layout()
  • Add changeDetection: ChangeDetectionStrategy.OnPush
  • Add preserveWhitespaces: false
  • Add scrollBack(event?: Event)
  • Add scrollForward(event?: Event)
  • Remove mdc-tab-bar-scroll-button directive

BREAKING CHANGE: Removed mdc-tab-bar-scroll-button directive. Use mdc-icon instead. Please update your code accordingly.
Example:

<mdc-tab-bar-scroll-back>
  <mdc-icon>navigate_before</mdc-icon>
</mdc-tab-bar-scroll-back>

Closes #349 Closes #147 Closes #281

@codecov
Copy link

codecov bot commented Nov 9, 2017

Codecov Report

Merging #369 into master will increase coverage by 0.3%.
The diff coverage is 96.17%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #369     +/-   ##
========================================
+ Coverage    92.6%   92.9%   +0.3%     
========================================
  Files          90      90             
  Lines        4910    4992     +82     
  Branches      903     916     +13     
========================================
+ Hits         4547    4638     +91     
+ Misses        363     354      -9
Impacted Files Coverage Δ
src/lib/tabs/index.ts 100% <ø> (ø) ⬆️
src/lib/tabs/tab-bar-scroller/tab-bar-scroller.ts 89.54% <100%> (+2.04%) ⬆️
src/lib/tabs/tab-bar/tab-bar.ts 92.85% <93.5%> (+1.34%) ⬆️
src/lib/tabs/tab/tab.ts 99.18% <97.95%> (+3.99%) ⬆️
src/lib/snackbar/snackbar.component.ts 91.48% <0%> (+3.54%) ⬆️

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 563d287...b77a1e3. Read the comment docs.

@trimox trimox mentioned this pull request Nov 13, 2017
@trimox
Copy link
Owner Author

trimox commented Nov 13, 2017

All set. Finishing up some demo examples and will merge.

@trimox trimox mentioned this pull request Nov 13, 2017
@trimox trimox merged commit f073c92 into master Nov 13, 2017
@trimox trimox deleted the feat/tabs branch November 13, 2017 18:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant