UX: Improve appearance and handling of accepted answers without excerpts

- Hide blockquote for accepted answers without excerpts to avoid unnecessary visual elements.
- Adjust title padding for better alignment when excerpts are absent.
- Ensure no content fallback (`""`) when excerpts are not provided.
- Add `accepted-answer--has-excerpt` class for proper styling differentiation.
This commit is contained in:
Sérgio Saquetim
2025-07-22 00:29:34 -03:00
parent fe6934e1b0
commit 75b4eef73a
2 changed files with 11 additions and 1 deletions
@@ -29,7 +29,7 @@ export default class SolvedAcceptedAnswer extends Component {
get collapsedContent() {
if (!this.hasExcerpt) {
return null;
return "";
}
return htmlSafe(this.acceptedAnswer.excerpt);
@@ -89,6 +89,7 @@ export default class SolvedAcceptedAnswer extends Component {
<PostQuotedContent
class={{concatClass
"accepted-answer"
(if this.hasExcerpt "accepted-answer--has-excerpt")
(unless this.collapsedContent "title-only")
}}
@collapsedContent={{this.collapsedContent}}