Skip to content
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 @@ -9,38 +9,6 @@
<mat-icon>fullscreen</mat-icon>
</button>
</ng-template>
<ng-template #scoreSummary>
@if (showScoreSummary) {
<div>
<teacher-summary-display
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
[studentDataType]="'scores'"
[source]="source"
[chartType]="'column'"
[doRender]="true"
class="summary"
/>
</div>
}
</ng-template>
<ng-template #ideasSummary>
<ng-container
[ngTemplateOutlet]="expandSummaryTpl"
[ngTemplateOutletContext]="{ type: 'ideas' }"
/>
<ideas-summary
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
[studentDataType]="'responses'"
[source]="source"
[doRender]="true"
[componentType]="component.type"
class="summary"
/>
</ng-template>
<div class="component-summary notice flex flex-col @container">
<div class="flex justify-between gap-4">
<div>
Expand All @@ -62,68 +30,43 @@
<peer-group-button [node]="node" [component]="component" />
</div>
@if (showSummary) {
<div class="flex flex-col @2xl:grid @2xl:grid-cols-2 @5xl:grid-cols-3 mt-3 gap-3">
@if (component.type === 'Discussion') {
@if (aiEnabled) {
<div class="col-span-full">
<discussion-ai-summary
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
class="summary"
/>
</div>
}
<ng-container [ngTemplateOutlet]="scoreSummary" />
<div class="summary-content" [class.!col-span-full]="!showScoreSummary">
<div #summariesGrid class="summaries mt-3 gap-3">
@if (hasIdeaRubricData) {
<div class="summary-lg order-1">
<ng-container
[ngTemplateOutlet]="expandSummaryTpl"
[ngTemplateOutletContext]="{ type: 'discussion' }"
[ngTemplateOutletContext]="{ type: 'ideas' }"
/>
<discussion-summary
<ideas-summary
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
[studentDataType]="'responses'"
[source]="source"
[doRender]="true"
[componentType]="component.type"
class="summary"
/>
</div>
} @else if (component.type === 'OpenResponse') {
@if (aiEnabled) {
<div
class="flex"
[class.summary-content]="showScoreSummary && !hasIdeaRubricData"
[class.order-2]="showScoreSummary && !hasIdeaRubricData"
[class.!col-span-full]="!showScoreSummary || hasIdeaRubricData"
>
<open-response-ai-summary
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
class="summary"
/>
</div>
}
<ng-container [ngTemplateOutlet]="scoreSummary" />
@if (hasIdeaRubricData) {
<div class="summary-content" [class.!col-span-full]="!showScoreSummary">
<ng-container [ngTemplateOutlet]="ideasSummary" />
</div>
}
@if (hasReflectionQuestions && isSinglePeriod) {
<teacher-reflection
}
@if (component.type === 'Discussion') {
<div class="summary-lg order-1">
<ng-container
[ngTemplateOutlet]="expandSummaryTpl"
[ngTemplateOutletContext]="{ type: 'discussion' }"
/>
<discussion-summary
[nodeId]="node.id"
[componentId]="component.id"
[componentType]="component.type"
[periodId]="periodId"
[questions]="component.teacher?.reflectionQuestions || []"
[source]="source"
[doRender]="true"
class="summary"
/>
}
} @else if (component.type === 'Match') {
<ng-container [ngTemplateOutlet]="scoreSummary" />
<div class="summary-content" [class.!col-span-full]="!showScoreSummary">
</div>
}
@if (component.type === 'Match') {
<div class="summary-lg order-1">
<ng-container
[ngTemplateOutlet]="expandSummaryTpl"
[ngTemplateOutletContext]="{ type: 'match' }"
Expand All @@ -137,9 +80,9 @@
class="summary"
/>
</div>
} @else if (component.type === 'MultipleChoice') {
<ng-container [ngTemplateOutlet]="scoreSummary" />
<div>
}
@if (component.type === 'MultipleChoice') {
<div class="summary-sm order-2">
<teacher-summary-display
[nodeId]="node.id"
[componentId]="component.id"
Expand All @@ -152,14 +95,44 @@
class="summary"
/>
</div>
} @else {
<ng-container [ngTemplateOutlet]="scoreSummary" />
@if (hasIdeaRubricData) {
<div class="summary-content" [class.!col-span-full]="!showScoreSummary">
<ng-container [ngTemplateOutlet]="ideasSummary" />
}
@if (showScoreSummary) {
<div class="summary-sm order-3">
<teacher-summary-display
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
[studentDataType]="'scores'"
[source]="source"
[chartType]="'column'"
[doRender]="true"
class="summary"
/>
</div>
}
@if (aiEnabled) {
@if (component.type === 'Discussion') {
<div class="summary-sm order-4">
<discussion-ai-summary
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
class="summary"
/>
</div>
} @else if (component.type === 'OpenResponse') {
<div class="summary-sm order-4">
<open-response-ai-summary
[nodeId]="node.id"
[componentId]="component.id"
[periodId]="periodId"
class="summary"
/>
</div>
}
@if (hasReflectionQuestions && isSinglePeriod) {
}
@if (hasReflectionQuestions && isSinglePeriod) {
<div class="summary-lg order-5">
<teacher-reflection
[nodeId]="node.id"
[componentId]="component.id"
Expand All @@ -168,7 +141,7 @@
[questions]="component.teacher?.reflectionQuestions || []"
class="summary"
/>
}
</div>
}
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,124 @@
}

.mat-body-1 {
margin-bottom: 0;
@apply mb-0;
}

.mat-mdc-card-content:last-child {
padding-bottom: 12px;
@apply pb-3;
}

.mat-mdc-card-content:first-child {
padding-top: 12px;
@apply pt-3;
}

.mat-mdc-card-content {
padding: 0 12px;
@apply py-0 px-3;
}

milestone-report-button > *,
peer-group-button > * {
margin-top: 12px;
margin-inline-end: 8px;
@apply mt-3 me-2;
}

.summary {
@apply rounded-md p-3 overflow-hidden bg-white flex flex-col grow;
}

.summary-content {
@apply @5xl:col-span-2 relative;
.summaries {
@apply w-full grid grid-cols-1 @2xl:grid-cols-2 @5xl:grid-cols-3;
grid-auto-rows: 1px;
grid-auto-flow: dense;
align-items: start;
}

@supports (grid-template-rows: masonry) {
.summaries {
grid-template-rows: masonry;
}
}

@supports (display: grid-lanes) {
.summaries {
display: grid-lanes;
}
}

.summary-sm {
@apply col-span-1 relative;

> .summary {
@apply @2xl:min-h-70;
}
}

.summary-lg {
@apply col-span-1 @2xl:col-span-2 relative;

> .summary {
@apply @5xl:min-h-70;
}

&:only-child {
@apply col-span-full;

> .summary {
@apply min-h-0;
}
}
}

.summaries:not(:has(.summary-sm ~ .summary-sm)) .summary-sm {
@apply @2xl:col-span-2 @5xl:col-span-1;

> .summary {
@apply @2xl:min-h-0 @5xl:min-h-70;
}
}

.summaries:has(.summary-lg ~ .summary-lg):not(:has(.summary-sm ~ .summary-sm)) .order-1 {
@apply col-span-full;

> .summary {
@apply min-h-0;
}
}

.summaries:not(:has(.summary-sm)) .summary-lg {
@apply col-span-full;

> .summary {
@apply min-h-0;
}
}

.summaries:not(:has(.summary-lg)) {
@apply @5xl:grid-cols-2;
}

.summaries:not(:has(.summary-lg ~ .summary-lg)):has(.summary-sm ~ .summary-sm) {
@apply @5xl:grid-cols-2 auto-rows-auto @2xl:items-stretch;

> .summary-sm {
@apply @2xl:flex !row-auto;
}

> .summary-lg {
@apply col-span-full !row-auto;

> .summary {
@apply min-h-0;
}
}
}

.summaries:has(.summary-lg ~ .summary-lg):has(.summary-sm ~ .summary-sm) .summary {
@apply @5xl:min-h-0;
}

@supports not selector(:has(*)) {
.summary-lg:only-child {
@apply col-span-full;
}
}

Loading
Loading