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

✨ Voting-booth: Support search/filter candidates feature #126

Closed
10 tasks done
ElectricPaperInformationssystemeGmbH opened this issue Jun 19, 2023 · 4 comments
Closed
10 tasks done
Assignees
Labels
enhancement New feature or request epi-1 EPI-1 project

Comments

@ElectricPaperInformationssystemeGmbH
Copy link

ElectricPaperInformationssystemeGmbH commented Jun 19, 2023

Preflight checklist

  • I could not find a solution in the existing issues, docs, nor discussions.

Suggestion

For many candidates, a different display is required (search field at the top and page-by-page display)

Proposed Implementation

  • Filter field at the top left of each question.
  • Add question extra option for this feature show_filter_field.
  • Enable using asterisks * on the filter. For example the text Sir John F Kennedy Jr would match with the search John*Kennedy.
  • Show any matches, on category,text or details.
  • Match disregarding casing, tildes and with trimming.
  • If it matches the category, show all candidates for the category.
  • If it doesn't match a category but it matches some candidates of the category, the category will appear with just the matching candidates.
  • In order to filter, add a tag to candidates.
  • Add a bouncing period of 200ms to the field so that it only filters after the user stops typing.
  • Show a soft/blue warning indicating the voting options are being filtered.
  • If it is filtered by category, the results should be displayed in one column (answer_group_columns_size: 12, answer_columns_size: 12).

Proposed Implementation Design

Image

Actual Implementation with Screenshots

In the implementation we've made a few changes:

  • The search field is not next to the title to avoid margin/centering issues.
  • The search field is on the right by default, but you can change it with custom css: .question-search-container { justify-content: flex-start; }.

You can find screenshots below and a link to an election with this feature. Note that this is a development server and how it looks could change.

Empty search field:

Image

Filter by category showing all candidates from the category and using asterisks. As it's filtered by category all is shown in 1 column.

Image

Mobile look:

Image

Filter by write-in content. As it's not filtered by category it's shown in two columns:

Image

Filter by candidate details:

Image

Filter by candidate title/text:

Image

Search for invalid option:

Image

Tasks

Tasks

Master PRs

  1. enhancement
    Findeton
  2. enhancement
    Findeton
  3. documentation enhancement
    Findeton

Additional context

No response

@ElectricPaperInformationssystemeGmbH ElectricPaperInformationssystemeGmbH added enhancement New feature or request triage needs triage epi-1 EPI-1 project labels Jun 19, 2023
@edulix edulix removed the triage needs triage label Jul 11, 2023
@Findeton
Copy link

Findeton commented Sep 6, 2023

Hi @ElectricPaperInformationssystemeGmbH could you please review the proposed implementation?

@ElectricPaperInformationssystemeGmbH
Copy link
Author

ElectricPaperInformationssystemeGmbH commented Sep 7, 2023

Hi @Findeton, thanks for the information. The design looks good. We only have one comment on this, it would be handy if we could position the search box left-aligned. We would also like to have the support of asterisk search queries and the search query must run over three parameters: category, text and details. If it is filtered by category, the results should be displayed in one column (answer_group_columns_size: 12, answer_columns_size: 12).
image

@edulix edulix changed the title ✨ Search-driven ballot (large ballots) ✨ Support search/filter candidates feature in voting booth Sep 7, 2023
@Findeton
Copy link

Findeton commented Sep 8, 2023

Hi @ElectricPaperInformationssystemeGmbH Please review the implementation, specifically the section "Actual Implementation with Screenshots".

@edulix edulix changed the title ✨ Support search/filter candidates feature in voting booth ✨ Voting-booth: Support search/filter candidates feature Sep 12, 2023
@ElectricPaperInformationssystemeGmbH

The implementation looks good. Reviewed, thank you.

edulix pushed a commit to sequentech/voting-booth that referenced this issue Sep 20, 2023
edulix pushed a commit to sequentech/ballot-box that referenced this issue Sep 20, 2023
edulix pushed a commit to sequentech/documentation that referenced this issue Sep 20, 2023
@edulix edulix closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epi-1 EPI-1 project
Projects
None yet
Development

No branches or pull requests

2 participants