UX: clean up tag info styles, remove mobile stylesheet (#25973)

This commit is contained in:
Kris 2024-02-29 17:48:47 -05:00 committed by GitHub
parent 721fa86b24
commit 40eea40d69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 47 additions and 64 deletions

View File

@ -49,23 +49,25 @@
>{{d-icon "pencil-alt"}}</a> >{{d-icon "pencil-alt"}}</a>
{{/if}} {{/if}}
</div> </div>
<div class="tag-description-wrapper"> {{#if this.tagInfo.description}}
<span>{{html-safe this.tagInfo.description}}</span> <div class="tag-description-wrapper">
</div> <span>{{html-safe this.tagInfo.description}}</span>
</div>
{{/if}}
{{/if}} {{/if}}
</div> </div>
<div class="tag-associations"> <div class="tag-associations">
{{#if this.tagInfo.tag_group_names}} {{~#if this.tagInfo.tag_group_names}}
{{this.tagGroupsInfo}} {{this.tagGroupsInfo}}
{{/if}} {{/if~}}
{{#if this.tagInfo.categories}} {{~#if this.tagInfo.categories}}
{{this.categoriesInfo}} {{this.categoriesInfo}}
<br /> <br />
{{#each this.tagInfo.categories as |category|}} {{#each this.tagInfo.categories as |category|}}
{{category-link category}} {{category-link category}}
{{/each}} {{/each}}
{{/if}} {{/if~}}
{{#if this.nothingToShow}} {{~#if this.nothingToShow}}
{{#if this.tagInfo.category_restricted}} {{#if this.tagInfo.category_restricted}}
{{i18n "tagging.category_restricted"}} {{i18n "tagging.category_restricted"}}
{{else}} {{else}}
@ -74,7 +76,7 @@
{{html-safe (i18n "tagging.staff_info" basePath=(base-path))}} {{html-safe (i18n "tagging.staff_info" basePath=(base-path))}}
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/if}} {{/if~}}
</div> </div>
{{#if this.tagInfo.synonyms}} {{#if this.tagInfo.synonyms}}
<div class="synonyms-list"> <div class="synonyms-list">
@ -112,7 +114,7 @@
{{#if this.editSynonymsMode}} {{#if this.editSynonymsMode}}
<section class="add-synonyms field"> <section class="add-synonyms field">
<label for="add-synonyms">{{i18n "tagging.add_synonyms_label"}}</label> <label for="add-synonyms">{{i18n "tagging.add_synonyms_label"}}</label>
<div> <div class="add-synonyms__controls">
<TagChooser <TagChooser
@id="add-synonyms" @id="add-synonyms"
@tags={{this.newSynonyms}} @tags={{this.newSynonyms}}
@ -123,22 +125,24 @@
@unlimitedTagCount={{true}} @unlimitedTagCount={{true}}
@allowCreate={{true}} @allowCreate={{true}}
/> />
<DButton {{#if this.newSynonyms}}
@action={{action "addSynonyms"}} <DButton
@disabled={{this.addSynonymsDisabled}} @action={{action "addSynonyms"}}
@icon="check" @disabled={{this.addSynonymsDisabled}}
class="ok" @icon="check"
/> class="ok"
/>
{{/if}}
</div> </div>
</section> </section>
{{/if}} {{/if}}
{{#if this.canAdminTag}} {{#if this.canAdminTag}}
<section> <PluginOutlet
<PluginOutlet @name="tag-custom-settings"
@name="tag-custom-settings" @outletArgs={{hash tag=this.tagInfo}}
@outletArgs={{hash tag=this.tagInfo}} @connectorTagName="section"
/> />
</section>
<div class="tag-actions"> <div class="tag-actions">
<DButton <DButton
@action={{action "toggleEditControls"}} @action={{action "toggleEditControls"}}

View File

@ -317,31 +317,29 @@ header .discourse-tag {
} }
section.tag-info { section.tag-info {
display: flex;
flex-direction: column;
gap: 1em;
margin: 1em 0; margin: 1em 0;
padding: 2em; padding: 2em;
border: 1px solid var(--primary-low); border: 1px solid var(--primary-low);
.field {
margin: 0 0 0.5em;
}
.btn {
margin-right: 0.5em;
}
.edit-tag-wrapper { .edit-tag-wrapper {
display: flex; display: flex;
flex-wrap: wrap; flex-direction: column;
margin-bottom: 1em;
#edit-name { #edit-name,
#edit-description {
width: 100%; width: 100%;
margin-bottom: 0.5em;
} }
#edit-description { #edit-description {
height: 120px; height: 120px;
flex: 10 1 auto;
} }
.edit-controls { .edit-controls {
width: 100%; display: flex;
gap: 0.5em;
} }
} }
@ -381,34 +379,25 @@ section.tag-info {
} }
} }
.tag-description-wrapper {
margin-bottom: 1em;
}
.tag-associations {
margin-bottom: 1em;
}
.tag-actions { .tag-actions {
margin-top: 2em; display: flex;
flex-wrap: wrap;
gap: 0.5em;
}
.tag-associations:empty {
display: none;
} }
.add-synonyms { .add-synonyms {
margin-top: 1em; &__controls {
div {
display: flex;
}
.ok {
margin-left: 0.5em;
display: none;
}
.has-selection + .ok {
display: flex; display: flex;
gap: 0.5em;
} }
} }
.tag-list { .tag-list {
margin: 0.5em 0 1em; margin: 0.5em 0 0;
padding: 0; padding: 0;
border: none; border: none;
a { a {

View File

@ -28,7 +28,6 @@
@import "reviewables"; @import "reviewables";
@import "search"; @import "search";
@import "sidebar"; @import "sidebar";
@import "tagging";
@import "topic-list"; @import "topic-list";
@import "topic-post"; @import "topic-post";
@import "topic"; @import "topic";

View File

@ -1,9 +0,0 @@
.edit-tag-wrapper {
flex-direction: column;
.edit-controls {
margin-bottom: 0.5em;
}
}
.tag-info .tag-actions {
display: flex;
}