UX: Moving categories under topic title in topic list, removing category column (#6731)

* Starting to remove category column from topic list

* stacked nav alignment adjustment

* Revert "stacked nav alignment adjustment"

This reverts commit 98800c70580eaddef4ed7c417957dea3f146034d.

* remove comment

* removing function
This commit is contained in:
Kris 2018-12-05 19:12:26 -05:00 committed by Jeff Atwood
parent 5612dbc8c3
commit a88f931d6f
8 changed files with 19 additions and 31 deletions

View File

@ -96,13 +96,6 @@ export default Ember.Component.extend(
return classes.join(" "); return classes.join(" ");
}, },
titleColSpan: function() {
return !this.get("hideCategory") &&
this.get("topic.isPinnedUncategorized")
? 2
: 1;
}.property("topic.isPinnedUncategorized"),
hasLikes: function() { hasLikes: function() {
return this.get("topic.like_count") > 0; return this.get("topic.like_count") > 0;
}, },

View File

@ -11,7 +11,7 @@
This causes the topic-post-badge to be considered the same word as "text" This causes the topic-post-badge to be considered the same word as "text"
at the end of the link, preventing it from line wrapping onto its own line. at the end of the link, preventing it from line wrapping onto its own line.
--}} --}}
<td class='main-link clearfix' colspan="{{titleColSpan}}"> <td class='main-link clearfix' colspan="1">
<span class='link-top-line'> <span class='link-top-line'>
{{~raw-plugin-outlet name="topic-list-before-status"}} {{~raw-plugin-outlet name="topic-list-before-status"}}
{{~raw "topic-status" topic=topic}} {{~raw "topic-status" topic=topic}}
@ -24,20 +24,20 @@
{{~raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}} {{~raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
{{~/if}} {{~/if}}
</span> </span>
<div class="link-bottom-line">
{{#unless hideCategory}}
{{#unless topic.isPinnedUncategorized}}
{{category-link topic.category}}
{{/unless}}
{{/unless}}
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}} {{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
{{#if expandPinned}} {{#if expandPinned}}
{{raw "list/topic-excerpt" topic=topic}} {{raw "list/topic-excerpt" topic=topic}}
{{/if}} {{/if}}
{{raw "list/action-list" topic=topic postNumbers=topic.liked_post_numbers className="likes" icon="heart"}} {{raw "list/action-list" topic=topic postNumbers=topic.liked_post_numbers className="likes" icon="heart"}}
</div>
</td> </td>
{{#unless hideCategory}}
{{#unless topic.isPinnedUncategorized}}
{{raw "list/category-column" category=topic.category}}
{{/unless}}
{{/unless}}
{{#if showPosters}} {{#if showPosters}}
{{raw "list/posters-column" posters=topic.posters}} {{raw "list/posters-column" posters=topic.posters}}
{{/if}} {{/if}}

View File

@ -6,9 +6,6 @@
</th> </th>
{{/if}} {{/if}}
{{raw "topic-list-header-column" order='default' name=listTitle bulkSelectEnabled=bulkSelectEnabled showBulkToggle=toggleInTitle canBulkSelect=canBulkSelect}} {{raw "topic-list-header-column" order='default' name=listTitle bulkSelectEnabled=bulkSelectEnabled showBulkToggle=toggleInTitle canBulkSelect=canBulkSelect}}
{{#unless hideCategory}}
{{raw "topic-list-header-column" sortable=sortable order='category' name='category_title'}}
{{/unless}}
{{#if showPosters}} {{#if showPosters}}
{{raw "topic-list-header-column" order='posters' name='users'}} {{raw "topic-list-header-column" order='posters' name='users'}}
{{/if}} {{/if}}

View File

@ -131,6 +131,10 @@
@extend .topic-list-main-link; @extend .topic-list-main-link;
} }
.link-bottom-line {
font-size: $font-down-1;
}
.topic-featured-link { .topic-featured-link {
padding-left: 5px; padding-left: 5px;
} }

View File

@ -124,10 +124,9 @@ $tag-color: $primary-medium;
} }
.topic-list-item .discourse-tags { .topic-list-item .discourse-tags {
display: block; display: inline-block;
font-size: $font-down-2;
font-weight: normal; font-weight: normal;
clear: both; font-size: $font-down-1;
.discourse-tag.box { .discourse-tag.box {
position: relative; position: relative;

View File

@ -129,8 +129,11 @@
} }
} }
.discourse-tag { .discourse-tags {
font-size: $font-down-2; display: inline-block;
.discourse-tag {
font-size: $font-down-1;
}
} }
.topic-featured-link { .topic-featured-link {

View File

@ -281,10 +281,6 @@ button.dismiss-read {
padding: 10px; padding: 10px;
font-size: $font-0; font-size: $font-0;
} }
.category {
min-width: 0;
padding: 0;
}
// suppress views column // suppress views column
th.views { th.views {
display: none; display: none;

View File

@ -449,10 +449,6 @@ nav.post-controls {
padding: 20px 0 15px 0; padding: 20px 0 15px 0;
table { table {
margin-top: 10px; margin-top: 10px;
} // this forces category to take less space in suggested topics
// as the poster list is not present at all there.
th.category {
width: 150px;
} }
} }