Skip to content

Commit

Permalink
courses: smoother steps preview title (fixes #7868) (#7879)
Browse files Browse the repository at this point in the history
Co-authored-by: mutugiii <[email protected]>
Co-authored-by: dogi <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent f3f0499 commit cf3f47c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "planet",
"license": "AGPL-3.0",
"version": "0.15.82",
"version": "0.15.83",
"myplanet": {
"latest": "v0.21.28",
"min": "v0.20.28"
Expand Down
2 changes: 1 addition & 1 deletion src/app/courses/view-courses/courses-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h3 class="margin-lr-3 ellipsis-title">{{courseDetail.courseTitle}}</h3>
<ng-container *ngFor="let step of courseDetail.steps; let stepNum = index; trackBy: trackBySteps">
<mat-expansion-panel hideToggle="true" (opened)="setStepButtonStatus(step, stepNum)">
<mat-expansion-panel-header>
<mat-panel-title i18n>
<mat-panel-title class="step-title" i18n>
{{step.stepTitle || 'Step ' + (stepNum + 1)}}
</mat-panel-title>
<mat-panel-description>
Expand Down
26 changes: 23 additions & 3 deletions src/app/courses/view-courses/courses-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,30 @@
grid-template-columns: 1fr;
grid-template-rows: 0 1fr;
}

}
}

.course-detail, .course-view {
overflow: visible;
}
mat-expansion-panel-header {
display: flex;
justify-content: space-between;
}

mat-panel-title {
display: block;
}

.step-title {
max-width: 150ch;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

@media (max-width: $screen-md) {
max-width: 90ch;
}

@media (max-width: $screen-sm) {
max-width: 45ch;
}
}

0 comments on commit cf3f47c

Please sign in to comment.