Code Monkey home page Code Monkey logo

client's Introduction

Easy to use voting advice application – create your own election compass. Free and open source.

OpenElectionCompass

Join the community on GitHub Discussions Financial contributors

OpenElectionCompass

Project state

Version 1.0.0 is still under development and coverage of automated tests is not complete. It can already be used in production. Sign up for our newsletter to stay in the loop. Join us on GitHub Discussions for technical support, questions, feature requests and chatting.

Usage

Organisation Guide: How to run your own election compass

Learn how to run your own election compass, how to come up with and validate theses, how to approach parties and how to attract the attention of the public from our Organisation Guide.

Technical Guide

Learn how the configuration files of the OpenElectionCompass are structured in our Technical Guide or take a look at the easy to use Configuration Editor to generate configurations without needing any coding skills.

Deployment on your own server

Currently, it is only possible to deploy OpenElectionCompass on your own systems. However, the process is relatively simple to be accessible for people with limited coding skills, thanks to our HTML Generator.

Learn more about deploying the OpenElectionCompass on your site

Development

Install the project and it's dependencies using the package manager of your choice:

git clone [email protected]:open-election-compass/client.git
cd client
npm ci

Compile for development with HMR

npm run dev

Compiles and minify for production

npm run build:demo # Build demo
npm run build:lib # Build the actual library / client
npm run build:nuxt # Build the Nuxt.js module
npm run build # runs all builds sequentially

Run tests

npm run test:unit
npm run test:e2e
npm run test # run all both test suites sequentially

Run linting

npm run lint # run ESLint
npm run lint:style # run Stylelint

client's People

Contributors

tillsanders avatar wilco375 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

client's Issues

Multiple party types / multi-vote elections

More often than not, multiple elections take place at the same time or voters have multiple voices in the same election (e.g. one for a party and one for a candidate). In cases where those "types" can be asked the same questions, it makes sense to consolidate them in the same election compass. Otherwise users would have to either a) use two election compasses with the same questions or b) receive results of mixed types. To improve this situation, party "types" should be introduced.

Implementation

  • Add party types as a top-level configuration option besides parties, theses, etc.
    • Types should have a singular, a plural and an alias (slug)
    • Types should be optional
  • Add support for types to the configuration editor
    • It should be possible to add multiple types, before adding parties
    • If there are any types set, a party needs to have a type
  • Document the changes to the configuration file format
  • Add support for types in the client
    • The party store should store types
    • The party store should return a list of parties by type
    • The party section should show parties by type, if any
    • The party section should allow selection of all parties of a given type
    • The match section should display results by type, if any
    • The match section should display positions by type, if any
    • The match section should only display the positions of the first X parties by default

Show results (percentages) of all parties, but highlight selected

To improve discoverability of parties, the match section should show the results of all parties while still highlighting the results of the selected parties. This behavior should not be extended to the positions, however. It would also be helpful to be able to quickly select parties from the list of results.

"Empty" parties

When parties decide to not participate, it should be possible to at least add them as an "empty" option. And provide some context as to why they didn't participate.

Implement peer-to-peer

Allow users to generate links that can be shared with friends for combinated results.

Bug: green guide button not shown for missing locales

When selecting a locale that is not supported by OEC, in most places, it falls back to the English language as expected. However, the green guide buttons that usually appears at the bottom of several sections is no longer shown in this case.

Categories and Lazy Mode

To fight user laziness and allow for a more customized experience, the OpenElectionCompass should support sorting theses in categories.

There is always at least one implicit category, the required category. Theses in this category will be asked first and it is required to answer them. After these, if more categories (e.g. 'Environment', 'Education', 'International Affairs', 'European Union', etc) are present, the user will be asked to either choose the next category or proceed to the next section (selection of the parties). A user can choose to answer as many categories as he/*/she likes.

This feature will allow use cases where it is desireable for "lazy" users to be able to move to the results more quickly, while at the same time give users the choice to customize their selection fo theses to their personal interests.

Implementation

  • Add categories as a top-level configuration option besides parties, theses, etc.
    • Categories should have a name, an alias (slug) and an optional emoticon (unicode character)
    • Categories should be optional.
  • Add support for categories to the configuration editor
    • It should be possible to add multiple categories, after adding parties and before adding theses
    • It should be possible to add a thesis to multiple categories using a select field
    • A thesis with no categories selected implicitly belongs to the default (required) category
  • Document the changes to the configuration file format
  • Add support for categories in the client
    • The thesis store should store the selected categories in order of selection and allow mutation accordingly
    • The thesis store should return a list of theses, based on the selected categories and in the order of selection, but always with the default category
    • The thesis store should have a boolean value called done
    • The thesis section should be adapted to be able to ask questions in between theses
    • The thesis section should contain a component to be inserted at the end when there are more theses that could be answered, given that the user chooses a category that contains them
      • This component should render a short explanation and the categories as a list of buttons, as well as an option to proceed to the next section (selection of parties)
      • The categories that have been chosen or only contain theses that have been answered should be disabled, slightly transparent and greyed
      • Clicking on such a button will select the category and thereby automatically add it's theses to the list of available theses and make the component disappear
      • Clicking the button to proceed to the next section will set the done flag in the theses store which will allow the user to proceed to the next section
    • The statement component should display the (first, custom) category a thesis belongs to as a badge with the emoticon in place of an font-icon
    • The main navigation component should display all theses of selected categories in the correct order
    • The GuideButton should continue to work as expected

Optionally

  • The Match component should be able to display the results differently when not all theses have been answered
    • The theses store should calculate not only the result of every party, but also (given that not all theses/categories have been answered), the maximum number of points (and percentage) a party could have lost or gained had more theses been answered
    • Instead of the simple bar chart, a box plot like visualization should be used. This will render a white area from the minimum to the maximum number of points a party could have had. The text will show the actual percentage with an added "+/- X %"
    • Below the normal results will be another chart that shows the "winners" and "losers" in every category selected, i.e. the parties with the most loss/gain of points in the respective category
    • Should contain a button that opens the category selection again to improve the accuracy of the results by answering more theses

Centralize locales

Makes it easier to add more languages and will also allow for other use cases.

Implement help widget with FAQs

  • What is the difference between neutral and skip?
  • How are the results calculated?
  • In what order do the parties appear?
  • In what order do the statements appear?
  • About OpenElectionCompass

Fix FOUC

Fix flash of unstyled content and implement two modes:

  • button / modal mode
  • no button / instant full viewport mode

Support use case of people looking to join a matching group or activity for volunteering, sport or leisure

What would be needed, so that the OEC can also be used to match users to things like: sport clubs, volunteering, group activities, charity, etc.?

  • More customizability for colors, shapes, icons, etc. #30
  • Make party selection optional #33
  • Terms like "theses" and "parties" need to be customizable #35
  • Explanatory texts need to be customizable #35
  • The matching results need to shift focus from percentage to rank
  • Possibly combine result and comparison section – statements to every question ("thesis") is most likely not needed in this scenario
  • Groups ("parties") need more possibilities to represent themselves, like pictures, contact details and links
  • Footer needs to be adapted
  • Dedicated matching algorithm (mostly for appropriate buttons)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.