Plots2: Add questions asked vs asked status bar in tag/topic page

Created on 17 Nov 2019  Â·  5Comments  Â·  Source: publiclab/plots2

Sub task of https://github.com/publiclab/plots2/issues/2120.

### Description

Add a questions asked vs answered rate on https://publiclab.org/tag/community/stats. We should reuse the dat picker there to calculate the rate while calculating the other existing metrics.

We already have a silmilar status bar here Screenshot from 2019-11-17 12-22-22 on https://publiclab.org/stats?options=Past+year and you can reuse the idea used there.

### Where to find Logic and templates

We get the questions vs answers with like this https://github.com/publiclab/plots2/blob/master/app/controllers/stats_controller.rb#L28-L34

The graph code can be found here... https://github.com/publiclab/plots2/blob/master/app/views/stats/index.html.erb#L259%20-L326 .
You could extract this as a partial and reuse for the two views.

The view that we need to add the status bar is https://github.com/publiclab/plots2/blob/master/app/views/tag/stats.html.erb and its action in controller is https://github.com/publiclab/plots2/blob/master/app/controllers/tag_controller.rb#L524-L535

feature help wanted high-priority

Most helpful comment

Hey @nstjean, please go ahead. Feel free to ping me in case of anything. Thanks

All 5 comments

Hi, can I help with this, or is it reserved for something?

Hey @nstjean, please go ahead. Feel free to ping me in case of anything. Thanks

When I go to /tag/community/stats in local it's giving me an error.

FireShot Capture 064 - Action Controller_ Exception caught - localhost

I figured it out... in local I have nothing with the tag "community". If I go to a different tag it works. The page should probably display a nicer error for "nothing found with the tag ___" instead!

Good catch and great idea!

On Tue, Nov 19, 2019 at 10:34 AM Natalie St Jean notifications@github.com
wrote:

I figured it out... in local I have nothing with the tag "community". If I
go to a different tag it works. The page should probably display a nicer
error for "nothing found with the tag ___" instead!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/6790?email_source=notifications&email_token=AAAF6JYNVYP7WLIDGRMFL73QUQBOTA5CNFSM4JOJCVHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEOTIDI#issuecomment-555561997,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAF6J2BQAKAU4OYSLRGHTLQUQBOTANCNFSM4JOJCVHA
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SidharthBansal picture SidharthBansal  Â·  142Comments

ebarry picture ebarry  Â·  73Comments

jywarren picture jywarren  Â·  81Comments

gautamig54 picture gautamig54  Â·  84Comments

cesswairimu picture cesswairimu  Â·  119Comments