mirror of
https://github.com/discourse/discourse.git
synced 2025-02-24 07:58:40 +08:00
FEATURE: show flag description along with additional reason (#31210)
Currently, the description is hidden when an additional reason field appears on the flag modal. It can contain important guidance and therefore should never be hidden. <img width="671" alt="Screenshot 2025-02-06 at 9 59 42 am" src="https://github.com/user-attachments/assets/97629059-f346-4696-b720-9a9da3faf8f8" />
This commit is contained in:
parent
f413e1b0de
commit
c5bead4369
@ -48,9 +48,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="flag-action-type-details">
|
<div class="flag-action-type-details">
|
||||||
<strong>{{this.formattedName}}</strong>
|
<strong>{{this.formattedName}}</strong>
|
||||||
{{#if this.showDescription}}
|
<div class="description">{{html-safe this.description}}</div>
|
||||||
<div class="description">{{html-safe this.description}}</div>
|
|
||||||
{{/if}}
|
|
||||||
{{#if this.showMessageInput}}
|
{{#if this.showMessageInput}}
|
||||||
<Textarea
|
<Textarea
|
||||||
name="message"
|
name="message"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { and, equal, not } from "@ember/object/computed";
|
import { and, equal } from "@ember/object/computed";
|
||||||
import { tagName } from "@ember-decorators/component";
|
import { tagName } from "@ember-decorators/component";
|
||||||
import discourseComputed from "discourse/lib/decorators";
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
import { MAX_MESSAGE_LENGTH } from "discourse/models/post-action-type";
|
import { MAX_MESSAGE_LENGTH } from "discourse/models/post-action-type";
|
||||||
@ -9,7 +9,6 @@ import { i18n } from "discourse-i18n";
|
|||||||
export default class FlagActionType extends Component {
|
export default class FlagActionType extends Component {
|
||||||
@and("flag.require_message", "selected") showMessageInput;
|
@and("flag.require_message", "selected") showMessageInput;
|
||||||
@and("flag.isIllegal", "selected") showConfirmation;
|
@and("flag.isIllegal", "selected") showConfirmation;
|
||||||
@not("showMessageInput") showDescription;
|
|
||||||
@equal("flag.name_key", "notify_user") isNotifyUser;
|
@equal("flag.name_key", "notify_user") isNotifyUser;
|
||||||
|
|
||||||
@discourseComputed("flag.name_key")
|
@discourseComputed("flag.name_key")
|
||||||
|
@ -44,6 +44,7 @@ describe "Flagging post", type: :system do
|
|||||||
topic_page.click_post_action_button(post_to_flag, :flag)
|
topic_page.click_post_action_button(post_to_flag, :flag)
|
||||||
flag_modal.choose_type(:illegal)
|
flag_modal.choose_type(:illegal)
|
||||||
|
|
||||||
|
expect(flag_modal).to have_css(".illegal .description")
|
||||||
expect(flag_modal).to have_css(".flag-confirmation")
|
expect(flag_modal).to have_css(".flag-confirmation")
|
||||||
|
|
||||||
flag_modal.fill_message("This looks totally illegal to me.")
|
flag_modal.fill_message("This looks totally illegal to me.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user