mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-25 22:23:28 +00:00
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:
parent
fe6934e1b0
commit
75b4eef73a
@ -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}}
|
||||
|
@ -64,6 +64,15 @@ aside.quote.accepted-answer {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
&:not(.accepted-answer--has-excerpt) {
|
||||
> .title {
|
||||
padding: 0.8em;
|
||||
}
|
||||
> blockquote {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.accepted-answer--solver-accepter {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user