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