Page MenuHomePhabricator

Add an "archive" link to the main securepoll page [M]
Open, Needs TriagePublic


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

@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

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.
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)