Skip to content
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

SF-2864 Fix icon run-off on smaller mobile devices #2993

Merged
merged 5 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,38 +64,34 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
<div id="scripture-panel">
<header>
<div class="panel-nav">
<app-book-chapter-chooser
[books]="books"
[book]="book"
[chapters]="chapters"
[chapter]="chapter"
[bookSelectDisabled]="activeQuestionScope === 'all'"
[chapterSelectDisabled]="activeQuestionScope !== 'chapter'"
[prevNextHidden]="activeQuestionScope !== 'chapter' || isScreenSmall"
(bookChange)="onBookSelect($event)"
(chapterChange)="onChapterSelect($event)"
>
</app-book-chapter-chooser>
<div class="book-chapter">
<app-book-chapter-chooser
[books]="books"
[book]="book"
[chapters]="chapters"
[chapter]="chapter"
[bookSelectDisabled]="activeQuestionScope === 'all'"
[chapterSelectDisabled]="activeQuestionScope !== 'chapter'"
[prevNextHidden]="activeQuestionScope !== 'chapter' || isScreenSmall"
(bookChange)="onBookSelect($event)"
(chapterChange)="onChapterSelect($event)"
>
</app-book-chapter-chooser>
</div>

<div class="action-icons">
@if (canCreateQuestions) {
@if (chapterHasAudio) {
<button
mat-icon-button
type="button"
[matTooltip]="t('add_question')"
(click)="questionDialog()"
class="add-question-button hide-gt-xl"
[matTooltip]="t('play_chapter')"
[matTooltipDisabled]="isAudioPlaying()"
(click)="toggleAudio()"
>
<mat-icon class="mirror-rtl">post_add</mat-icon>
</button>
<button mat-button type="button" (click)="questionDialog()" class="add-question-button hide-lt-xl">
<mat-icon class="mirror-rtl">post_add</mat-icon>
<span>{{ t("add_question") }}</span>
<mat-icon>{{ isAudioPlaying() ? "stop" : "play_circle_outline" }}</mat-icon>
</button>
}
@if (canCreateScriptureAudio) {
<button
type="button"
mat-icon-button
[matTooltip]="t('manage_audio')"
(click)="addAudioTimingData()"
Expand All @@ -104,17 +100,6 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
<mat-icon class="material-icons-outlined">audio_file</mat-icon>
</button>
}
@if (chapterHasAudio) {
<button
type="button"
mat-icon-button
[matTooltip]="t('play_chapter')"
[matTooltipDisabled]="isAudioPlaying()"
(click)="toggleAudio()"
>
<mat-icon>{{ isAudioPlaying() ? "stop" : "play_circle_outline" }}</mat-icon>
</button>
}
<app-font-size [class.hidden]="hideChapterText" (apply)="applyFontChange($event)"></app-font-size>
@if (canShare) {
<app-share-button [defaultRole]="defaultShareRole"></app-share-button>
Expand Down Expand Up @@ -198,17 +183,33 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
</as-split>
</div>
</div>
@if (projectDoc && totalVisibleQuestions() > 0) {
@if (projectDoc) {
<div id="question-nav" [ngClass]="{ hide: textboxIsShownMobile || userOpenedChapterAudio }">
@if (!isQuestionListPermanent) {
<button mat-button type="button" (click)="setQuestionsOverlayVisibility(true)">
{{ t("view_questions") }}
</button>
}
<div class="question-nav-start">
@if (canCreateQuestions) {
<button
mat-icon-button
[matTooltip]="t('add_question')"
(click)="questionDialog()"
class="add-question-button"
>
<mat-icon class="mirror-rtl">post_add</mat-icon>
</button>
<button mat-button (click)="questionDialog()" class="add-question-button">
<mat-icon class="mirror-rtl">post_add</mat-icon>
<span>{{ t("add_question") }}</span>
</button>
}
@if (!isQuestionListPermanent) {
<button mat-button class="view-questions" (click)="setQuestionsOverlayVisibility(true)">
<mat-icon>keyboard_arrow_up</mat-icon>
{{ t("view_questions") }}
</button>
}
</div>
<div class="question-nav-wrapper">
<button
mat-button
type="button"
(click)="activateQuestion(prevQuestion!)"
[disabled]="prevQuestion == null"
class="prev-question"
Expand All @@ -218,7 +219,6 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
</button>
<button
mat-button
type="button"
(click)="activateQuestion(nextQuestion!)"
[disabled]="nextQuestion == null"
class="next-question"
Expand All @@ -227,7 +227,6 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
</button>
<button
mat-icon-button
type="button"
(click)="activateQuestion(prevQuestion!)"
[disabled]="prevQuestion == null"
class="prev-question"
Expand All @@ -236,7 +235,6 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
</button>
<button
mat-icon-button
type="button"
(click)="activateQuestion(nextQuestion!)"
[disabled]="nextQuestion == null"
class="next-question"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,18 @@ header {
// Override 'sm' breakpoint for this element (also adjusts BreakPointObserver 'SM' for this element)
@include media-breakpoint('<=', sm, $questionsPanelBreakpoint) {
position: absolute;
top: 0;
left: -100%;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
height: 0;
margin: 0;
z-index: 7;
overflow: hidden;
background: #fff;
transition: transform 0.4s cubic-bezier(0.68, -0.6, 0.265, 1.6); // Snap back effect
transition: height 0.4s cubic-bezier(0.68, -0.6, 0.265, 1.6); // Snap back effect

&.overlay-visible {
transform: translateX(100%);
height: 100%;

.questions-overlay-close {
display: block;
Expand Down Expand Up @@ -217,9 +218,37 @@ header {
background-color: lighten(vars.$sf_grey, 70%);
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: space-between;
padding: 9px;

.mat-icon {
@include checkingVars.md-icon-size(24px);
}

.view-questions .mat-icon {
margin-inline-end: 4px;
}

.question-nav-start {
display: flex;
align-items: center;
column-gap: 4px;
}

.add-question-button.mat-mdc-icon-button {
display: none;
}

@include media-breakpoint('<=', sm) {
.add-question-button.mat-mdc-button {
display: none;
}

.add-question-button.mat-mdc-icon-button {
display: block;
}
}

.question-nav-wrapper {
display: flex;

Expand Down Expand Up @@ -247,7 +276,6 @@ header {
@include media-breakpoint('<=', sm, $questionsPanelBreakpoint) {
// Widen once the questions panel is hidden
margin-inline-start: -20px;
justify-content: space-between;
}

.next-question {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
#chapter-select,
#book-select {
@include material-styles.dense_mat_select();

::ng-deep .mat-mdc-text-field-wrapper {
padding-left: 12px;
padding-right: 12px;
}
}

::ng-deep .mat-mdc-select-panel {
Expand Down
Loading