Since we are adding election information to Firebase gradually, how do we indicate that a division has no contests in a particular election?
Scenarios
No upcoming election node under any of the divisions
Display "We could not find any election information"
Some divisions have an upcoming election node
Display information from the election nodes found, plus "Election information not complete"
All divisions have an upcoming election node
Information is complete. Election node will have an empty list of contests if there are no contest
Example
Say a voter belongs to the following divisions:
ocd-division,country:us
ocd-division,country:us,state:ca
ocd-division,country:us,state:ca/place:palo_alto
If the upcoming election only has state contests, the country and place nodes will still have an election node, with empty contests. The UI will show just the state contests. However, say the place node does not have any upcoming election nodes, the warning "Election information not complete" will be added.
❓ Does Firebase allow empty lists? Or is it better to have a boolean noContests and set it to true?
Since we are adding election information to Firebase gradually, how do we indicate that a division has no contests in a particular election?
Scenarios
No upcoming election node under any of the divisions
Display "We could not find any election information"
Some divisions have an upcoming election node
Display information from the election nodes found, plus "Election information not complete"
All divisions have an upcoming election node
Information is complete. Election node will have an empty list of
contestsif there are no contestExample
Say a voter belongs to the following divisions:
ocd-division,country:usocd-division,country:us,state:caocd-division,country:us,state:ca/place:palo_altoIf the upcoming election only has state contests, the country and place nodes will still have an election node, with empty
contests. The UI will show just the state contests. However, say the place node does not have any upcoming election nodes, the warning "Election information not complete" will be added.❓ Does Firebase allow empty lists? Or is it better to have a boolean
noContestsand set it totrue?