-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General: Animate content sidebar on toggle (#9412)
- Loading branch information
Showing
14 changed files
with
164 additions
and
90 deletions.
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
2 changes: 1 addition & 1 deletion
2
src/main/webapp/app/overview/course-exams/course-exams.component.html
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
2 changes: 1 addition & 1 deletion
2
src/main/webapp/app/overview/course-exercises/course-exercises.component.html
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
2 changes: 1 addition & 1 deletion
2
src/main/webapp/app/overview/course-lectures/course-lectures.component.html
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
2 changes: 1 addition & 1 deletion
2
src/main/webapp/app/overview/course-tutorial-groups/course-tutorial-groups.component.html
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
140 changes: 71 additions & 69 deletions
140
src/main/webapp/app/shared/sidebar/sidebar.component.html
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 |
---|---|---|
@@ -1,74 +1,76 @@ | ||
<div class="d-flex sidebar rounded-3 px-3 sidebar-width hide-on_print" [ngClass]="{ 'sidebar-height-dev': !isProduction || isTestServer, collapsed: isCollapsed }"> | ||
<div class="w-100 bg-module"> | ||
<div class="sidebar-content" [ngClass]="{ collapsed: isCollapsed }"> | ||
@if (searchFieldEnabled) { | ||
<div class="mt-2 mb-2"> | ||
<jhi-search-filter (newSearchEvent)="setSearchValue($event)" class="mb-2" /> | ||
@if (showFilter) { | ||
<div class="ms-2 mt-1 text-primary"> | ||
<a (click)="openFilterExercisesDialog()"> | ||
@if (isFilterActive) { | ||
<fa-icon [icon]="faFilterCurrentlyApplied" /> | ||
} @else { | ||
<fa-icon [icon]="faFilter" /> | ||
} | ||
<span jhiTranslate="artemisApp.courseOverview.exerciseFilter.filter"></span> | ||
</a> | ||
</div> | ||
} | ||
</div> | ||
} | ||
@if (!sidebarData?.ungroupedData || !(sidebarData?.ungroupedData | searchFilter: ['title', 'type'] : searchValue)?.length) { | ||
<div | ||
[ngClass]="{ 'content-height-dev': !isProduction || isTestServer }" | ||
[jhiTranslate]=" | ||
(sidebarDataBeforeFiltering?.ungroupedData?.length ?? 0) > 0 && sidebarData.ungroupedData?.length === 0 | ||
? 'artemisApp.courseOverview.general.noElementFoundWithAppliedFilter' | ||
: 'artemisApp.courseOverview.general.noDataFound' | ||
" | ||
class="mt-2 text-center scrollable-item-content" | ||
></div> | ||
} @else { | ||
<div | ||
class="scrollable-item-content my-2" | ||
[ngClass]="{ | ||
'content-height-dev': !isProduction || isTestServer, | ||
'search-height-conversations': sidebarData?.sidebarType === 'conversation', | ||
'search-height-normal': sidebarData?.sidebarType !== 'conversation', | ||
}" | ||
> | ||
@if (sidebarData?.groupByCategory && sidebarData.groupedData) { | ||
<jhi-sidebar-accordion | ||
[searchValue]="searchValue" | ||
[groupedData]="sidebarData.groupedData" | ||
[sidebarType]="sidebarData.sidebarType" | ||
[storageId]="sidebarData.storageId" | ||
[routeParams]="routeParams" | ||
[courseId]="courseId" | ||
[itemSelected]="itemSelected" | ||
[showAddOptions]="sidebarData.showAccordionAddOption ?? false" | ||
[showLeadingIcon]="sidebarData.showAccordionLeadingIcon ?? false" | ||
[showAddOption]="showAddOption" | ||
[channelTypeIcon]="channelTypeIcon" | ||
[collapseState]="collapseState" | ||
(onUpdateSidebar)="onUpdateSidebar.emit()" | ||
[isFilterActive]="isFilterActive" | ||
/> | ||
} @else { | ||
@for (sidebarItem of sidebarData?.ungroupedData | searchFilter: ['title', 'type'] : searchValue; track sidebarItem; let last = $last) { | ||
<div [ngClass]="{ 'mb-2': !last }"> | ||
<div | ||
jhiSidebarCard | ||
[size]="sidebarItem.size" | ||
[itemSelected]="itemSelected" | ||
[sidebarType]="sidebarData.sidebarType" | ||
[sidebarItem]="sidebarItem" | ||
></div> | ||
<div class="sidebar-wrap"> | ||
<div class="d-flex sidebar rounded-3 px-3 sidebar-width hide-on_print" [ngClass]="{ 'sidebar-height-dev': !isProduction || isTestServer, collapsed: isCollapsed }"> | ||
<div class="w-100 bg-module"> | ||
<div class="sidebar-content" [ngClass]="{ collapsed: isCollapsed }"> | ||
@if (searchFieldEnabled) { | ||
<div class="mt-2 mb-2"> | ||
<jhi-search-filter (newSearchEvent)="setSearchValue($event)" class="mb-2" /> | ||
@if (showFilter) { | ||
<div class="ms-2 mt-1 text-primary"> | ||
<a (click)="openFilterExercisesDialog()"> | ||
@if (isFilterActive) { | ||
<fa-icon [icon]="faFilterCurrentlyApplied" /> | ||
} @else { | ||
<fa-icon [icon]="faFilter" /> | ||
} | ||
<span jhiTranslate="artemisApp.courseOverview.exerciseFilter.filter"></span> | ||
</a> | ||
</div> | ||
} | ||
} | ||
</div> | ||
} | ||
</div> | ||
} | ||
@if (!sidebarData?.ungroupedData || !(sidebarData?.ungroupedData | searchFilter: ['title', 'type'] : searchValue)?.length) { | ||
<div | ||
[ngClass]="{ 'content-height-dev': !isProduction || isTestServer }" | ||
[jhiTranslate]=" | ||
(sidebarDataBeforeFiltering?.ungroupedData?.length ?? 0) > 0 && sidebarData.ungroupedData?.length === 0 | ||
? 'artemisApp.courseOverview.general.noElementFoundWithAppliedFilter' | ||
: 'artemisApp.courseOverview.general.noDataFound' | ||
" | ||
class="mt-2 text-center scrollable-item-content" | ||
></div> | ||
} @else { | ||
<div | ||
class="scrollable-item-content my-2" | ||
[ngClass]="{ | ||
'content-height-dev': !isProduction || isTestServer, | ||
'search-height-conversations': sidebarData?.sidebarType === 'conversation', | ||
'search-height-normal': sidebarData?.sidebarType !== 'conversation', | ||
}" | ||
> | ||
@if (sidebarData?.groupByCategory && sidebarData.groupedData) { | ||
<jhi-sidebar-accordion | ||
[searchValue]="searchValue" | ||
[groupedData]="sidebarData.groupedData" | ||
[sidebarType]="sidebarData.sidebarType" | ||
[storageId]="sidebarData.storageId" | ||
[routeParams]="routeParams" | ||
[courseId]="courseId" | ||
[itemSelected]="itemSelected" | ||
[showAddOptions]="sidebarData.showAccordionAddOption ?? false" | ||
[showLeadingIcon]="sidebarData.showAccordionLeadingIcon ?? false" | ||
[showAddOption]="showAddOption" | ||
[channelTypeIcon]="channelTypeIcon" | ||
[collapseState]="collapseState" | ||
(onUpdateSidebar)="onUpdateSidebar.emit()" | ||
[isFilterActive]="isFilterActive" | ||
/> | ||
} @else { | ||
@for (sidebarItem of sidebarData?.ungroupedData | searchFilter: ['title', 'type'] : searchValue; track sidebarItem; let last = $last) { | ||
<div [ngClass]="{ 'mb-2': !last }"> | ||
<div | ||
jhiSidebarCard | ||
[size]="sidebarItem.size" | ||
[itemSelected]="itemSelected" | ||
[sidebarType]="sidebarData.sidebarType" | ||
[sidebarItem]="sidebarItem" | ||
></div> | ||
</div> | ||
} | ||
} | ||
</div> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
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