From c0dff27f78fbafb094173206d283aa6bb4ae97e7 Mon Sep 17 00:00:00 2001 From: James Cox Date: Wed, 25 Mar 2026 18:50:36 -0500 Subject: [PATCH] style(frontend): enforce selector-class-pattern in scss - Stylelint: - re-enable selector-class-pattern in the frontend Stylelint config - keep the selector rename isolated because this rule is the only remaining bucket that crosses stylesheet and template changes - Series page: - rename the metadata card modifier classes to kebab-case in both the stylesheet and template - Bookdrop and stats: - rename the fixed field label and series-name helper classes to kebab-case in the picker stylesheet and template - correct the responsive dialog footer selector to PrimeNG's kebab-case class name - Validation: - run just ui stylelint --- .../series-page/series-page.component.html | 16 +++++++-------- .../series-page/series-page.component.scss | 16 +++++++-------- ...okdrop-file-metadata-picker.component.html | 20 +++++++++---------- ...okdrop-file-metadata-picker.component.scss | 4 ++-- .../user-stats/user-stats.component.scss | 2 +- frontend/stylelint.config.js | 1 - 6 files changed, 29 insertions(+), 30 deletions(-) diff --git a/frontend/src/app/features/book/components/series-page/series-page.component.html b/frontend/src/app/features/book/components/series-page/series-page.component.html index bf97e21ed..354838095 100644 --- a/frontend/src/app/features/book/components/series-page/series-page.component.html +++ b/frontend/src/app/features/book/components/series-page/series-page.component.html @@ -70,7 +70,7 @@
@if (allPublishers(); as publishers) { @if (publishers.length) { - + @for (pub of publishers; track pub; let isLast = $last) { {{ pub }}{{ isLast ? '' : ', ' }} @@ -78,25 +78,25 @@ } } - + {{ books.length }} {{ books.length === 1 ? t('book') : t('books') }} @if (yearsRange(); as years) { - + {{ years }} } @if (seriesStats(); as stats) { @if (stats.totalPages > 0) { - + {{ stats.totalPages | number }} {{ t('stats.totalPages') }} } @if (stats.formatCounts.size > 0) { - + @for (entry of stats.formatCounts | keyvalue; track entry.key) { {{ entry.key }}{{ $last ? '' : ', ' }} @@ -104,7 +104,7 @@ } @if (stats.totalAudioDurationSeconds > 0) { - + {{ formatDuration(stats.totalAudioDurationSeconds) }} @@ -112,14 +112,14 @@ } @if (allLanguages(); as languages) { @if (languages.length) { - + {{ languages.join(', ') }} } } @if (seriesCompletion(); as completion) { - + {{ completion.owned }}/{{ completion.total }} {{ t('stats.owned') }} diff --git a/frontend/src/app/features/book/components/series-page/series-page.component.scss b/frontend/src/app/features/book/components/series-page/series-page.component.scss index f8374306a..07c7b41f2 100644 --- a/frontend/src/app/features/book/components/series-page/series-page.component.scss +++ b/frontend/src/app/features/book/components/series-page/series-page.component.scss @@ -127,7 +127,7 @@ } } -.meta-card--publisher { +.meta-card-publisher { background: color-mix(in srgb, #3b82f6, transparent 85%); border-color: color-mix(in srgb, #3b82f6, transparent 60%); color: #93c5fd; @@ -140,7 +140,7 @@ i { color: #60a5fa; } } -.meta-card--books { +.meta-card-books { background: color-mix(in srgb, #8b5cf6, transparent 85%); border-color: color-mix(in srgb, #8b5cf6, transparent 60%); color: #c4b5fd; @@ -148,7 +148,7 @@ i { color: #a78bfa; } } -.meta-card--years { +.meta-card-years { background: color-mix(in srgb, #f59e0b, transparent 85%); border-color: color-mix(in srgb, #f59e0b, transparent 60%); color: #fcd34d; @@ -156,7 +156,7 @@ i { color: #fbbf24; } } -.meta-card--pages { +.meta-card-pages { background: color-mix(in srgb, #10b981, transparent 85%); border-color: color-mix(in srgb, #10b981, transparent 60%); color: #6ee7b7; @@ -164,7 +164,7 @@ i { color: #34d399; } } -.meta-card--format { +.meta-card-format { background: color-mix(in srgb, #f43f5e, transparent 85%); border-color: color-mix(in srgb, #f43f5e, transparent 60%); color: #fda4af; @@ -172,7 +172,7 @@ i { color: #fb7185; } } -.meta-card--audio { +.meta-card-audio { background: color-mix(in srgb, #06b6d4, transparent 85%); border-color: color-mix(in srgb, #06b6d4, transparent 60%); color: #67e8f9; @@ -180,7 +180,7 @@ i { color: #22d3ee; } } -.meta-card--language { +.meta-card-language { background: color-mix(in srgb, #ec4899, transparent 85%); border-color: color-mix(in srgb, #ec4899, transparent 60%); color: #f9a8d4; @@ -188,7 +188,7 @@ i { color: #f472b6; } } -.meta-card--owned { +.meta-card-owned { background: color-mix(in srgb, #14b8a6, transparent 85%); border-color: color-mix(in srgb, #14b8a6, transparent 60%); color: #5eead4; diff --git a/frontend/src/app/features/bookdrop/component/bookdrop-file-metadata-picker/bookdrop-file-metadata-picker.component.html b/frontend/src/app/features/bookdrop/component/bookdrop-file-metadata-picker/bookdrop-file-metadata-picker.component.html index 4afbbd480..867ff6f61 100644 --- a/frontend/src/app/features/bookdrop/component/bookdrop-file-metadata-picker/bookdrop-file-metadata-picker.component.html +++ b/frontend/src/app/features/bookdrop/component/bookdrop-file-metadata-picker/bookdrop-file-metadata-picker.component.html @@ -369,8 +369,8 @@
@for (field of metadataFieldsTop; track field) { -
- +
+
- +
+
- +
+
@if (field.controlName === 'authors') {
- +
+