Page MenuHomePhabricator

Add an "archive" link to the main securepoll page [M]
Closed, ResolvedPublic

Description

Votewiki has a lot of test elections in the interface which is confusing for election admins as well as voters. We should clean out the old test elections once they have outlived their usefulness.

  • Criteria:
    • Add an "archive" link to the main securepoll page
    • The link sets a flag that archives the election
    • Current elections shouldn't be archivable (should not yet happened elections?)
    • Archived elections shouldn't show on the main page
    • Only users in the election admin group should be able to archive

Event Timeline

Change 720232 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/SecurePoll@master] Implement archiving functionality

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

@Prtksxna Could you 👀 this user flow? We talked about the basics in estimation but would appreciate some design input 🙇 . Thanks! This covers both this ticket and T290178: Add an /archive page showing all the flagged elections [M]

  • "Archive" is available:

image.png (604×2 px, 209 KB)

  • Trying to archive a 1. unfinished election 2. an election you're not an admin for or 3. an election that's already archived results in an error:

image.png (290×1 px, 26 KB)

image.png (304×1 px, 30 KB)

image.png (262×932 px, 24 KB)

  • If you are an admin for a finished election, clicking "Archive" will archive the election (it's hidden from the main page):

image.png (344×964 px, 30 KB)

  • Add a link to the bottom of the page showing where you can look at archived elections:

image.png (940×1 px, 108 KB)

  • Archived elections are available at /archived:

image.png (644×2 px, 114 KB)

  • And can be unarchived (same requirements as archiving), showing them on the main page again:

image.png (394×1 px, 42 KB)

This looks great. Thanks for sharing screenshots, @STran! A few notes:

image.png (362×1 px, 24 KB)

Is it possible to hide or disable the link for users that aren't allowed to archive a certain election?

Yes; disabled. I think this is actually a bug that can be fixed as part of this patch and will note it in the patch since it's a little outside the scope of the ticket.

Are we using the the subtitle area on the election list page for any links? Can the 'View archived elections' and possibly the 'Create new poll' links be moved to the top.

We weren't but we can:

image.png (362×1 px, 39 KB)

Can we put the message on the archive page inside a message box?

Sure. How do these look?

image.png (360×1 px, 34 KB)

image.png (376×1 px, 30 KB)

image.png (442×1 px, 36 KB)

image.png (430×1 px, 41 KB)

image.png (376×1 px, 30 KB)

Change 720232 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Implement archiving functionality

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

While doing QA, we can archive elections our team created on votewiki for testing STV.

Verification done for the feature. Browser testing on supported browsers. https://vote.wikimedia.beta.wmflabs.org
The following are the screen shoots:
View archive link shows on upper left of screen and archive link is activated for eligible elections.

Screen Shot 2021-10-14 at 12.35.27 PM.png (1×2 px, 504 KB)

Archive election in progress page:
Screen Shot 2021-10-14 at 12.52.53 PM.png (1×2 px, 308 KB)

Page when election has been archived
Screen Shot 2021-10-15 at 1.05.20 PM.png (1×2 px, 238 KB)

Uncompleted elections cannot be archived, the archive link is deactivated:
Screen Shot 2021-10-15 at 12.13.35 PM.png (1×2 px, 590 KB)

Page for view archived elections
Screen Shot 2021-10-14 at 12.44.25 PM.png (1×2 px, 344 KB)

@STran I just noticed that the disabled Archive link is black (F34690249) in some cases and gray (F34690257) in others. Is there a difference in state between these two?

Rows that are greyed out reflect elections that have ended and rows that aren't are elections that are still ongoing and that styling is affecting links that you can't click.

Rows that are greyed out reflect elections that have ended and rows that aren't are elections that are still ongoing and that styling is affecting links that you can't click.

Understood. Thanks, @STran!