-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
topic card count fixes for #7965 #8249
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8249 +/- ##
==========================================
- Coverage 81.69% 81.68% -0.02%
==========================================
Files 100 100
Lines 5846 5842 -4
==========================================
- Hits 4776 4772 -4
Misses 1070 1070
|
@@ -8,13 +8,11 @@ class NodeTag < ApplicationRecord | |||
has_many :tag_selections, foreign_key: 'tid' | |||
accepts_nested_attributes_for :tag | |||
|
|||
after_create :increment_count | |||
after_create :update_count |
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.
Adding better updaters for tag counting
Also testing this out at http://unstable.publiclab.org/tags, where I just pushed it! |
follow-up to publiclab#8249
@@ -32,7 +32,7 @@ | |||
</div> | |||
<div class="card-footer" style="background-color: inherit; border:none;"> | |||
<a style="padding-top:15px;text-decoration:underline;color:#808080;display:inline-block;" href="/tag/<%= tag.name %>"><%= Tag.counter(tag.name)-shown_nids.count - Tag.find_nodes_by_type(tag.name, type = 'note', limit = 3).where.not(nid: shown_nids).count %> <%= translation('tag.index.more_posts') %> »</a> | |||
<a style="padding-top:15px;text-decoration:underline;color:#808080;display:inline-block;" href="/tag/<%= tag.name %>"><%= Tag.count %> <%= translation('tag.index.posts') %> »</a> |
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.
Oops, it should've been tag.count
not Tag.count
-- fixing in follow-up!!!
MISTAKE! See last comment, follow-up in af6083a |
Let's confirm in https://stable.publiclab.org/tags -- 😅 |
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* paginate tag page listings (#8243) * Update _graph.html.erb * Update show.html.erb * topic card count fixes for #7965 (#8249) * fixes for #7965 * count fixes * Update _topicCard.html.erb * Delete _related_tags.html.erb (#8247) * Fixes to tag counting logic (#8245) * Update tag_test.rb * Update tag_test.rb * Update tag_test.rb * Update tag.rb * Spam2: Moderator's Queue feature (#8196) * queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue * Don't let newcomers edit wiki pages (controller-level) (#8250) * Don't let newcomers edit wiki pages (controller-level) * Update wiki_controller.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Update wiki_controller.rb * Update wiki_controller.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Bump rubocop from 0.88.0 to 0.89.0 Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.88.0 to 0.89.0. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v0.88.0...v0.89.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump codecov from 0.2.3 to 0.2.5 Bumps [codecov](https://github.com/codecov/codecov-ruby) from 0.2.3 to 0.2.5. - [Release notes](https://github.com/codecov/codecov-ruby/releases) - [Changelog](https://github.com/codecov/codecov-ruby/blob/master/CHANGELOG.md) - [Commits](codecov/codecov-ruby@v0.2.3...v0.2.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump rdiscount from 2.2.0.1 to 2.2.0.2 Bumps [rdiscount](https://github.com/davidfstr/rdiscount) from 2.2.0.1 to 2.2.0.2. - [Release notes](https://github.com/davidfstr/rdiscount/releases) - [Changelog](https://github.com/davidfstr/rdiscount/blob/master/CHANGELOG.md) - [Commits](davidfstr/rdiscount@2.2.0.1...2.2.0.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Adding tags to Modals of Nodes (#8238) * adding tags in modals of Nodes #8230 * refactored #8230 * fixed tag path in the modal #8230 also fixed extra spacing when no tags on the modal * update _flags.html.erb (#8237) Changed "btn btn-xs" to "btn btn-sm" * adjust opengraph tag Co-authored-by: Jeffrey Warren <jeff@unterbahn.com> Co-authored-by: Keshav Sethi <36025262+keshavsethi@users.noreply.github.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: renugasaraswathy <renugasaraswathy@gmail.com> Co-authored-by: siddhama <54734665+siddhama@users.noreply.github.com>
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
Fixes #7965, supercedes #8048