Page MenuHomePhabricator

Combine TallyPage forms into one
Closed, ResolvedPublic3 Estimated Story Points

Description

The TallyPage has two forms: one for tallying without uploading a file, and one for tallying from an uploaded file.

Following T271830: Allow election decryption key to be submitted via the TallyPage form, the TallyPage forms will both each have a field for entering a decryption key:

image.png (698Γ—780 px, 41 KB)

Now that the forms are more complicated, it would be neater to combine them into one.

The new form could have:

  • Decryption key input
  • Radio for choosing whether to enable the file input
  • File input
  • Submit button

Event Timeline

Restricted Application added a subscriber: Aklapper. Β· View Herald Transcript

@Tchanders merging the two forms sounds like a good idea. What do you think about not adding the radio, and instead processing using the file if its uploaded, and otherwise processing whats in the database? We could have some inlineHelp with the File input to explain this.

If there could be issues with this, what you've proposed in the description sounds good πŸ‘πŸ½

@jrbs We were wondering if the upload encrypted dump feature is useful to preserve. Are there instances when it gets used?

The help text at the top might need some updating.

The election record has been encrypted, but the decryption key is available. You can choose to either tally the results present in the database, or to tally encrypted results from an uploaded file

I don't quite understand the sentence - "The election record has been encrypted, but the decryption key is available.". Does it make sense in context?

I was thinking of moving the second sentence to the help text of the file select widget. A couple of options:

  • You can choose to either tally the results present in the database, or to tally encrypted results from an uploaded file
  • If you uploaded an encrypted dump, its contents will be tallied. Otherwise the results in the database will be tallied.
  • If an encrypted dump is uploaded its contents will be tallied. Otherwise the results in the database will be tallied.
  • If an encrypted dump is uploaded its contents will be tallied, else the results in the database will be used.
  • If an encrypted file isn't uploaded, the results in the database will be tallied.

What do you think?

@jrbs We were wondering if the upload encrypted dump feature is useful to preserve. Are there instances when it gets used?

Personally I've never used it. I don't know if I would really even know what kind of dump it's looking for or where to find it beyond the tally.php script. Isn't it already in the db? Should one need to be provided at all?

@Niharika When you come back from PTO, we need input here, please. For the time being, we're blocked.

@jrbs We were wondering if the upload encrypted dump feature is useful to preserve. Are there instances when it gets used?

Personally I've never used it. I don't know if I would really even know what kind of dump it's looking for or where to find it beyond the tally.php script. Isn't it already in the db? Should one need to be provided at all?

Thanks @jrbs.

If Wikiapiary is anything to go by, it seems like a handful of external websites use SecurePoll. With that in mind, I wouldn't want us to strip this feature without knowing if there is any use case for it outside of our projects. So let's move ahead with combining the two forms into one for the time being.

The help text at the top might need some updating.

The election record has been encrypted, but the decryption key is available. You can choose to either tally the results present in the database, or to tally encrypted results from an uploaded file

I don't quite understand the sentence - "The election record has been encrypted, but the decryption key is available.". Does it make sense in context?

I agree, it doesn't quite make sense. We can remove this sentence.

I was thinking of moving the second sentence to the help text of the file select widget. A couple of options:

  • You can choose to either tally the results present in the database, or to tally encrypted results from an uploaded file
  • If you uploaded an encrypted dump, its contents will be tallied. Otherwise the results in the database will be tallied.
  • If an encrypted dump is uploaded its contents will be tallied. Otherwise the results in the database will be tallied.
  • If an encrypted dump is uploaded its contents will be tallied, else the results in the database will be used.
  • If an encrypted file isn't uploaded, the results in the database will be tallied.

What do you think?

I like "If you upload an encrypted dump, its contents will be tallied. Otherwise the results in the database will be tallied."

Niharika triaged this task as Medium priority.Feb 11 2021, 3:01 PM

Change 665218 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/SecurePoll@master] Combine the two TallyPage forms into one form

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

Change 665218 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Combine the two TallyPage forms into one form

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

dom_walden added a subscriber: dom_walden.

You can see examples of the new tally form for different types of elections below.

I am not sure what I think about the new form. It seems to give a lot of prominence to the "Select a file" input, and I am not sure how many users will properly read the greyed out text underneath it. Deferring to @Prtksxna.

encrypted_election_tally.png (374Γ—775 px, 23 KB)

unencrypted_election_tally.png (180Γ—440 px, 8 KB)

encrypted_decrypted_election_tally.png (204Γ—774 px, 19 KB)

Now, you cannot create a tally from a dump file for an unencrypted election. @Niharika Is this OK?

Thanks @dom_walden. I was able to access the elections on votewikibeta.

Now, you cannot create a tally from a dump file for an unencrypted election. @Niharika Is this OK?

Yeah, I think that's fine. I don't really see a use case for why someone would want to do that.

I am not sure what I think about the new form. It seems to give a lot of prominence to the "Select a file" input, and I am not sure how many users will properly read the greyed out text underneath it. Deferring to @Prtksxna.

You’re right. I’ve created T276444 proposing some changes.