Skip to content

Commit

Permalink
Revert "Fix oppia#12238: Making the question and header sticky in the…
Browse files Browse the repository at this point in the history
… question editor modal" (oppia#20341)

Revert "Fix oppia#12238: Making the question and header sticky in the question edi…"

This reverts commit 985e84d.
  • Loading branch information
chris7716 authored May 23, 2024
1 parent a22bdad commit 6345bf8
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
(onSaveInapplicableSkillMisconceptionIds)="saveInapplicableSkillMisconceptionIds($event)"
[interactionIsShown]="interactionIsShown"
[stateContentPlaceholder]="getStateContentPlaceholder()"
[stateContentSaveButtonPlaceholder]="getStateContentSaveButtonPlaceholder()"
[stateContentShouldStayVisibleOnScroll]="stateContentShouldStayVisibleOnScroll">
[stateContentSaveButtonPlaceholder]="getStateContentSaveButtonPlaceholder()">
</oppia-state-editor>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export class QuestionEditorComponent implements OnInit, OnDestroy {
@Input() question!: Question;
@Input() questionId!: string;
@Input() questionStateData!: State;
@Input() stateContentShouldStayVisibleOnScroll!: boolean;
interactionIsShown!: boolean;
oppiaBlackImgUrl!: string;
stateEditorIsInitialized!: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ <h4> <strong> Linked Skills </strong> </h4>
[misconceptionsBySkill]="misconceptionsBySkill"
[questionStateData]="questionStateData"
[question]="question"
[userCanEditQuestion]="canEditQuestion"
[stateContentShouldStayVisibleOnScroll]="false">
[userCanEditQuestion]="canEditQuestion">
</oppia-question-editor>
<div class="alert alert-danger" *ngIf="question.getStateData().interaction.id && questionValidationService.getValidationErrorMessage(question)">
{{questionValidationService.getValidationErrorMessage(question)}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3 class="e2e-test-joyride-title" tabindex="0">Responses</h3>
</p>
</ng-template>

<mat-card class="oppia-editor-card-with-avatar" [ngClass]="{'oppia-editor-card-with-avatar-sticky': stateContentShouldStayVisibleOnScroll}">
<mat-card class="oppia-editor-card-with-avatar">
<div class="state-content-header-container" (click)="toggleConceptCard()">
<div class="state-content-header oppia-mobile-collapsible-card-header">
<h3 class="oppia-exp-content-card-header">Content</h3>
Expand Down Expand Up @@ -92,12 +92,6 @@ <h3 class="oppia-exp-content-card-header">Content</h3>
</div>

<style>
.oppia-editor-card-with-avatar-sticky {
position: sticky;
top: 82px;
z-index: 1;
}

.state-content-header-container {
display: none;
padding: 0 30px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export class StateEditorComponent implements OnInit, OnDestroy {
@Input() interactionIsShown!: boolean;
@Input() stateContentSaveButtonPlaceholder!: string;
@Input() stateContentPlaceholder!: string;
@Input() stateContentShouldStayVisibleOnScroll!: boolean;

oppiaBlackImgUrl!: string;
// State name is null if their is no state selected or have no active state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ <h3>Your Practice Question</h3>
[misconceptionsBySkill]="misconceptionsBySkill"
[questionStateData]="questionStateData"
[question]="question"
[userCanEditQuestion]="canEditQuestion"
[stateContentShouldStayVisibleOnScroll]="false">
[userCanEditQuestion]="canEditQuestion">
</oppia-question-editor>
</div>
<div class="alert alert-danger" *ngIf="question.getStateData().interaction.id && getQuestionValidationErrorMessage()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,32 @@ <h3 class="oppia-mobile-question-header" title="{{questionHeader}}">
</div>

<div class="modal-body">
<section class="oppia-suggestion-review-container">
<div class="oppia-question-details" tabindex="0">
<div class="oppia-question-suggestion">
<strong class="oppia-difficulty-title">
Selected Difficulty: {{skillDifficultyLabel}}
</strong>
<div *ngIf="skillRubricExplanations.length > 0">
<strong class="oppia-skill-rubrics"
title="Use these notes to make sure your question is at the right difficulty.">
Notes from Skill Rubric
</strong>
<ul>
<li *ngFor="let explanation of skillRubricExplanations">
<span class="oppia-skill-explanation" [innerHtml]="explanation"></span>
</li>
</ul>
</div>
</div>
<div class="oppia-question-details" tabindex="0">
<strong class="oppia-difficulty-title">
Selected Difficulty: {{skillDifficultyLabel}}
</strong>
<div *ngIf="skillRubricExplanations.length > 0">
<strong class="oppia-skill-rubrics"
title="Use these notes to make sure your question is at the right difficulty.">
Notes from Skill Rubric
</strong>
<ul>
<li *ngFor="let explanation of skillRubricExplanations">
<span class="oppia-skill-explanation" [innerHtml]="explanation"></span>
</li>
</ul>
</div>
<div *ngIf="showQuestion">
<oppia-question-editor [questionId]="questionId"
[misconceptionsBySkill]="misconceptionsBySkill"
[questionStateData]="questionStateData"
[question]="question"
[userCanEditQuestion]="canEditQuestion"
[stateContentShouldStayVisibleOnScroll]="true"
(questionChange)="questionChanged()"
tabindex="0">
</oppia-question-editor>
</div>
</section>
</div>
<div *ngIf="showQuestion">
<oppia-question-editor [questionId]="questionId"
[misconceptionsBySkill]="misconceptionsBySkill"
[questionStateData]="questionStateData"
[question]="question"
[userCanEditQuestion]="canEditQuestion"
(questionChange)="questionChanged()"
tabindex="0">
</oppia-question-editor>
</div>
<section [hidden]="!reviewable"
class="oppia-reviewer-actions">
<div class="oppia-suggestion-review-message">
Expand Down Expand Up @@ -115,17 +110,6 @@ <h3 class="oppia-mobile-question-header" title="{{questionHeader}}">
</div>

<style>
.modal-header {
background-color: #fff;
position: sticky;
top: 0;
z-index: 1000;
}
.oppia-suggestion-review-container {
height: 1300px;
padding-bottom: 0;
padding-top: 0;
}
.oppia-close-button-position {
font-size: 2.5rem;
position: absolute;
Expand Down Expand Up @@ -197,7 +181,7 @@ <h3 class="oppia-mobile-question-header" title="{{questionHeader}}">
}
.oppia-question-suggestion {
height: 100%;
overflow: auto;
overflow: scroll;
}
.oppia-reviewer-actions {
border-top: 1px solid #e5e5e5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ <h4>Now for the fun part...</h4>
[addState]="addState.bind(this)"
[interactionIsShown]="interactionIsShown"
[explorationIsLinkedToStory]="explorationIsLinkedToStory"
[stateContentShouldStayVisibleOnScroll]="false"
(onSaveStateContent)="saveStateContent($event)"
(onSaveNextContentIdIndex)="saveNextContentIdIndex()"
(onSaveInteractionData)="saveInteractionData($event)"
Expand Down

0 comments on commit 6345bf8

Please sign in to comment.