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

build(): First version of using SauceLabs and BrowserStack on travis. #12

Merged
merged 1 commit into from
Jan 19, 2016

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Jan 14, 2016

No description provided.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 14, 2016
@hansl
Copy link
Contributor Author

hansl commented Jan 15, 2016

@jelbourn Just rerunning the build this morning was enough to make it pass. Yesterday's last test was a flake. Not 100% sure how I feel about that. Build 37 is the previous one that passed this morning.

@jelbourn jelbourn added the in progress This issue is currently in progress label Jan 15, 2016
@hansl hansl added pr: needs review and removed in progress This issue is currently in progress labels Jan 15, 2016
@jelbourn
Copy link
Member

@hansl We can go with it for now and see if it continues to be flaky. Can you squash your commits?

cc @Mlaval: Marc, if you have a few minutes to take a look that would be much appreciated.

process.env.BROWSER_STACK_ACCESS_KEY = decode(process.env.BROWSER_STACK_ACCESS_KEY);
}

function buildConfiguration(type, target, required) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a brief function description comment?

@jelbourn
Copy link
Member

Also FYI @IgorMinar @juliemr

{pattern: 'node_modules/rxjs/bundles/Rx.js', included: true, watched: true},
{pattern: 'node_modules/angular2/bundles/angular2.js', included: true, watched: true},
{pattern: 'node_modules/angular2/bundles/testing.dev.js', included: true, watched: true},
{pattern: 'node_modules/angular2/bundles/testing.dev.js', included: true, watched: true},
Copy link
Member

Choose a reason for hiding this comment

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

This is duplicated?

@jelbourn
Copy link
Member

LGTM, but I'd wait a couple hours in case someone else wants to comment on something.

@hansl hansl force-pushed the saucelabs branch 2 times, most recently from fa98a37 to 859d607 Compare January 15, 2016 19:30
@@ -0,0 +1,32 @@
// This file only hook up on require calls to transpile the TypeScript.
// If you're looking at this file to see Karma configuration, you should look at
// karma.config.ts instead.
Copy link
Member

Choose a reason for hiding this comment

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

After seeing this, my feelings are pretty mixed. It adds this extra layer of indirection and isn't what people expect when looking at a karma.conf.js. And the code in the config file is simple enough that you don't get a huge benefit from TS.

@robertmesserle What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my defense, the browser-providers files is getting smaller and easier to read. The configuration itself doesn't fully benefit but might in the future if we add stuff.

I agree though that this is a small section of the repo that won't get touched regularly.

@hansl hansl force-pushed the saucelabs branch 3 times, most recently from f08e9b3 to c8fa314 Compare January 19, 2016 06:05
@hansl
Copy link
Contributor Author

hansl commented Jan 19, 2016

Found the problem with the last few updates; the browserStack didn't properly start a tunnel and one was needed. I set the startTunnel var to true in the karma config for browserStack and it works.

Now, angular2 has a script to manually start a tunnel. I'm not 100% what the advantage of having this kind of control for us would be, but I'll consider it in a future update.

For now, I consider this PR done and working and will rebase and merge tomorrow morning, unless @jelbourn wants to put this on hold to review.

@IgorMinar
Copy link
Contributor

We start tunnel via a script because we want to reuse one tunnel across
many invocations of karma within the same build job.

Additionally since the tunnel takes a while to start we start initiating it
at the beginning of the job, then build stuff and by the time karma needs
to run the tunnel is ready.

I suggest you stick to the same setup as A2
On Mon, Jan 18, 2016 at 10:11 PM Hans notifications@github.com wrote:

Found the problem with the last few updates; the browserStack didn't
properly start a tunnel and one was needed. I set the startTunnel var to
true in the karma config for browserStack and it works.

Now, angular2 has a script to manually start a tunnel. I'm not 100% what
the advantage of having this kind of control for us would be, but I'll
consider it in a future update.

For now, I consider this PR done and working and will rebase and merge
tomorrow morning, unless @jelbourn https://github.com/jelbourn wants to
put this on hold to review.


Reply to this email directly or view it on GitHub
#12 (comment).

@hansl hansl force-pushed the saucelabs branch 7 times, most recently from 590318c to 9d4bdcb Compare January 19, 2016 18:58
@hansl hansl force-pushed the saucelabs branch 5 times, most recently from 02fbbda to 14c04c5 Compare January 19, 2016 19:32
@@ -0,0 +1,50 @@
'use strict';
Copy link
Member

Choose a reason for hiding this comment

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

Could you add comment up top here explaining what the purpose of this script is?

@jelbourn
Copy link
Member

LGTM once you get the rebasing resolved

@hansl
Copy link
Contributor Author

hansl commented Jan 19, 2016

👍 got the rebasing. Submitting once travis gives me the 💚

@hansl hansl merged commit 015f8f6 into angular:master Jan 19, 2016
@hansl hansl deleted the saucelabs branch February 2, 2016 00:39
sllethe added a commit to sllethe/material2 that referenced this pull request Jul 26, 2017
# This is the 1st commit message:

# This is a combination of 10 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

# This is the commit message angular#2:

rename
# This is the commit message angular#3:

optimize discription for '_stickyRegionBottomThreshold'
# This is the commit message angular#4:

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};
# This is the commit message angular#5:

Deleted 'generateCssStyle()' and 'getCssNumber()' function
# This is the commit message angular#6:

Deleted 'getCssValue()' function
# This is the commit message angular#7:

fix CSSStyleDeclaration


# This is the commit message angular#8:

change sticky width to 'this.upperScrollableContainer.clientWidth'
# This is the commit message angular#9:

fix
# This is the commit message angular#10:

nit
# This is the commit message angular#2:

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.
# This is the commit message angular#3:

nit


# This is the commit message angular#4:

nit
# This is the commit message angular#5:

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'
# This is the commit message angular#6:

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'
# This is the commit message angular#7:

fix tslint error
# This is the commit message angular#8:

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'


# This is the commit message angular#9:

Deleted variable 'elemHeight'
# This is the commit message angular#10:

Chaned to 'if (!this.stickyParent)'
# This is the commit message angular#11:

Simplified Docs for 'sticker()'.
# This is the commit message angular#12:

set 'defineRestriction()' function to private
# This is the commit message angular#13:

use 'RxChain'
# This is the commit message angular#14:

deleted unused 'tableModule' in modules.ts
# This is the commit message angular#15:

rename to  '_isPositionStickySupported'
# This is the commit message angular#16:

Use // for comments, /* */ for docs
sllethe added a commit to sllethe/material2 that referenced this pull request Aug 1, 2017
# This is the 1st commit message:

# This is a combination of 15 commits.
# This is the 1st commit message:

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert routes.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

# This is the commit message angular#2:

imported PlatformModule
# This is the commit message angular#3:

Add blank lines between these top-level symbol
# This is the commit message angular#4:

make '_isStickyPositionSupported' private
# This is the commit message angular#5:

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.
# This is the commit message angular#6:

Rename '_containerStart' to '_stickyRegionTop'
# This is the commit message angular#7:

rename
# This is the commit message angular#8:

optimize discription for '_stickyRegionBottomThreshold'
# This is the commit message angular#9:

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};
# This is the commit message angular#10:

Deleted 'generateCssStyle()' and 'getCssNumber()' function
# This is the commit message angular#11:

Deleted 'getCssValue()' function
# This is the commit message angular#12:

fix CSSStyleDeclaration


# This is the commit message angular#13:

change sticky width to 'this.upperScrollableContainer.clientWidth'
# This is the commit message angular#14:

fix
# This is the commit message angular#15:

nit
# This is the commit message angular#2:

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.
# This is the commit message angular#3:

nit


# This is the commit message angular#4:

nit
# This is the commit message angular#5:

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'
# This is the commit message angular#6:

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'
# This is the commit message angular#7:

fix tslint error
# This is the commit message angular#8:

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'


# This is the commit message angular#9:

Deleted variable 'elemHeight'
# This is the commit message angular#10:

Chaned to 'if (!this.stickyParent)'
sllethe added a commit that referenced this pull request Aug 4, 2017
* # This is a combination of 9 commits.
# This is the 1st commit message:

# This is a combination of 11 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

# This is the commit message #2:

fix
# This is the commit message #3:

delete sticky-header demo part from this branch

# This is the commit message #4:

revert firebase file
# This is the commit message #5:

change code according to comments in PR
# This is the commit message #6:

revert firbaserc
# This is the commit message #7:

revert demo-app.ts
# This is the commit message #8:

revert routes.ts
# This is the commit message #9:

revert demo-app-module.ts


# This is the commit message #10:

change
# This is the commit message #11:

fix the problem of : 'this.stickyParent' might be 'null'
# This is the commit message #2:

change doc
# This is the commit message #3:

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'
# This is the commit message #4:

Added prefix 'mat-' for CSS class
# This is the commit message #5:

Delete 'public' before variables
# This is the commit message #6:

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.
# This is the commit message #7:

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'
# This is the commit message #8:

Added docs for all variables
# This is the commit message #9:

extract 'generate CSS style'

* # This is a combination of 5 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

# This is the commit message #2:

imported PlatformModule
# This is the commit message #3:

Add blank lines between these top-level symbol
# This is the commit message #4:

make '_isStickyPositionSupported' private
# This is the commit message #5:

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

* # This is a combination of 16 commits.
# This is the 1st commit message:

# This is a combination of 10 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

# This is the commit message #2:

rename
# This is the commit message #3:

optimize discription for '_stickyRegionBottomThreshold'
# This is the commit message #4:

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};
# This is the commit message #5:

Deleted 'generateCssStyle()' and 'getCssNumber()' function
# This is the commit message #6:

Deleted 'getCssValue()' function
# This is the commit message #7:

fix CSSStyleDeclaration


# This is the commit message #8:

change sticky width to 'this.upperScrollableContainer.clientWidth'
# This is the commit message #9:

fix
# This is the commit message #10:

nit
# This is the commit message #2:

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.
# This is the commit message #3:

nit


# This is the commit message #4:

nit
# This is the commit message #5:

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'
# This is the commit message #6:

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'
# This is the commit message #7:

fix tslint error
# This is the commit message #8:

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'


# This is the commit message #9:

Deleted variable 'elemHeight'
# This is the commit message #10:

Chaned to 'if (!this.stickyParent)'
# This is the commit message #11:

Simplified Docs for 'sticker()'.
# This is the commit message #12:

set 'defineRestriction()' function to private
# This is the commit message #13:

use 'RxChain'
# This is the commit message #14:

deleted unused 'tableModule' in modules.ts
# This is the commit message #15:

rename to  '_isPositionStickySupported'
# This is the commit message #16:

Use // for comments, /* */ for docs

* add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

rename

optimize discription for '_stickyRegionBottomThreshold'

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};

Deleted 'generateCssStyle()' and 'getCssNumber()' function

Deleted 'getCssValue()' function

fix CSSStyleDeclaration

change sticky width to 'this.upperScrollableContainer.clientWidth'

fix

nit

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.

nit

nit

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'

fix tslint error

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'

Deleted variable 'elemHeight'

Chaned to 'if (!this.stickyParent)'

Simplified Docs for 'sticker()'.

set 'defineRestriction()' function to private

use 'RxChain'

deleted unused 'tableModule' in modules.ts

rename to  '_isPositionStickySupported'

Use // for comments, /* */ for docs

@angular/cdk

rename : values -> headerStyles

Move closing brace to the next line

optimized: [this._onScrollSubscription, this._onScrollSubscription, this._onResizeSubscription]
        .forEach(s => s && s.unsubscribe());

You should be able to do just '0' instead of '0px'

Format like TODO(sllethe): ...

private _attachEventListeners? Add a description like "Add listeners for events that affect sticky positioning."

optimize doc

Rename 'defineRestrictions' to '_measureStickyRegionBounds'

rename: private _resetElementStyles

let stuckRight: any = this.upperScrollableContainer.getBoundingClientRect().right;
chaned 'any' to 'number'

nit

change doc '/**
   * Unsticks the header so that it goes back to scrolling normally.
   *
   * This should be called when the element reaches the bottom of its cdkStickyRegion so that it
   * smoothly scrolls out of view as the next sticky-header moves in.
   */'

_unstuckElement -> _unstickElement

rename 'sticker()' to '_applyStickyPositionStyles()'

rename 'defineRestrictionsAndStick()' to '_updateStickyPositioning()'

* added tests for sticky-header

* deleted

* removed 'deps' in providers

* put provider in index

* optimize provider

* Removed unused 'fixture.detectChanges()' in test

* fix

* You can remove when sticky positioning is not supported since it's in describe

* stickyHeaderDir.stickyParent

* remove commented code

* rename stickyHeaderDir to stickyHeader

* Changed to use 'ngFor' to expand content instead of typing tons of '<p></p>'

* Add a comment that explains what these inline styles are for? Any reason you can't set them via the styles configuration for the component?

* Added explainations on styles

* Added /** @docs-private */

*  Added comments to explaining why tick(100) is needed. Changed 'tick(0)' to 'tick()'

* nit

* explained why need 'tick(100)'

* expect(/sticky/i.test(position!)).toBe(true);

* change CSS indent to +2

* nit

* Added test for sticky-header without StickyRegion

* change 'toBe(null)' to 'toBeNull()'

* Cool ! tick(debounce time)
sllethe added a commit to sllethe/material2 that referenced this pull request Aug 10, 2017
* # This is a combination of 9 commits.
# This is the 1st commit message:

# This is a combination of 11 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

# This is the commit message angular#2:

fix
# This is the commit message angular#3:

delete sticky-header demo part from this branch

# This is the commit message angular#4:

revert firebase file
# This is the commit message angular#5:

change code according to comments in PR
# This is the commit message angular#6:

revert firbaserc
# This is the commit message angular#7:

revert demo-app.ts
# This is the commit message angular#8:

revert routes.ts
# This is the commit message angular#9:

revert demo-app-module.ts


# This is the commit message angular#10:

change
# This is the commit message angular#11:

fix the problem of : 'this.stickyParent' might be 'null'
# This is the commit message angular#2:

change doc
# This is the commit message angular#3:

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'
# This is the commit message angular#4:

Added prefix 'mat-' for CSS class
# This is the commit message angular#5:

Delete 'public' before variables
# This is the commit message angular#6:

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.
# This is the commit message angular#7:

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'
# This is the commit message angular#8:

Added docs for all variables
# This is the commit message angular#9:

extract 'generate CSS style'

* # This is a combination of 5 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

# This is the commit message angular#2:

imported PlatformModule
# This is the commit message angular#3:

Add blank lines between these top-level symbol
# This is the commit message angular#4:

make '_isStickyPositionSupported' private
# This is the commit message angular#5:

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

* # This is a combination of 16 commits.
# This is the 1st commit message:

# This is a combination of 10 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

# This is the commit message angular#2:

rename
# This is the commit message angular#3:

optimize discription for '_stickyRegionBottomThreshold'
# This is the commit message angular#4:

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};
# This is the commit message angular#5:

Deleted 'generateCssStyle()' and 'getCssNumber()' function
# This is the commit message angular#6:

Deleted 'getCssValue()' function
# This is the commit message angular#7:

fix CSSStyleDeclaration


# This is the commit message angular#8:

change sticky width to 'this.upperScrollableContainer.clientWidth'
# This is the commit message angular#9:

fix
# This is the commit message angular#10:

nit
# This is the commit message angular#2:

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.
# This is the commit message angular#3:

nit


# This is the commit message angular#4:

nit
# This is the commit message angular#5:

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'
# This is the commit message angular#6:

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'
# This is the commit message angular#7:

fix tslint error
# This is the commit message angular#8:

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'


# This is the commit message angular#9:

Deleted variable 'elemHeight'
# This is the commit message angular#10:

Chaned to 'if (!this.stickyParent)'
# This is the commit message angular#11:

Simplified Docs for 'sticker()'.
# This is the commit message angular#12:

set 'defineRestriction()' function to private
# This is the commit message angular#13:

use 'RxChain'
# This is the commit message angular#14:

deleted unused 'tableModule' in modules.ts
# This is the commit message angular#15:

rename to  '_isPositionStickySupported'
# This is the commit message angular#16:

Use // for comments, /* */ for docs

* add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

rename

optimize discription for '_stickyRegionBottomThreshold'

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};

Deleted 'generateCssStyle()' and 'getCssNumber()' function

Deleted 'getCssValue()' function

fix CSSStyleDeclaration

change sticky width to 'this.upperScrollableContainer.clientWidth'

fix

nit

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.

nit

nit

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'

fix tslint error

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'

Deleted variable 'elemHeight'

Chaned to 'if (!this.stickyParent)'

Simplified Docs for 'sticker()'.

set 'defineRestriction()' function to private

use 'RxChain'

deleted unused 'tableModule' in modules.ts

rename to  '_isPositionStickySupported'

Use // for comments, /* */ for docs

@angular/cdk

rename : values -> headerStyles

Move closing brace to the next line

optimized: [this._onScrollSubscription, this._onScrollSubscription, this._onResizeSubscription]
        .forEach(s => s && s.unsubscribe());

You should be able to do just '0' instead of '0px'

Format like TODO(sllethe): ...

private _attachEventListeners? Add a description like "Add listeners for events that affect sticky positioning."

optimize doc

Rename 'defineRestrictions' to '_measureStickyRegionBounds'

rename: private _resetElementStyles

let stuckRight: any = this.upperScrollableContainer.getBoundingClientRect().right;
chaned 'any' to 'number'

nit

change doc '/**
   * Unsticks the header so that it goes back to scrolling normally.
   *
   * This should be called when the element reaches the bottom of its cdkStickyRegion so that it
   * smoothly scrolls out of view as the next sticky-header moves in.
   */'

_unstuckElement -> _unstickElement

rename 'sticker()' to '_applyStickyPositionStyles()'

rename 'defineRestrictionsAndStick()' to '_updateStickyPositioning()'

* added tests for sticky-header

* deleted

* removed 'deps' in providers

* put provider in index

* optimize provider

* Removed unused 'fixture.detectChanges()' in test

* fix

* You can remove when sticky positioning is not supported since it's in describe

* stickyHeaderDir.stickyParent

* remove commented code

* rename stickyHeaderDir to stickyHeader

* Changed to use 'ngFor' to expand content instead of typing tons of '<p></p>'

* Add a comment that explains what these inline styles are for? Any reason you can't set them via the styles configuration for the component?

* Added explainations on styles

* Added /** @docs-private */

*  Added comments to explaining why tick(100) is needed. Changed 'tick(0)' to 'tick()'

* nit

* explained why need 'tick(100)'

* expect(/sticky/i.test(position!)).toBe(true);

* change CSS indent to +2

* nit

* Added test for sticky-header without StickyRegion

* change 'toBe(null)' to 'toBeNull()'

* Cool ! tick(debounce time)
sllethe added a commit to sllethe/material2 that referenced this pull request Aug 10, 2017
* # This is a combination of 9 commits.
# This is the 1st commit message:

# This is a combination of 11 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

# This is the commit message angular#2:

fix
# This is the commit message angular#3:

delete sticky-header demo part from this branch

# This is the commit message angular#4:

revert firebase file
# This is the commit message angular#5:

change code according to comments in PR
# This is the commit message angular#6:

revert firbaserc
# This is the commit message angular#7:

revert demo-app.ts
# This is the commit message angular#8:

revert routes.ts
# This is the commit message angular#9:

revert demo-app-module.ts


# This is the commit message angular#10:

change
# This is the commit message angular#11:

fix the problem of : 'this.stickyParent' might be 'null'
# This is the commit message angular#2:

change doc
# This is the commit message angular#3:

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'
# This is the commit message angular#4:

Added prefix 'mat-' for CSS class
# This is the commit message angular#5:

Delete 'public' before variables
# This is the commit message angular#6:

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.
# This is the commit message angular#7:

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'
# This is the commit message angular#8:

Added docs for all variables
# This is the commit message angular#9:

extract 'generate CSS style'

* # This is a combination of 5 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

# This is the commit message angular#2:

imported PlatformModule
# This is the commit message angular#3:

Add blank lines between these top-level symbol
# This is the commit message angular#4:

make '_isStickyPositionSupported' private
# This is the commit message angular#5:

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

* # This is a combination of 16 commits.
# This is the 1st commit message:

# This is a combination of 10 commits.
# This is the 1st commit message:

add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

# This is the commit message angular#2:

rename
# This is the commit message angular#3:

optimize discription for '_stickyRegionBottomThreshold'
# This is the commit message angular#4:

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};
# This is the commit message angular#5:

Deleted 'generateCssStyle()' and 'getCssNumber()' function
# This is the commit message angular#6:

Deleted 'getCssValue()' function
# This is the commit message angular#7:

fix CSSStyleDeclaration


# This is the commit message angular#8:

change sticky width to 'this.upperScrollableContainer.clientWidth'
# This is the commit message angular#9:

fix
# This is the commit message angular#10:

nit
# This is the commit message angular#2:

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.
# This is the commit message angular#3:

nit


# This is the commit message angular#4:

nit
# This is the commit message angular#5:

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'
# This is the commit message angular#6:

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'
# This is the commit message angular#7:

fix tslint error
# This is the commit message angular#8:

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'


# This is the commit message angular#9:

Deleted variable 'elemHeight'
# This is the commit message angular#10:

Chaned to 'if (!this.stickyParent)'
# This is the commit message angular#11:

Simplified Docs for 'sticker()'.
# This is the commit message angular#12:

set 'defineRestriction()' function to private
# This is the commit message angular#13:

use 'RxChain'
# This is the commit message angular#14:

deleted unused 'tableModule' in modules.ts
# This is the commit message angular#15:

rename to  '_isPositionStickySupported'
# This is the commit message angular#16:

Use // for comments, /* */ for docs

* add lib files for sticky-header

add chose parent

add support to 'optional 'cdkStickyRegion' input '

add app-demo for sticky-header

fix bugs and deleted unused tag id in HTML files

modify

fix some code according to PR review comments

change some format to pass TSlint check

add '_' before private elements

delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable

refine code

encapsulate 'set style for element'

change @input()

Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')'

add const STICK_START_CLASS and STICK_END_CLASS

Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'.

change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule';

encapsulate reset css style operation for sticky header.

delete unnecessary gloable variables

delete global variable '_width'

Add doc for 'sticker()' function. explained how it works.

add more doc for 'sticker()', explaining 'isStuck' flag

2 space for indent

fix

delete sticky-header demo part from this branch

revert firebase file

change code according to comments in PR

revert firbaserc

revert demo-app.ts

revert routes.ts

revert demo-app-module.ts

change

fix the problem of : 'this.stickyParent' might be 'null'

change doc

Change the constructor of 'cdkStickyRegion' to 'constructor(public readonly _elementRef: ElementRef) { }'

Added prefix 'mat-' for CSS class

Delete 'public' before variables

Object.assign isn't supported in IE11; use extendObject from src/lib/core/util.

 IE11 will have trouble with  `translate3d(0, 0, 0);', change to `translate3d(0px, 0px, 0px);'

Added docs for all variables

extract 'generate CSS style'

created a generateStyleCSS() function, let it be responsible for generating all those CSS styles.

reformat

add debounce to solve 'getBoundingClientRect() cause slow down' problem.

add position:sticky and check whether browser support it. If not , use the naive implementation

removed unused import

Removed unused 'scrollableRegion' and 'parentRegion'

removed commented lines

default public

Add comments about why setting style top and position for iPhone and not IE. And extract detectBrowser() as a new function

format

consider all circumstances of browser.

use "===" instead of '=='

 make 'navigator.userAgent.toLocaleLowerCase()' a local variable

optimize

Added comments on const 'STICK_START_CLASS' and 'STICK_END_CLASS'.
change their content to cdk-sticky-header-start and cdk-sticky-header-end

Added comments for STICK_START_CLASS and STICK_END_CLASS.

Changed the format of one-line JsDoc

unsubscribe sbscriptions onDestory

Use what modernizr does on compatibility instead of get the browser version directly.

add 'padding' and 'stickyRegionHeight' variables to avoid calling 'getComputedStyle()' too many times (which is expensive).

move docs above @directive

removed the underscore in'_element: ElementRef',

expand 'reg' to 'region'

use 'if (this.isIE)' instead of 'if(this.isIE === true)'

added more newlines between params in 'generateCssStyle()' function to make it easier to understand.

Added reference link to Modernizer in docs of getSupportList()

Deleted "_supportList" variable

renamed 'isIE' to 'isStickyPositionSupported', and removed extra space before Observable

Set debounce time as a const variable

Added docs for 'const DEBOUNCE_TIME: number = 5;'

Changed ' if(this.stickyParent == null)' to ' if(!this.stickyParent)'

 Removed the @param and @returns and make sure the types are correct in the function signature in 'generateCssStyle(...)' function

Added docs for `isStickyPositionSupported` variable

changed '+=' to '=' of 'stickyText' in getSupportList() function

nit added " " between 'if' and '('

nit

Added comments

deleted unused import

change comments

optimize comments

deleted unnecessary global variables(padding and stickyRegionHeight)

Added check whether we are on browser

Array<string> to string[]

test?

try to reopen the old PR

fix after rebase

revert list.ts

test

test 222

revert demo

revert list.ts second time

Move code to 'src/cdk'

revert 'move code to 'src/cdk'' , it should be done in a new PR

revert

avoid calling 'getComputedStyle()' too many times.

rename as sticky-header.ts

imported PlatformModule

Add blank lines between these top-level symbol

make '_isStickyPositionSupported' private

Changed the originalCSS to private and use '{} as CSSStyleDeclaration' instead of ''any.

Rename '_containerStart' to '_stickyRegionTop'

rename

optimize discription for '_stickyRegionBottomThreshold'

private _originalStyles = {
      position: '',
      top: '',
      right: '',
      left: '',
      bottom: '',
      width:  '',
      zIndex: ''};

Deleted 'generateCssStyle()' and 'getCssNumber()' function

Deleted 'getCssValue()' function

fix CSSStyleDeclaration

change sticky width to 'this.upperScrollableContainer.clientWidth'

fix

nit

Added the 'isPositionStickySupported() ' function  to src/cdk/platform/features.ts.
Consume that function in this component and just always use both the webkit and unprefixed styles.

nit

nit

update doc 'Debounce time in milliseconds for events that affect the sticky positioning (e.g. scroll, resize, touch move). Set as 5 milliseconds which is the highest delay that doesn't drastically affect the positioning adversely.'

changed the doc to  '/** z-index to be applied to the sticky header (default is 10). */'

fix tslint error

for comment 'Can you evaluate each method to make sure their accessor privacy is right? E.g. see which functions need to be public, private, static, etc'

Deleted variable 'elemHeight'

Chaned to 'if (!this.stickyParent)'

Simplified Docs for 'sticker()'.

set 'defineRestriction()' function to private

use 'RxChain'

deleted unused 'tableModule' in modules.ts

rename to  '_isPositionStickySupported'

Use // for comments, /* */ for docs

@angular/cdk

rename : values -> headerStyles

Move closing brace to the next line

optimized: [this._onScrollSubscription, this._onScrollSubscription, this._onResizeSubscription]
        .forEach(s => s && s.unsubscribe());

You should be able to do just '0' instead of '0px'

Format like TODO(sllethe): ...

private _attachEventListeners? Add a description like "Add listeners for events that affect sticky positioning."

optimize doc

Rename 'defineRestrictions' to '_measureStickyRegionBounds'

rename: private _resetElementStyles

let stuckRight: any = this.upperScrollableContainer.getBoundingClientRect().right;
chaned 'any' to 'number'

nit

change doc '/**
   * Unsticks the header so that it goes back to scrolling normally.
   *
   * This should be called when the element reaches the bottom of its cdkStickyRegion so that it
   * smoothly scrolls out of view as the next sticky-header moves in.
   */'

_unstuckElement -> _unstickElement

rename 'sticker()' to '_applyStickyPositionStyles()'

rename 'defineRestrictionsAndStick()' to '_updateStickyPositioning()'

* added tests for sticky-header

* deleted

* removed 'deps' in providers

* put provider in index

* optimize provider

* Removed unused 'fixture.detectChanges()' in test

* fix

* You can remove when sticky positioning is not supported since it's in describe

* stickyHeaderDir.stickyParent

* remove commented code

* rename stickyHeaderDir to stickyHeader

* Changed to use 'ngFor' to expand content instead of typing tons of '<p></p>'

* Add a comment that explains what these inline styles are for? Any reason you can't set them via the styles configuration for the component?

* Added explainations on styles

* Added /** @docs-private */

*  Added comments to explaining why tick(100) is needed. Changed 'tick(0)' to 'tick()'

* nit

* explained why need 'tick(100)'

* expect(/sticky/i.test(position!)).toBe(true);

* change CSS indent to +2

* nit

* Added test for sticky-header without StickyRegion

* change 'toBe(null)' to 'toBeNull()'

* Cool ! tick(debounce time)
@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

5 participants