Page MenuHomePhabricator

[IMPLEMENTATION] Front end: Show aggregate data to organizers after the event is over
Closed, ResolvedPublic5 Estimated Story Points

Description

Scenario: Show aggregate data to organizers after the event is over, if there is at least 10 answers on EventDetails special page

Acceptance criteria

  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID}
    • And the event has ended and the data is aggregated
    • Then I should be able to see a new tab "Response statistics"
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • If the event has no answers then this is covered by this task T341341
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • I can see a list of all questions and all options with aggregated data
    • And the headers should match the text in T321822 but without "(optional)"
    • And data for each question should be in a collapsible section
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for a question which has less than 10 answers,
    • I see "This question has received less than 10 total responses"
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for a question which has at least 10 answers,
    • Then for each option we display a table with the data as per the below ACs
    • And the table headers should be "Option", "Percentage" (not always shown, see below), and "Number"
    • And the text in the "Option" column should match the options in T321822
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for each option, which has less than 5 answers
    • I see "less than 5"
      • Note: This does not apply to the "No response" option, which will be handled in T346329
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for each option, which has at least 5 answers
    • I see the number
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then if all options for the question have at least 5 answers
      • Note: This does not apply to the "No response" option, which will be handled in T346329
    • I see a table column with header "Percentage"
    • And for each option I see the percentage of answers, rounded to the nearest tenth

Design

Design specs
Prototype

Notes

  • The copy used in the specs is outdated, see AC above for the latest version.
  • The order in which questions appear is just an example.
  • The headers for each option should be bold, like in Codex's accordion.

Screenshot 2023-08-02 at 13.49.15.png (1×3 px, 333 KB)

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Daimona renamed this task from [IMPLEMENTATION] Front end: Show aggregate data to organizers after the event is over, if there is at least 10 participants to [IMPLEMENTATION] Front end: Show aggregate data to organizers after the event is over, if there are at least 10 participants.Jul 3 2023, 2:21 PM
Daimona updated the task description. (Show Details)
cmelo renamed this task from [IMPLEMENTATION] Front end: Show aggregate data to organizers after the event is over, if there are at least 10 participants to [IMPLEMENTATION] Front end: Show aggregate data to organizers after the event is over.Aug 3 2023, 1:45 PM
cmelo updated the task description. (Show Details)
MHorsey-WMF set the point value for this task to 5.

@gonyeahialam What is the component used to make each question collapsible? Is it Codex's accordion? That's not something we can use (not until we switch everything to Codex), and it also doesn't have a CSS-only version that we might be able to easily use together with OOUI components (T338184). And of course, it doesn't exist in OOUI, cfr T145934 and T277047. Since the component is relatively simple, we could perhaps implement a custom version, but it might not look exactly like the prototype (and Codex's Accordion).

Or, if collapsibility is not super-important, we could also make everything non-collapsible, and use accordions later when we will move everything to Codex.

A few more questions:

  • The gender question we show to participants is "What is your gender identity?"; in the specs above, it's just "What is your gender?". Is this intentional?
  • The latest text for the affiliate question is "Do you belong to any Wikimedia affiliates (chapters, user groups, thematic organizations)?", which is different than what's in the design specs
  • The order in which questions appear in the stats is different than that used when participants register. I'm assuming this is not intentional, right?
  • The table headers are "options", "proportion", "number". I assume "options" should actually be singular, i.e. "option", for consistency with the others, and also general practices. Also, I believe "proportion" is not entirely accurate, given that the column contains a very specific kind of proportions (percentages), so I'd be curious to hear if there's any reason in particular for choosing "proportion" over "percentage".

And while at it, one final question: how is the width of the table determined in the prototype? It's not fitting the content, so what is it? A fixed percentage? If so, what percentage exactly? And should it be the same if the "proportion" column isn't shown?

@gonyeahialam What is the component used to make each question collapsible? Is it Codex's accordion? That's not something we can use (not until we switch everything to Codex), and it also doesn't have a CSS-only version that we might be able to easily use together with OOUI components (T338184). And of course, it doesn't exist in OOUI, cfr T145934 and T277047. Since the component is relatively simple, we could perhaps implement a custom version, but it might not look exactly like the prototype (and Codex's Accordion).

Or, if collapsibility is not super-important, we could also make everything non-collapsible, and use accordions later when we will move everything to Codex.

Collapsibility is important. With just 5 questions the page is already quite long and it is more difficult to scroll through all the data to find the question/data you are interested in. With the accordion, you can easily go to the question you are interested in and open it.
We can use this accordion that is used on wiki pages such as Contributions but without the border.

Screenshot 2023-08-29 at 11.03.18.png (464×3 px, 58 KB)

A few more questions:

  • The gender question we show to participants is "What is your gender identity?"; in the specs above, it's just "What is your gender?". Is this intentional?
  • The latest text for the affiliate question is "Do you belong to any Wikimedia affiliates (chapters, user groups, thematic organizations)?", which is different than what's in the design specs

Please use the question text on the Participant Questions Epic as the most up-to-date text.

  • The order in which questions appear in the stats is different than that used when participants register. I'm assuming this is not intentional, right?

Not intentional

  • The table headers are "options", "proportion", "number". I assume "options" should actually be singular, i.e. "option", for consistency with the others, and also general practices. Also, I believe "proportion" is not entirely accurate, given that the column contains a very specific kind of proportions (percentages), so I'd be curious to hear if there's any reason in particular for choosing "proportion" over "percentage".

Can't remember the reasoning behind the use of 'proportion', we can go with 'percentage' instead. Option can be made singular.

We can use this accordion that is used on wiki pages such as Contributions but without the border.

That is not an OOUI component though, it's a MW component based on OOUI, but it's made to be used in forms only, and what we have here is not a form. Nonetheless, I will implement something similar manually.

A few more questions:

  • The gender question we show to participants is "What is your gender identity?"; in the specs above, it's just "What is your gender?". Is this intentional?
  • The latest text for the affiliate question is "Do you belong to any Wikimedia affiliates (chapters, user groups, thematic organizations)?", which is different than what's in the design specs

Please use the question text on the Participant Questions Epic as the most up-to-date text.

  • The order in which questions appear in the stats is different than that used when participants register. I'm assuming this is not intentional, right?

Not intentional

  • The table headers are "options", "proportion", "number". I assume "options" should actually be singular, i.e. "option", for consistency with the others, and also general practices. Also, I believe "proportion" is not entirely accurate, given that the column contains a very specific kind of proportions (percentages), so I'd be curious to hear if there's any reason in particular for choosing "proportion" over "percentage".

Can't remember the reasoning behind the use of 'proportion', we can go with 'percentage' instead. Option can be made singular.

Thanks! I will update the AC.

(Also noting that there's one more question in T336855#9125375)

And I'm adding one more question: what rounding should we use for percentages? I thought we'd always round to the nearest integer given the specs, but then noticed that the "No response" option for the gender question has "2.5%" in the specs.

And while at it, one final question: how is the width of the table determined in the prototype? It's not fitting the content, so what is it? A fixed percentage? If so, what percentage exactly? And should it be the same if the "proportion" column isn't shown?

When put to fill the width, the options can become quite far apart(depending on the screen size and skin( from the proportion making it difficult to trace the option to its corresponding proportion especially if the option text length is short like most are.

Screenshot 2023-08-29 at 17.42.50.png (716×2 px, 71 KB)

If we decide to tailor the table size to the content, the width of each table. This would make the page harder to scan since the columns of each table would no longer align with each other

Screenshot 2023-08-29 at 17.50.19.png (1×2 px, 235 KB)

As a solution, for large screens, the table width takes up 70% of the space available for content. This way, all tables on the page have the same size, the option column is not too far apart from the proportion and it is also not too short for tables with long option text.

And I'm adding one more question: what rounding should we use for percentages? I thought we'd always round to the nearest integer given the specs, but then noticed that the "No response" option for the gender question has "2.5%" in the specs.

Do we have any specs that require rounding up to whole numbers?

As a solution, for large screens, the table width takes up 70% of the space available for content. This way, all tables on the page have the same size, the option column is not too far apart from the proportion and it is also not too short for tables with long option text.

Thanks!

And I'm adding one more question: what rounding should we use for percentages? I thought we'd always round to the nearest integer given the specs, but then noticed that the "No response" option for the gender question has "2.5%" in the specs.

Do we have any specs that require rounding up to whole numbers?

No, I was just referring to the design specs above, where all the percentages are integers, except for the "No response" one, and I was wondering if this is intentional, or more generally what rounding we should use.

Engineering/Design Meeting 20/08/2023
Decision: Use one decimal point for percentage.
Reason: Organizers want a certain level of accuracy, since they report out data to various partners and stakeholders. We also want the data to not be too overwhelming or confusing to look at. So one decimal point is a compromise between simplicity and accuracy.

Change 952903 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Show aggregated participant answers in Special:EventDetails

https://gerrit.wikimedia.org/r/952903

Change 952903 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Show aggregated participant answers in Special:EventDetails

https://gerrit.wikimedia.org/r/952903

Acceptance criteria

  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID}
    • And the event has ended and the data is aggregated
    • ✅ Then I should be able to see a new tab "Response statistics"
    • Screenshot 2023-09-05 at 5.24.55 PM.png (312×898 px, 38 KB)
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • ✅ If the event has no answers then this is covered by this task T341341
    • ( See testing notes at T341341#9137778 )
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • I can see a list of all questions and all options with aggregated data
    • 🔴 And the headers should match the text in T321822 but without "(optional)"
    • ✅ And data for each question should be in a collapsible section
    • @Daimona The wording in the header text does match what is in T321822, but What is your age? should come before What is your gender identity? in the build
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for a question which has less than 10 answers,
    • ✅ I see "This question has received less than 10 total responses"
    • Screenshot 2023-09-05 at 5.32.12 PM.png (256×1 px, 46 KB)
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for a question which has at least 10 answers,
    • Then for each option we display a table with the data as per the below ACs
    • ✅ And the table headers should be "Option", "Percentage" (not always shown, see below), and "Number"
    • ✅ And the text in the "Option" column should match the options in T321822
With percentage**Without percentage
Screenshot 2023-09-06 at 4.09.52 PM.png (758×1 px, 121 KB)
Screenshot 2023-09-06 at 4.11.37 PM.png (1×1 px, 87 KB)
  • ❗ In the aggregate table the non response option is listed in each question as No response which differs from the options in T321822 where the No response options are Prefer not to say, Select age range, Select your profession, or Select an option. This doesn't make sense to put these in the aggregate table, so it is good as is, but since this does differ slightly from the And the text in the "Option" column should match the options in T321822 AC I am noting it here for posterity.
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for each option, which has less than 5 answers
    • ✅ I see "less than 5"
    • Screenshot 2023-09-06 at 3.11.44 PM.png (744×2 px, 129 KB)
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then for each option, which has at least 5 answers
    • ✅ I see the number
    • Screenshot 2023-09-06 at 4.19.48 PM.png (1×1 px, 90 KB)
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then if all options for the question have at least 5 answers
    • ✅ I see the percentage for each option, rounded to the nearest tenth
    • Screenshot 2023-09-06 at 4.20.10 PM.png (828×1 px, 88 KB)
  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • I can see a list of all questions and all options with aggregated data
    • 🔴 And the headers should match the text in T321822 but without "(optional)"
    • ✅ And data for each question should be in a collapsible section
    • @Daimona The wording in the header text does match what is in T321822, but What is your age? should come before What is your gender identity? in the build

I am checking in T321822 to confirm that What is your age? should come before What is your gender identity?

@Daimona does the percentage show when every single option is over 5?

@Daimona does the percentage show when every single option is over 5?

Yes, see this AC (emphasis mine):

  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then if all options for the question have at least 5 answers
    • I see a table column with header "Percentage"
    • And for each option I see the percentage of answers, rounded to the nearest tenth

@Daimona does the percentage show when every single option is over 5?

Yes, see this AC (emphasis mine):

  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • Then if all options for the question have at least 5 answers
    • I see a table column with header "Percentage"
    • And for each option I see the percentage of answers, rounded to the nearest tenth

Ah, okay - if I am understanding this correctly then, it is not working as described in the AC. If any of the answered questions (any but the no response option) have less than five answers it will not display the percentage, but if the no response option has less than five and all of the chosen answers have over five responses, then it will still show the percentages:

Screenshot 2023-09-06 at 4.20.10 PM.png (828×1 px, 88 KB)

  • Given I am an organizer
    • And I go to Special:EventDetails/{eventID} "Response statistics" tab
    • I can see a list of all questions and all options with aggregated data
    • 🔴 And the headers should match the text in T321822 but without "(optional)"
    • ✅ And data for each question should be in a collapsible section
    • @Daimona The wording in the header text does match what is in T321822, but What is your age? should come before What is your gender identity? in the build

I am checking in T321822 to confirm that What is your age? should come before What is your gender identity?

What is your gender identity? now comes before What is your age? in T321822, so this is no longer an issue in this ticket.


So now, the only unresolved issue in this ticket is T336855#9157491

Hello, an issue has been flagged by @Daimona (and thank you for flagging it!), which is:

"For each question, we show the 'No response' number... say we have an event with 100 participants, of which 70 answer 'Yes' to the affiliate question, and 3 of them answer 'No.' We would report that 70 participants responded 'Yes,' 27 did not answer the question, and 'less than 5' responded "No". In this case you can easily infer what the number of 'No's is."

My recommendation:

  • If there are less than 5 answers for 'No answer,' we show "Less than 5"

Thoughts on percentages:

  • With this change, we will be introducing more scenarios in which no percentages are shown. I fact, if I understand things correctly, we may also be lightly penalizing organizers (in a way) for something that could be considered good. For example, if one large event only receives 2 'no answers' for a question, that could be considered good, since most participants chose to respond to a given question. However, that would be potentially bad for the organizer, since they would not be able to see the percentages. Meanwhile, an event of a similar size that had 20 people not respond could see the percentages. To provide more support to the organizer, we could maybe show a percentage range.

I am curious to hear what @gonyeahialam and @Iflorez have to say. Thanks!

Thanks, let's continue the conversation in T346329. @vaughnwalters the AC have been updated so that the "no response" option no longer obeys to the "less than 5" rule.

Thanks, let's continue the conversation in T346329. @vaughnwalters the AC have been updated so that the "no response" option no longer obeys to the "less than 5" rule.

Okay great @Daimona, also though are we good to change the final two AC scenarios as well? Right now No response does not need 5 answers to show the number or the percentage column on an aggregated answer.

Screenshot 2023-09-14 at 9.07.19 AM.png (418×1 px, 71 KB)

Thanks, let's continue the conversation in T346329. @vaughnwalters the AC have been updated so that the "no response" option no longer obeys to the "less than 5" rule.

Okay great @Daimona, also though are we good to change the final two AC scenarios as well? Right now No response does not need 5 answers to show the percetage column on an aggregated answer.

Screenshot 2023-09-14 at 9.07.19 AM.png (418×1 px, 71 KB)

Yes, sorry, missed that one. I've just updated the AC.

Thanks, let's continue the conversation in T346329. @vaughnwalters the AC have been updated so that the "no response" option no longer obeys to the "less than 5" rule.

Okay great @Daimona, also though are we good to change the final two AC scenarios as well? Right now No response does not need 5 answers to show the percetage column on an aggregated answer.

Screenshot 2023-09-14 at 9.07.19 AM.png (418×1 px, 71 KB)

Yes, sorry, missed that one. I've just updated the AC.

Okay great, moving this to design sign off now. @gonyeahialam T336855#9147772 is where you can see the test scenarios.

@Daimona The notice and divider line are clustered together. This doesn't happen when there is a table, the table and divider line have adequate spacing.

image.png (256×1 px, 40 KB)

@Daimona The notice and divider line are clustered together. This doesn't happen when there is a table, the table and divider line have adequate spacing.

Oh, right, let me quickly fix that.

Change 957914 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Adjust spacing of sections in the response statistics tab

https://gerrit.wikimedia.org/r/957914

Change 957914 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Adjust spacing of sections in the response statistics tab

https://gerrit.wikimedia.org/r/957914

@vaughnwalters Passing this to you first in case you want to do more testing for the spacing before sending it to design signoff again.

@Daimona The notice and divider line are clustered together. This doesn't happen when there is a table, the table and divider line have adequate spacing.

image.png (256×1 px, 40 KB)

Looks good, passing this back to design sign off:

Screenshot 2023-09-18 at 12.01.18 PM.png (300×1 px, 47 KB)

Looks good, passing this back to design sign off:

Screenshot 2023-09-18 at 12.01.18 PM.png (300×1 px, 47 KB)

Your image isn't showing @vaughnwalters

Looks good, passing this back to design sign off:

Screenshot 2023-09-18 at 12.01.18 PM.png (300×1 px, 47 KB)

Your image isn't showing @vaughnwalters

Ah, sorry I didn't attach it properly. It should be showing now.