BrightSpots / rcv

Ranked Choice Voting Universal Tabulator
Mozilla Public License 2.0
72 stars 19 forks source link

Uploading Multiple CVRs #589

Closed rrojas350 closed 2 years ago

rrojas350 commented 2 years ago

The current process can get tedious when uploading multiple CVRs from the same vendor. Rather than selecting individual CVRs, users would like to option/ability to select a folder containing multiple CVRs.

HEdingfield commented 2 years ago

I could potentially add another button in the UI next to "Select" for "Select Multiple" or something like that, and then it would bring all their selections into the "Path" box, separated by commas. Then when they click "Add" it could duplicate all the other properties in the box and make a row in the table for each path below.

Or I could allow the user to select a folder instead of multiple files, with the assumption being it would load every file in that folder into the table and duplicate properties.

Is this the sort of thing you guys envision? If so, I'd lean towards the latter, but welcome your feedback.

One complication: currently Hart and Dominion ask the user to select a folder instead of a file (since these formats are collections of multiple files). Is there actually a use-case for this for Hart and Dominion, or is it mainly for the other providers?

If there's no use-case, I could just disable the "select multiple" button for these. If there is a use-case, that could be tricky... it might be possible to make a list of each sub-folder in the folder selected. I think this would potentially be a confusing UX though. Please let me know what you think.

chughes297 commented 2 years ago

I lean towards the latter also - I think the way people phrased this during the user group was having multiple ES&S style files in a folder which they wanted to upload all at once (because they all have the same overvote, undervote, etc settings).

One note on your complication: I imagine a use-case for Hart and Dominion where we have multiple Hart/Dominion CVR folders from different counties, in which case the user needs to be able to select multiple folders. This is not happening in practice yet but I expect it will become an issue if/when more states adopt RCV statewide.

rrojas350 commented 2 years ago

Thinking about it, I actually prefer the first route. It feels more intuitive than selecting a folder full of CVRs and gives the user more control over what is selected.

As for the complication, it may be best to leave Hart and Dominion as single selections. If RCTab is used to tabulate a statewide election, I imagine the centralized location would have an easier time verifying what is uploaded if they work one file/county at a time.

tarheel commented 2 years ago

Given that this is merely a convenience feature (because the user can always just add files one at a time), my preference is that if we're going to add any new functionality here, we do it in a way that keeps the UX pretty simple. I guess for the formats that are single files the user ideally would be able to select one file, multiple files within a folder, or an entire folder of files; and for the folder-based formats, the user would be able to select one folder, multiple folders within a folder, or an entire folder of folders. But I'm not sure how cleanly this will work across different OSes.

There's also the question of how this actually gets implemented. The simplest would be that if the user selects multiple sources in the chooser, the UI translates that into a set of distinct CVR source entries in the config (i.e., it looks the same as if they'd added them one at a time). That would mean that all of this is just a UI-only change...

HEdingfield commented 2 years ago

@tarheel the problem is that when a user presses the button, we have to decide in advance whether it's going to summon a DirectoryChooser or a FileChooser; it can't be both, AFAIK. Implementation would be as I described above so, yes, it would ultimately appear as if they'd been added one-at-a-time.

So we've got two votes for the latter route I described, and one for the former (@rrojas350: another thing to consider about the former is that a user would need to know that they can hold down shift and select multiple, or click on multiple, which is not immediately apparent).

Any other opinions? This is going to be a bit tricky to orchestrate, so I don't want to get started on it until we have a clear vision of which way to take it.

rrojas350 commented 2 years ago

I don't mind being out voted on directory vs file, but file gives the user more of a sense of control over the process and in my experience EL admins prefer that sense of control on what's being loaded into their tabulation system.

Still, admins can always remove unnecessary CVRs or adjust processes as needed if we go the directory route. Directory also has the added benefit of working for both file and folder style CVRs.

HEdingfield commented 2 years ago

Directory also has the added benefit of working for both file and folder style CVRs.

This is true, and from what @chughes297 says, it sounds like it could be useful. I think what I'll aim for is:

Still open for critique; I'll indicate here when I actually start working on it.

moldover commented 2 years ago

No strong opinion here, but I'd say not crawling unless you have to. If feels non-standard and not explicit. So for file-based formats use the standard JavaFX multiple file chooser, and set the button text to "Select Files".

For folder-based formats what you propose sounds good to me.

tarheel commented 2 years ago

I'm inclined to agree with @moldover that crawling, while it would be cool, would be a bit too magical for most users, and we should just use the multiple file chooser. (Although I agree that this chooser is not super intuitive, at least on macOS. So we might want to inject some explanatory text or at least mention it in the docs.)

For Hart/Dominion: looks like JavaFX doesn't offer a multiple directory chooser. I'd be OK just not supporting this feature for these formats... or doing what you suggested.

HEdingfield commented 2 years ago

Thanks everyone for the feedback. It seems like the path (hah) of least resistance is to just change the non-Hart non-Dominion file choosers to allow the user to select multiple. They'll need to do this by holding down Shift or Ctrl, so I'll add a note on that in the docs.

The Hart and Dominion directory chooser will remain as-is for now, which should hopefully be fine per @rrojas350's comment here.

However, there is a workaround if the user manually types in the directory paths and puts a semicolon between each one; that should actually work ok.

@chughes297 if we end up needing this ability using the directory chooser dialog itself for Hart and Dominion somewhere down the line, we could attempt to implement it using the "crawling" idea I had above, but it could be a bit messy to get into as @tarheel and @moldover mentioned.