mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FEATURE: add a Top Categories section to the user summary page, showing the categories in which a user has the most activity
This commit is contained in:
parent
2dc3a50dac
commit
afc94ac9e4
8 changed files with 130 additions and 3 deletions
|
@ -46,5 +46,9 @@ QUnit.test("Viewing Summary", assert => {
|
|||
assert.ok(exists(".liked-by-section .user-info"), "liked by");
|
||||
assert.ok(exists(".liked-section .user-info"), "liked");
|
||||
assert.ok(exists(".badges-section .badge-card"), "badges");
|
||||
assert.ok(
|
||||
exists(".top-categories-section .category-link"),
|
||||
"top categories"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -88,7 +88,20 @@ export default function() {
|
|||
most_replied_to_users: [{ id: 333 }],
|
||||
most_liked_by_users: [{ id: 333 }],
|
||||
most_liked_users: [{ id: 333 }],
|
||||
badges: [{ badge_id: 444 }]
|
||||
badges: [{ badge_id: 444 }],
|
||||
top_categories: [
|
||||
{
|
||||
id: 1,
|
||||
name: "bug",
|
||||
color: "e9dd00",
|
||||
text_color: "000000",
|
||||
slug: "bug",
|
||||
read_restricted: false,
|
||||
parent_category_id: null,
|
||||
topic_count: 1,
|
||||
post_count: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
badges: [{ id: 444, count: 1 }],
|
||||
topics: [{ id: 1234, title: "cool title", url: "/t/1234/cool-title" }]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue