-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General: Fix scroll to section when clicking status bar in exercise u…
…pdate view (#9243)
- Loading branch information
1 parent
0e75579
commit fc447f6
Showing
19 changed files
with
166 additions
and
68 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
35 changes: 17 additions & 18 deletions
35
src/main/webapp/app/forms/form-status-bar/form-status-bar.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,20 +1,19 @@ | ||
<div class="form-status-bar-container pt-2 pb-1"> | ||
<hr class="form-status-line" /> | ||
<div class="d-flex justify-content-between"> | ||
@for (formStatusSection of formStatusSections; track formStatusSection.title) { | ||
<div class="d-flex flex-column align-items-center"> | ||
<div | ||
class="d-flex align-items-center justify-content-center border rounded-circle border-secondary form-status-circle" | ||
(click)="scrollToHeadline(formStatusSection.title)" | ||
> | ||
<jhi-checklist-check | ||
[checkAttribute]="formStatusSection.valid" | ||
[iconColor]="formStatusSection.empty && formStatusSection.valid ? 'var(--bs-gray)' : undefined" | ||
class="fa-sm" | ||
/> | ||
@if (formStatusSections) { | ||
<div #statusBar class="form-status-bar-container pt-2 pb-1"> | ||
<hr class="form-status-line" /> | ||
<div class="d-flex justify-content-between"> | ||
@for (formStatusSection of formStatusSections; track formStatusSection.title; let index = $index) { | ||
<div class="d-flex flex-column align-items-center" id="status-bar-section-item-{{ index }}"> | ||
<div class="form-status-circle border rounded-circle" (click)="scrollToHeadline(formStatusSection.title)"> | ||
<jhi-checklist-check | ||
[checkAttribute]="formStatusSection.valid" | ||
[iconColor]="formStatusSection.empty && formStatusSection.valid ? 'var(--bs-gray)' : undefined" | ||
class="fa-sm position-absolute top-50 start-50 translate-middle" | ||
/> | ||
</div> | ||
<a (click)="scrollToHeadline(formStatusSection.title)" class="d-none d-sm-inline link-primary">{{ formStatusSection.title | artemisTranslate }}</a> | ||
</div> | ||
<a (click)="scrollToHeadline(formStatusSection.title)" class="d-none d-sm-inline link-primary">{{ formStatusSection.title | artemisTranslate }}</a> | ||
</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
7 changes: 0 additions & 7 deletions
7
src/main/webapp/app/shared/components/checklist-check.component.html
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/main/webapp/app/shared/components/checklist-check.component.scss
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
src/main/webapp/app/shared/components/checklist-check/checklist-check.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@if (checkAttribute) { | ||
<fa-icon [icon]="faCheckCircle" [size]="size" [style]="{ color: iconColor ?? 'var(--green)' }" /> | ||
} @else { | ||
<fa-icon [icon]="faTimes" [size]="size" class="fs-5" [style]="{ color: iconColor ?? 'var(--markdown-preview-red)' }" /> | ||
} | ||
|
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/shared/components/shared-component.module.ts
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Update the header height SCSS variable based on the navbar height. | ||
* | ||
* The navbar height can change based on the screen size and the content of the navbar | ||
* (e.g. long breadcrumbs due to longs exercise names) | ||
*/ | ||
export function updateHeaderHeight() { | ||
setTimeout(() => { | ||
const navbar = document.querySelector('jhi-navbar'); | ||
if (navbar) { | ||
// do not use navbar.offsetHeight, this might not be defined in Safari! | ||
const headerHeight = navbar.getBoundingClientRect().height; | ||
document.documentElement.style.setProperty('--header-height', `${headerHeight}px`); | ||
} | ||
}); | ||
} |
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
...nt/tutorial-groups/tutorial-groups-management/tutorial-groups-checklist.component.spec.ts
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