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
Remove "-" before count of posts on Topic Cards when sorting by "# of People" #7965
Comments
Does anyone have code links at hand that they could add here? Thanks in advance! |
Hi @Tlazypanda can we look at other places where https://github.com/publiclab/plots2/pull/7609/files#diff-8fe92870a7f027a46eed82a51c5c16bcR118 However, the counts are off by very little. I wonder if this is an issue of some things being spammed and then that affecting the math a little bit? See for example the difference between these counts: We can look for where the 236 count is calculated and switch over to that, perhaps? So that uses a controller-generated instance variable: plots2/app/views/tag/show.html.erb Line 58 in c056cb0
I believe this is where this is calculated: plots2/app/controllers/tag_controller.rb Lines 551 to 560 in c056cb0
|
Hey @jywarren, what I can see in tag/:id i.e. the showpage for tag is that we are displaying only research notes over there and in topic cards , we are trying to display research notes+questions. |
Hi, that's just right! noting the concept of a "single source of truth" here: #6855 (comment) I believe we should be using the same calculations here: #7476 (based on #6855). @urvashigupta7 thank you so much for chiming in! Would you be interested in making these changes? |
I also think that in #7476, we are not filtering out spam. So on these lines, we should probably add plots2/app/controllers/tag_controller.rb Lines 551 to 560 in c056cb0
That code also depends on this, which doesn't filter spam: Lines 609 to 618 in f4dfdcb
Likewise this code needs also to filter spam out with the same filter: Lines 118 to 124 in f4dfdcb
|
Hmm. It does seem like we are filtering spam from the plots2/app/controllers/tag_controller.rb Lines 204 to 218 in c056cb0
However, neither |
The count here is still not right, i think. For example https://stable.publiclab.org/tags now lists 692 posts for I think we need to depend on this fix: #8245 then we can check this again. Reopening for a moment... fingers 🤞 |
#8245 is now done! And has unit tests, so nice. OK, now this may work... |
OK, it says Research notes 469 I mean, notes plus wikis = 546...? and plus questions is 583? |
* fixes for publiclab#7965 * count fixes
* fixes for publiclab#7965 * count fixes
Now, testing the tag |
and noting link to #8244 |
YESSSSS it's 5-minute cached: plots2/app/views/tag/show.html.erb Line 133 in e97eff7
|
OK, so tracing the tab count: Lines 621 to 630 in e97eff7
Versus the topic card count:
😭 |
These three are the difference:
|
VERY strange! for 2 reasons: 3 notes is not the same as the 10 missing ones (thought we haven't looked at questions yet), AND, these three seem to be normal except that one was in Feb 2013 and 2 were in May 2013:
(update: see below for duplicate tagnames) |
Also interesting:
This agrees with:
vs. 37 as shown on the tab, which is calculated with: Lines 640 to 646 in e97eff7
|
Aha! That last section shows that posts tagged |
The following 8 posts seem to have
|
OK, so that gets us to within 2 nodes. Now let's just manually compare:
vs:
|
Aha. Maybe this:
|
Yes, that's the discrepancy:
|
However, notably not for the
|
OK, i fixed the duplicate tags with:
however i bet there are more in the DB. We may want to do a bigger project to consolidate these. Update: yes, there are 28 other instances:
|
My recommendation now is: We've narrowed this down a lot, and it has two parts.
My take on (2) is that we should write it down and be aware of it, but not solve it (i can’t think of a clean solution anyways). And, even after all that digging, I still have a discrepancy of 1 for |
* 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
Please describe the problem
There appears to be a tiny "-" before the count of posts on Topic Cards when the "# of People" sorting option is clicked, making it appear like there is a negative count of posts. See screenshot:
i expected to see positive integers.
Please show us where to look
https://publiclab.org/tags?sort=followers&order=asc
What's your PublicLab.org username?
liz
The text was updated successfully, but these errors were encountered: