-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(collapse): respect display input value #6071
Open
marcinmajkowski
wants to merge
1
commit into
valor-software:development
Choose a base branch
from
marcinmajkowski:fix-collapse-display
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix(collapse): respect display input value #6071
marcinmajkowski
wants to merge
1
commit into
valor-software:development
from
marcinmajkowski:fix-collapse-display
Conversation
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
marcinmajkowski
force-pushed
the
fix-collapse-display
branch
from
April 24, 2021 11:14
f7a37ef
to
afe0e89
Compare
This change removes race conditions caused by TypeScript setters being called by Angular in non-deterministic order. Setters side effects (reading values set in other setters) are moved to ngOnChanges lifecycle hook. The consequence is that those side effects are no longer called when those inputs are set other than in the template. This is a breaking change but methods to call instead of setting those properties are already provided (show/hide) so migration path is straightforward. Setting display to 'none' no longer hides the collapse, setting collapse input to true or calling hide method is the way to go. BREAKING CHANGE: setting display or collapse property on CollapseDirective no longer expands/collapses the collapse - use show/hide methods instead or set collapse input in template
marcinmajkowski
force-pushed
the
fix-collapse-display
branch
from
April 24, 2021 11:18
afe0e89
to
6a4ada2
Compare
Codecov Report
@@ Coverage Diff @@
## development #6071 +/- ##
===============================================
+ Coverage 69.78% 69.83% +0.04%
===============================================
Files 343 343
Lines 9235 9227 -8
Branches 2007 2006 -1
===============================================
- Hits 6445 6444 -1
+ Misses 2195 2189 -6
+ Partials 595 594 -1
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change removes race conditions caused by TypeScript setters being called by Angular in non-deterministic order. Setters side effects (reading values set in other setters) are moved to
ngOnChanges
lifecycle hook. The consequence is that those side effects are no longer called when those inputs are set other than in the template. This is a breaking change but methods to call instead of setting those properties are already provided (show
/hide
) so migration path is straightforward. Settingdisplay
to'none'
no longer hides the collapse, settingcollapse
input totrue
or callinghide
method is the way to go.BREAKING CHANGE: setting
display
orcollapse
property onCollapseDirective
no longer expands/collapses the collapse - useshow
/hide
methods instead or setcollapse
input in templateNo changes in tests since those are currently structured such that I cannot add display property for only one case (there is single shared template). I can restructure the tests to use separate templates (with
overrideComponent
) if you wish (I consider this major change since most likely majority of lines in spec file will be affected) .PR Checklist
Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.