-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add icons for Views and Replies, and Last Activity date #13
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6f1dcea
Implement the suggestions in https://meta.discourse.org/t/add-icons-f…
communiteq eb8a38a
We can actually use replyCount from the existing method in topic
communiteq 94b582a
Optional show/hide of metrics
communiteq 3f47db9
Merge branch 'main' into main
communiteq 88e6596
Fix linting and restore like icon color when it's the only icon.
pmusaraj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,41 @@ | ||
<div class="topic-card__metadata"> | ||
<span class="topic-card__publish-date"> | ||
{{theme-i18n "published"}} | ||
{{format-date view.topic.createdAt format="medium-with-ago"}} | ||
</span> | ||
|
||
<span class="topic-card__likes"> | ||
<span class="topic-card__likes-number">{{view.topic.like_count}}</span> | ||
{{d-icon "heart"}} | ||
</span> | ||
{{#if (theme-setting 'show_publish_date')}} | ||
<span class="topic-card__publish-date"> | ||
{{theme-i18n "published"}} | ||
{{format-date view.topic.createdAt format="medium-with-ago"}} | ||
</span> | ||
{{/if}} | ||
|
||
<div class="right-aligned"> | ||
{{#if (theme-setting 'show_views')}} | ||
<span class="topic-card__views item"> | ||
{{d-icon "eye"}} | ||
<span class="number"> | ||
{{view.topic.views}} | ||
</span> | ||
</span> | ||
{{/if}} | ||
|
||
{{#if (theme-setting 'show_likes')}} | ||
<span class="topic-card__likes item"> | ||
{{d-icon "heart"}} | ||
<span class="number"> | ||
{{view.topic.like_count}} | ||
</span> | ||
</span> | ||
{{/if}} | ||
|
||
{{#if (theme-setting 'show_reply_count')}} | ||
<span class="topic-card__reply_count item"> | ||
{{d-icon "comment"}} | ||
<span class="number"> | ||
{{view.topic.replyCount}} | ||
</span> | ||
</span> | ||
{{/if}} | ||
|
||
{{#if (theme-setting 'show_activity')}} | ||
{{raw "list/activity-column" topic=view.topic class="topic-card-data-activity item" tagName="div"}} | ||
{{/if}} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've regressed on the color for the heart icon, can we restore that? Or does it look poorly if its color is different from the other icons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was on purpose, it indeed looks really stupid if it's the only colored icon. Sorry for not mentioning that explicitly.
I wasn't sure how to deal with this, remove it by default seemed the best idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, for what is worth I agree with the removal of the red color. Initially Topic Cards had only one icon, and having it red was ok. But in Topic List Thumbnails none of the icons deviates from gray, which makes sense, and this PR follows that consistency.
For what is worth, this is how the four icons looks like, and it looks very good imho:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay here, folks, I was out on vacation.
I found a way to add the like icon color but only when it is displayed on its own. Goal here was to keep existing behaviour intact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a brilliant solution!! 👍