Add directive to collapse elements via height.

This commit is contained in:
Paulo Reis 2017-02-17 11:24:21 +00:00
parent a639f13cb6
commit 0841ab8278
3 changed files with 10 additions and 1 deletions

View file

@ -100,7 +100,9 @@
)
i.fa.fa-angle-down
.rp-overview-file-entries(ng-class="{ 'rp-overview-file-entries-collapsed' : reviewPanel.overview.docsCollapsedState[doc.doc.id] }")
.rp-overview-file-entries(
review-panel-collapse-height="reviewPanel.overview.docsCollapsedState[doc.doc.id]"
)
.rp-entry-wrapper(
ng-repeat="(entry_id, entry) in reviewPanel.entries[doc.doc.id] | orderOverviewEntries"
ng-if="!(entry.type === 'comment' && reviewPanel.commentThreads[entry.thread_id].resolved === true)"

View file

@ -8,6 +8,7 @@ define [
"ide/review-panel/directives/addCommentEntry"
"ide/review-panel/directives/resolvedCommentEntry"
"ide/review-panel/directives/resolvedCommentsDropdown"
"ide/review-panel/directives/reviewPanelCollapseHeight"
"ide/review-panel/filters/notEmpty"
"ide/review-panel/filters/orderOverviewEntries"
], () ->

View file

@ -575,10 +575,16 @@
transform: rotateZ(0deg);
transition: transform 0.15s ease
}
.rp-overview-file-header-collapse-on {
transform: rotateZ(180deg);
}
.rp-overview-file-entries {
overflow: hidden;
transition: height .15s;
}
.rp-comment-wrapper {
transition: .35s opacity ease-out .2s;