DEV: Add new plugin outlets to edit topic area (#29951)

This PR adds new wrapper plugin outlets in the edit topic area. Adding these wrapper plugin outlets gives us easy access to `__before` and `__after`.
This commit is contained in:
Keegan George 2024-11-28 01:12:16 +09:00 committed by GitHub
parent 5db0eba0a8
commit 469374e063
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 38 additions and 22 deletions

View File

@ -52,33 +52,49 @@
<div class="edit-topic-title">
<PrivateMessageGlyph @shouldShow={{this.model.isPrivateMessage}} />
<TextField
@id="edit-title"
@value={{this.buffered.title}}
@maxlength={{this.siteSettings.max_topic_title_length}}
@autofocus="true"
/>
<PluginOutlet
@name="edit-topic-title"
@outletArgs={{hash model=this.model buffered=this.buffered}}
>
<TextField
@id="edit-title"
@value={{this.buffered.title}}
@maxlength={{this.siteSettings.max_topic_title_length}}
@autofocus="true"
/>
</PluginOutlet>
{{#if this.showCategoryChooser}}
<CategoryChooser
@value={{this.buffered.category_id}}
@onChange={{action "topicCategoryChanged"}}
class="small"
/>
<PluginOutlet
@name="edit-topic-category"
@outletArgs={{hash model=this.model buffered=this.buffered}}
>
<CategoryChooser
@value={{this.buffered.category_id}}
@onChange={{action "topicCategoryChanged"}}
class="small"
/>
</PluginOutlet>
{{/if}}
{{#if this.canEditTags}}
<MiniTagChooser
@value={{this.buffered.tags}}
@onChange={{action "topicTagsChanged"}}
@options={{hash
filterable=true
categoryId=this.buffered.category_id
minimum=this.minimumRequiredTags
filterPlaceholder="tagging.choose_for_topic"
useHeaderFilter=true
}}
/>
<PluginOutlet
@name="edit-topic-tags"
@outletArgs={{hash model=this.model buffered=this.buffered}}
>
<MiniTagChooser
@value={{this.buffered.tags}}
@onChange={{action "topicTagsChanged"}}
@options={{hash
filterable=true
categoryId=this.buffered.category_id
minimum=this.minimumRequiredTags
filterPlaceholder="tagging.choose_for_topic"
useHeaderFilter=true
}}
/>
</PluginOutlet>
{{/if}}
<span>