Show the rating above the comment text
The rating has the same height for every comment, so above the text it stays in place while the comments rotate; only the text changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5ea4e70c8
commit
0660affb56
3 files changed
+8
-8
No files matched your search
@@ -225,7 +225,7 @@ tests/ PHPUnit; PlenarioTestTrait erzeugt Testdaten, Fixtures
|
|||||||
`Comments.delay()` = 2,5 s + 15 Zeichen/s, 5–30 s, geteilt durch das Tempo der Umfrage `polls.comment_speed` (Prozent aus
|
`Comments.delay()` = 2,5 s + 15 Zeichen/s, 5–30 s, geteilt durch das Tempo der Umfrage `polls.comment_speed` (Prozent aus
|
||||||
`Poll::COMMENT_SPEEDS`, im State `poll.commentSpeed` als Faktor, Dashboard → „Einstellungen“); Vor/Zurück/Fortsetzen geben dem Kommentar wieder die volle Zeit; „Kommentar X von N“,
|
`Poll::COMMENT_SPEEDS`, im State `poll.commentSpeed` als Faktor, Dashboard → „Einstellungen“); Vor/Zurück/Fortsetzen geben dem Kommentar wieder die volle Zeit; „Kommentar X von N“,
|
||||||
vor/zurück/Pause, Laufbalken bis zum Wechsel (`Comments.progress()`, setzt nach dem Neu-Rendern per negativem
|
vor/zurück/Pause, Laufbalken bis zum Wechsel (`Comments.progress()`, setzt nach dem Neu-Rendern per negativem
|
||||||
`animation-delay` fort, bei Pause unsichtbar), Zustand übersteht das Neu-Rendern beim Polling; die Box ist so hoch wie der längste Kommentar – alle liegen unsichtbar in derselben Grid-Zelle –, damit die zentrierte Bühne beim Wechsel nicht springt; höchstens `--comment-max` ≈ 5 Zeilen, längere Kommentare setzt `Comments.fit()` kleiner statt sie abzuschneiden). Bei internem Feedback erscheinen sie erst,
|
`animation-delay` fort, bei Pause unsichtbar), Zustand übersteht das Neu-Rendern beim Polling; die Box ist so hoch wie der längste Kommentar – alle liegen unsichtbar in derselben Grid-Zelle –, damit die zentrierte Bühne beim Wechsel nicht springt; höchstens `--comment-max` ≈ 5 Zeilen, längere Kommentare setzt `Comments.fit()` kleiner statt sie abzuschneiden; die Bewertung steht über dem Text, damit sie an fester Stelle bleibt). Bei internem Feedback erscheinen sie erst,
|
||||||
wenn der Presenter die Ergebnisse einblendet.
|
wenn der Presenter die Ergebnisse einblendet.
|
||||||
- **Sterne-Bewertung** (Skala mit Setting `style = stars`, `Slide::isStarRating()`, Standard `numbers`): immer 1 bis `scale_max`
|
- **Sterne-Bewertung** (Skala mit Setting `style = stars`, `Slide::isStarRating()`, Standard `numbers`): immer 1 bis `scale_max`
|
||||||
Sterne (`SlidesTable::sanitizeSettings()` erzwingt `scale_min = 1`), gespeichert wie jede Skala als `numeric_value`.
|
Sterne (`SlidesTable::sanitizeSettings()` erzwingt `scale_min = 1`), gespeichert wie jede Skala als `numeric_value`.
|
||||||
|
|||||||
@@ -585,13 +585,13 @@ button.qa-steps__step:hover:not(:disabled) { color: var(--text); border-color: v
|
|||||||
.comments__text { margin: 0; font-size: var(--comment-size); font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
|
.comments__text { margin: 0; font-size: var(--comment-size); font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
|
||||||
.comments__text::before { content: '„'; }
|
.comments__text::before { content: '„'; }
|
||||||
.comments__text::after { content: '“'; }
|
.comments__text::after { content: '“'; }
|
||||||
.comments__value { margin: 6px 0 0; color: var(--muted); font-size: .9em; }
|
.comments__value { margin: 0 0 6px; color: var(--muted); font-size: .9em; }
|
||||||
/* all comments share one grid cell (invisible sizers): the box keeps the height of the longest one */
|
/* all comments share one grid cell (invisible sizers): the box keeps the height of the longest one */
|
||||||
.comments__body { display: grid; }
|
.comments__body { display: grid; }
|
||||||
.comments__body > * { grid-area: 1 / 1; min-width: 0; }
|
.comments__body > * { grid-area: 1 / 1; min-width: 0; }
|
||||||
.comments__sizer { visibility: hidden; }
|
.comments__sizer { visibility: hidden; }
|
||||||
/* at most about 5 lines; longer comments are set smaller by Comments.fit() instead of being cut off */
|
/* at most about 5 lines; longer comments are set smaller by Comments.fit() instead of being cut off */
|
||||||
.comments { --comment-size: 1.25em; --comment-max: 11em; }
|
.comments { --comment-size: 1.25em; --comment-max: 9.5em; }
|
||||||
.comments__sizer, .comments__current { max-height: var(--comment-max); overflow: hidden; }
|
.comments__sizer, .comments__current { max-height: var(--comment-max); overflow: hidden; }
|
||||||
.comments__progress { height: 4px; margin-top: 14px; border-radius: 2px; background: var(--border); overflow: hidden; }
|
.comments__progress { height: 4px; margin-top: 14px; border-radius: 2px; background: var(--border); overflow: hidden; }
|
||||||
.comments__progress[hidden] { display: block; visibility: hidden; } /* keeps the layout steady while paused */
|
.comments__progress[hidden] { display: block; visibility: hidden; } /* keeps the layout steady while paused */
|
||||||
|
|||||||
@@ -345,18 +345,18 @@
|
|||||||
// Every comment sits invisibly in the same grid cell as the one shown, so the box is as
|
// Every comment sits invisibly in the same grid cell as the one shown, so the box is as
|
||||||
// tall as the longest comment and the centred stage does not jump while they rotate.
|
// tall as the longest comment and the centred stage does not jump while they rotate.
|
||||||
var sizers = items.length < 2 ? [] : items.map(function (item) {
|
var sizers = items.length < 2 ? [] : items.map(function (item) {
|
||||||
var hasValue = item.value !== null && item.value !== undefined;
|
|
||||||
return el('div', { class: 'comments__sizer', 'aria-hidden': 'true' }, [
|
return el('div', { class: 'comments__sizer', 'aria-hidden': 'true' }, [
|
||||||
el('blockquote', { class: 'comments__text', text: item.text }),
|
el('blockquote', { class: 'comments__text', text: item.text })
|
||||||
hasValue ? el('p', { class: 'comments__value', text: 'Bewertung: ' + Comments.format(item.value) }) : null
|
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
// The rating (same height for every comment, all or none per slide) sits above the
|
||||||
|
// text, so it stays in place while the comments rotate.
|
||||||
var node = el('section', { class: 'comments', 'data-comments': '', 'aria-label': 'Kommentare' }, [
|
var node = el('section', { class: 'comments', 'data-comments': '', 'aria-label': 'Kommentare' }, [
|
||||||
el('p', { class: 'comments__counter', 'data-comment-counter': '' }),
|
el('p', { class: 'comments__counter', 'data-comment-counter': '' }),
|
||||||
|
el('p', { class: 'comments__value', 'data-comment-value': '' }),
|
||||||
el('div', { class: 'comments__body' }, sizers.concat([
|
el('div', { class: 'comments__body' }, sizers.concat([
|
||||||
el('div', { class: 'comments__current' }, [
|
el('div', { class: 'comments__current' }, [
|
||||||
el('blockquote', { class: 'comments__text', 'data-comment-text': '' }),
|
el('blockquote', { class: 'comments__text', 'data-comment-text': '' })
|
||||||
el('p', { class: 'comments__value', 'data-comment-value': '' })
|
|
||||||
])
|
])
|
||||||
])),
|
])),
|
||||||
// Time left until the next comment; decorative, the counter carries the information.
|
// Time left until the next comment; decorative, the counter carries the information.
|
||||||
|
|||||||
Reference in new issue
Block a user