This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Fix repeater collapsible on push #1724
Merged
Blackbaud-SteveBrush
merged 29 commits into
master
from
fix-repeater-collapsible-on-push
Jun 13, 2018
Merged
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3f4222e
Resolving Card action bar still visable after hiding with *ngIf #1421
blackbaud-conorwright a450054
Addressed PR style comments
blackbaud-conorwright 4b809aa
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright d55f351
Merge branch 'master' into master
Blackbaud-SteveBrush 833bcc7
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright b553659
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright ab82ba3
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright db21c76
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright a282a86
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright d210c2b
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 35e789d
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 636c5dd
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright bdc97a6
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 6104aaf
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 37f50ec
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 76279cd
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 2324e90
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright d48b8f2
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright b2e318a
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 8d52945
Merge remote-tracking branch 'upstream/master'
blackbaud-conorwright 119bcb2
made isCollapsible into an observable so that it pushes on updates
blackbaud-conorwright df8f3fc
removed unused import
blackbaud-conorwright 43ee008
Merge branch 'master' into fix-repeater-collapsible-on-push
Blackbaud-SteveBrush 9cae4fd
Merge branch 'fix-repeater-collapsible-on-push' of github.com:blackba…
Blackbaud-SteveBrush 31c4fa2
addressed PR comments
blackbaud-conorwright fee4cf2
removed observable. Triggered change mark
blackbaud-conorwright 97a61c2
reordered imports
blackbaud-conorwright 48bffe8
Merge remote-tracking branch 'upstream/master' into fix-repeater-coll…
blackbaud-conorwright b4b1437
Merge branch 'master' into fix-repeater-collapsible-on-push
Blackbaud-SteveBrush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,23 @@ import { | |
Input | ||
} from '@angular/core'; | ||
|
||
import { skyAnimationSlide } from '../animation/slide'; | ||
import { | ||
BehaviorSubject | ||
} from 'rxjs/BehaviorSubject'; | ||
|
||
import { SkyRepeaterService } from './repeater.service'; | ||
import { SkyLogService } from '../log/log.service'; | ||
import { SkyCheckboxChange } from '../checkbox/checkbox.component'; | ||
import { | ||
skyAnimationSlide | ||
} from '../animation/slide'; | ||
import { | ||
SkyRepeaterService | ||
} from './repeater.service'; | ||
import { | ||
SkyLogService | ||
} from '../log/log.service'; | ||
import { | ||
SkyCheckboxChange | ||
} from '../checkbox/checkbox.component'; | ||
import { Observable } from 'rxjs/Observable'; | ||
|
||
@Component({ | ||
selector: 'sky-repeater-item', | ||
|
@@ -16,6 +28,7 @@ import { SkyCheckboxChange } from '../checkbox/checkbox.component'; | |
animations: [skyAnimationSlide] | ||
}) | ||
export class SkyRepeaterItemComponent { | ||
|
||
public get isExpanded(): boolean { | ||
return this._isExpanded; | ||
} | ||
|
@@ -34,22 +47,25 @@ export class SkyRepeaterItemComponent { | |
|
||
public slideDirection: string; | ||
|
||
public get isCollapsible(): boolean { | ||
return this._isCollapsible; | ||
public get isCollapsibleObservable(): Observable<boolean> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've been trying to avoid Observables whenever we can because they add a layer of complexity that's difficult to debug later on. I was able to get this working without Observables, if I changed this component's change detection strategy to Curious if that works on your end? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that does work. That is a cleaner implementation |
||
return this._isCollapsible.asObservable(); | ||
} | ||
|
||
public get isCollapsible(): boolean { | ||
return this._isCollapsible.getValue(); | ||
} | ||
public set isCollapsible(value: boolean) { | ||
if (this._isCollapsible !== value) { | ||
this._isCollapsible = value; | ||
if (this.isCollapsible !== value) { | ||
this._isCollapsible.next(value); | ||
|
||
/*istanbul ignore else */ | ||
if (!this._isCollapsible) { | ||
if (!value) { | ||
this.updateForExpanded(true, false); | ||
} | ||
} | ||
} | ||
|
||
private _isCollapsible = true; | ||
private _isCollapsible: BehaviorSubject<boolean> = new BehaviorSubject(true); | ||
|
||
private _isExpanded = true; | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these imports were incorrectly formatted to begin with, but could we order them from external to local files? Also, each import needs a newline after it:
#1647 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done