Page MenuHomePhabricator

Update clickwrap agreement experience on Statistics tab based on PII/non-PII selection
Closed, ResolvedPublic3 Estimated Story Points

Description

As an organizer, I want to only be required to opt into the clickwrap agreement on the Response Statistics tab if I am collecting PII data, so that I can always view non-PII data after the event without the barrier of a clickwrap agreement.

Background: With this feature T322209, organizers can select which questions they want to ask participants. As a result, organizers can choose to select PII & non-PII questions, only PII questions, or only non-PII questions. Meanwhile, organizers are only required to accept the clickwrap agreement to see PII data, while non-PII data does not require the organizer accept the clickwrap agreement. For these reasons, we need to update how organizers do or do not see the clickwrap agreement, depending on which data they are collecting.

Acceptance Criteria

  • Organizers should always be able to see the aggregated non-PII responses of their event in the Response Statistics tab, whether or not they have accepted the clickwrap agreement
  • Organizers should not be able to see the aggregated PII responses of their event in the Response Statistics tab until they have accepted the clickwrap agreement
  • The three flows for how this will work is as follows:
    • If the event has PII & non-PII questions:
      • Organizers of the event should be able to see non-PII data in the Response Statistics tab, but they need to agree to the clickwrap agreement in the response statistics tab to see PII data
    • If the event has only PII questions:
      • Organizers of the event need to accept a clickwrap agreement in order to display any data on the Response Statistics tab
    • If the event has only non-PII data:
      • Organizers of the event can open the Response Statistics tab and see the non-PII data, with no need to accept a clickwrap agreement (so no clickwrap agreement in the UI)
  • Note that, unlike in the designs below, the "Q" in "Questions" should not be capitalised

Designs
Design File
Prototype
When we have PII and Non-PII questions(Gif)

Screen Recording 2024-02-08 at 3.13.40 PM.gif (595×960 px, 167 KB)

When we have only PII Questions

image.png (2×2 px, 235 KB)

When we have only Non-PII Questions

image.png (2×2 px, 224 KB)

Event Timeline

ifried updated the task description. (Show Details)
ifried renamed this task from Show clickwrap agreement only for Aggregate PII data to Update clickwrap agreement experience on Statistics tab based on PII/non-PII selection.Jan 31 2024, 6:57 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)

Hello @gonyeahialam! I think we will need designs for how the Response Statistics tab will look if the event collects PII & non-PII data (since the organizers should still see the non-PII aggregated data after the event ends, so the clickwrap agreement should not be a barrier to opening up the Response Statistics tab in such cases). Thanks!

Daimona triaged this task as High priority.Feb 8 2024, 2:13 PM

When we have only PII Questions

image.png (2×2 px, 235 KB)

When we have only Non-PII Questions

image.png (2×2 px, 224 KB)

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

[mediawiki/extensions/CampaignEvents@master] Move clickwrap form logic into ResponseStatisticsModule

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

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

[mediawiki/extensions/CampaignEvents@master] Do not show clickwrap form if there are no answers

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

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

[mediawiki/extensions/CampaignEvents@master] Update stats tab based on PII/non-PII selection

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

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

[mediawiki/extensions/WikimediaMessages@master] Update CampaignEvents message

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

Change 1002690 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Move clickwrap form logic into ResponseStatisticsModule

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

Change 1002716 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Do not show clickwrap form if there are no answers

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

Change 1003125 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Update stats tab based on PII/non-PII selection

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

Change 1003126 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Update CampaignEvents message

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

This task is blocked from testing T322209 is merged and in QA

Acceptance Criteria

  • ✅ Organizers should always be able to see the aggregated non-PII responses of their event in the Response Statistics tab, whether or not they have accepted the clickwrap agreement
have not accepted clickwraphave accepted clickwrap
Screen Recording 2024-04-16 at 11.49.13 AM.gif (1×2 px, 380 KB)
Screen Recording 2024-04-16 at 12.03.37 PM.gif (1×2 px, 2 MB)
  • ✅ Organizers should not be able to see the aggregated PII responses of their event in the Response Statistics tab until they have accepted the clickwrap agreement
  • The three flows for how this will work is as follows:
    • If the event has PII & non-PII questions:
      • ✅ Organizers of the event should be able to see non-PII data in the Response Statistics tab, but they need to agree to the clickwrap agreement in the response statistics tab to see PII data
      • Screen Recording 2024-04-16 at 12.03.37 PM.gif (1×2 px, 2 MB)
    • If the event has only PII questions:
      • ✅ Organizers of the event need to accept a clickwrap agreement in order to display any data on the Response Statistics tab
      • Screen Recording 2024-04-16 at 12.11.08 PM.gif (1×2 px, 1 MB)
    • If the event has only non-PII data:
      • ✅ Organizers of the event can open the Response Statistics tab and see the non-PII data, with no need to accept a clickwrap agreement (so no clickwrap agreement in the UI)
      • Screen Recording 2024-04-16 at 12.14.13 PM.gif (1×2 px, 1 MB)
  • ✅ Note that, unlike in the designs below, the "Q" in "Questions" should not be capitalised
  • Screenshot 2024-04-16 at 12.18.28 PM.png (1×1 px, 141 KB)


When we have only PII Questions

compbuild
image.png (2×2 px, 235 KB)
Screenshot 2024-04-16 at 12.27.08 PM.png (1×2 px, 682 KB)

When we have only Non-PII Questions

compbuild
image.png (2×2 px, 224 KB)
Screenshot 2024-04-16 at 12.32.54 PM.png (1×3 px, 253 KB)

@Daimona this is all functioning correctly according to the AC. There are a few stylistic difference between the build and the comp though before sending to design sign off, see screenshots directly above this for visual examples:

  1. The div with id="StatsPanel" should not have 20px of padding on the left. It should instead be left aligned with the menu bar above it.
  2. The elements containing class="ext-campaignevents-details-stats-section-header" (containing txt`Non-Personally Identifiable Information (non-PII) questions`, for example), should be smaller to match the comp
  3. The h3 element that contains the participant question titles such as How confident do you feel contributing to the Wikimedia projects involved in this event? should be a lighter font weight / should not be bold.
  4. The horizontal rule underneath each of the participant questions should be lighter than the horizontal rule underneath the menu bar

@vaughnwalters +1
@Daimona the font size of the headings are too big and disproportionate.

  1. The div with id="StatsPanel" should not have 20px of padding on the left. It should instead be left aligned with the menu bar above it.

This is the standard padding for all OOUI IndexLayouts, compare with the demo. I should not that the padding seems to be absent in the Codex version, but we aren't using that at the moment, and I don't think we should change the default here for now.

  1. The h3 element that contains the participant question titles such as How confident do you feel contributing to the Wikimedia projects involved in this event? should be a lighter font weight / should not be bold.

I made it this way because that's the standard look of the Codex Accordion component (OOUI does not have accordions). I don't think we should change this default?

  1. The horizontal rule underneath each of the participant questions should be lighter than the horizontal rule underneath the menu bar

Making a fix for this.

  1. The elements containing class="ext-campaignevents-details-stats-section-header" (containing txt`Non-Personally Identifiable Information (non-PII) questions`, for example), should be smaller to match the comp

@Daimona the font size of the headings are too big and disproportionate.

I can fix this if given updated specs that account for the bold accordion titles.

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

[mediawiki/extensions/CampaignEvents@master] SpecialEventDetails: Tweak border color of accordions in stats tab

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

Change #1025823 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] SpecialEventDetails: Tweak border color of accordions in stats tab

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

@gonyeahialam Feedback appreciated, and we can then create some separate tasks; thank you!

  1. The h3 element that contains the participant question titles such as How confident do you feel contributing to the Wikimedia projects involved in this event? should be a lighter font weight / should not be bold.

I made it this way because that's the standard look of the Codex Accordion component (OOUI does not have accordions). I don't think we should change this default?

That is the default in codex but codex mentions that it can be changed to something else. Following the default would look like this, which we can go with:

image.png (1×2 px, 207 KB)

Design specs

  1. The elements containing class="ext-campaignevents-details-stats-section-header" (containing txt`Non-Personally Identifiable Information (non-PII) questions`, for example), should be smaller to match the comp

@Daimona the font size of the headings are too big and disproportionate.

I can fix this if given updated specs that account for the bold accordion titles.

Refer to the image above
@Daimona

Following the default would look like this, which we can go with:
Design specs

Thank you, this seems almost doable, but I'm not seeing if the font-size is using a CSS variable or not; on figma I can see the name being "Heading 5/Bold" and the font-size being 16px. However, this needs to be a level 2 header, and I'd like to know what size should be used. I should also note that neither Codex nor MW seem to provide variables for heading sizes, just the generic font-size-* ones. Same question about the accordion headers.

Following the default would look like this, which we can go with:
Design specs

Thank you, this seems almost doable, but I'm not seeing if the font-size is using a CSS variable or not; on figma I can see the name being "Heading 5/Bold" and the font-size being 16px. However, this needs to be a level 2 header, and I'd like to know what size should be used. I should also note that neither Codex nor MW seem to provide variables for heading sizes, just the generic font-size-* ones. Same question about the accordion headers.

Heading variables

Screenshot 2024-05-29 at 4.01.54 PM.png (1×2 px, 350 KB)

Accordion heading variables

Screenshot 2024-05-29 at 4.02.12 PM.png (1×2 px, 339 KB)

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

[mediawiki/extensions/CampaignEvents@master] SpecialEventDetails: update header styles in the stats tab

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

Change #1037176 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] SpecialEventDetails: update header styles in the stats tab

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

sending this to design sign off with updated styling

buildgif of build
Screenshot 2024-06-03 at 10.53.11 AM.png (1×1 px, 176 KB)
Screen Recording 2024-06-03 at 10.30.09 AM.gif (1×1 px, 1 MB)