Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add live vote register to motion/assignment-poll-detail #4565

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

reiterl
Copy link
Member

@reiterl reiterl commented Jan 22, 2025

Resolve #3986

First draft version.
Needs:
OpenSlides/openslides-autoupdate-service#1118
OpenSlides/openslides-vote-service#308

Reuse of the entitled-users-table.

@reiterl reiterl added this to the 4.3 milestone Jan 22, 2025
@reiterl reiterl self-assigned this Jan 22, 2025
@MSoeb
Copy link

MSoeb commented Jan 23, 2025

The first draft already looks good, but some changes are necessary:

  1. layout - Live Voting Register
  • Please use the existing column design with 'Single Votes' and 'Entitled users'. A separate view, as currently available, is not required.
  • Based on the previous point: The 'Single votes' column is NOT filled during an ongoing vote. The 'Entitled users' list only shows who has already voted.
  • During active voting: The text 'No results yet.' should be replaced by the text 'Voting in progress.
  • During active voting: A progress bar should be displayed below the text 'Voting in progress'.
  • During active voting: The 'Single votes' column should display a note that no data is available yet.
  1. data visualization:
  • The 'Entitled users' list MUST include all persons called to vote. This includes all participants who are in the group(s) called to vote. This also implies participants who are not present.
  • Vote delegations: Similar to the previous documentation and recording, transfers of voting rights should also be documented for nominal votes and be visible in the 'Entitled users' list already during the vote. The existing behavior can be reused here.

@reiterl
Copy link
Member Author

reiterl commented Jan 23, 2025

I chatted with @MSoeb and looked into the code.
I think the autoupdate service should provide a entitled-users-live field with the same data as entitled users at stop but live.

@reiterl reiterl assigned rrenkert and unassigned reiterl Jan 23, 2025
@reiterl
Copy link
Member Author

reiterl commented Jan 23, 2025

The current implementation uses the new poll.has_voted_user_ids field. This field provides a list of ids of user who already voted.
The live vote register should show all users, who are allowed to vote. (e.g. including users who haven't voted yet and delegates). The users who are allowed to vote depend on the poll.entitled_groups field and the delegates.
So there are some calculations needed and I am not sure how to handle the delegate to part.
I opt for these calculations to be done in the autoupdate service.

@reiterl
Copy link
Member Author

reiterl commented Jan 24, 2025

I have worked on the different parts:

  1. all users who are allowed to vote are display.
  2. delegation handling is also in place.
  3. the live vote register into the is in the mat tab
  4. in a running vote a new text is displayed
  5. add a poll progress component

Please have a look on this.

@reiterl reiterl marked this pull request as ready for review January 24, 2025 10:42
@reiterl reiterl assigned MSoeb and luisa-beerboom and unassigned rrenkert Jan 24, 2025
entries.push({
id: user.id,
user: user,
voted_verbose: `voted:true`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to always be voted:true?
If no, fix it. If yes, you may as well remove this property.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

It seems to be used from the search field and seems to be a kind of
power feature. So I added it again.
Copy link

@MSoeb MSoeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes are required.

  1. Please use the existing column (tab) design with 'Single Votes' and 'Entitled users'. A separate view, as currently available, is not required. (relevant part in image: lower red square.)
  2. Additionally more information is needed under the progress bar. Please add information about entitled users and present entitled users with numbers (see red marked area under the progress bar). Please take care, the numbers are not static and should change like the corresponding numbers does. The text should be right-alinged to the progress bar. The color should be gray, just like the words 'orange, schwarz' in the image. The information should be written in german in the following way:
  • Stimmberechtige anwesend: [right number of progress bar]
  • Stimmberechtigte gesamt: [number of entitled users]

image

@reiterl
Copy link
Member Author

reiterl commented Jan 27, 2025

To point 1. I rebuild the tab structure of the single votes and entitled users.
To point 2. This is not part of this issue. I won't solve it. @MSoeb please open a new issue for drilling on the poll-progress.

@reiterl reiterl requested review from MSoeb and removed request for bastianjoel January 27, 2025 12:16
@MSoeb
Copy link

MSoeb commented Jan 27, 2025

To point 2. This is not part of this issue. I won't solve it. @MSoeb please open a new issue for drilling on the poll-progress.

Yes, this was not previously a requirement. However, this has changed. It is now a requirement. Please integrate it.

Explanation:
Without this new information, there is no explanation as to why the progress bar and the entitled voters list show a different number. In order to be able to understand what these different numbers mean without an explanation (e.g. in the FAQ), this information is absolutely essential. This was not previously foreseeable, but was added as a new, essential requirement for the feature during the last review.

Further information:
The information that is now to be added to the progress bar should always be displayed in the progress bar. For example, even when it is visible in the autopilot.

@reiterl
Copy link
Member Author

reiterl commented Jan 27, 2025

I think, the logic with the progress bar should be handled in another issue. I will exclude the poll-progress here, because it includes misleading information.

The poll progress bar seems to deliver wrong info in this context.
@rrenkert
Copy link
Member

@reiterl The additional text requested by @MSoeb is not about progress. It repeats the numbers of the progress bar and the list view to have an explanation what the numbers are about. These number should only be in sync with another.
Can you please integrate the additional text?

Copy link
Member

@rrenkert rrenkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The progress was a required element in this view. please readd it.

@reiterl
Copy link
Member Author

reiterl commented Jan 27, 2025

I removed the poll progress part. It should be handled in another issue, I suppose.

@reiterl
Copy link
Member Author

reiterl commented Jan 27, 2025

I talked with @rrenkert about this missing two values. I will add them in the two views. @MSoeb no need for a new issue then.

Copy link

@MSoeb MSoeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found different points, that needs to be fixed or improved:

  1. By opening the entitled users tab (red square in image) during a live poll, an error appears in the console. -> Wanted behavior: Please fix error.

image

image

  1. The numbers in the progress bar and in the information beneath it doesn't match. (see examples in red squares). They don't match, because the lower number doesn't include vote delegations. -> Wanted behavior: Vote delegations should be included in the number 'present people allowed to vote. Both numbers should always match.

image

  1. Re-Positioning of the new information (marked relevant content in image). Please place the information more next to the progress bar (marked with green) . It should have more space to the content below.

image

  1. Re-Positioning of 'No data avilable'. The current position is not optimal. PLease please it, if possible, in the middle aligned to the word above. I've marked a possible area with green.

image

@MSoeb MSoeb assigned reiterl and unassigned MSoeb Jan 29, 2025
@reiterl
Copy link
Member Author

reiterl commented Jan 29, 2025

One other version of the the live vote register.
to point 1: fixed the error
to point 2: Used the same way to select to get the present number as in the poll progress component.
to point 3: changed
to point 4: add a text align center and a color gray here ( as the global no-content class)

Please test.

@reiterl reiterl requested a review from MSoeb January 29, 2025 12:39
@reiterl reiterl assigned MSoeb and unassigned reiterl Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Live voting register during long-running polls
4 participants