vocdoni / ui-scaffold

Vocdoni's protocol UI
https://app.vocdoni.io
GNU Affero General Public License v3.0
5 stars 2 forks source link

Implement create approval voting #693

Closed selankon closed 4 months ago

selankon commented 5 months ago

Fix https://github.com/vocdoni/ui-scaffold/issues/595

Implements approval voting on process creation form.

It refactors a bit to reuse the code from Census type form and create generic components to use also on Questions pages. This is because both had same structure (a tab screen with a list of implemented an unimplemented features).

Refactor of question types

The old index.tsx that implements the logic for the single choice questions is moved inside the Question.tsx file, creating a QuestionsPage component shared between the questions types.

So using this new component it implements two new questions types:

What is refactored from Census form?

Using as example the Census.tsx component, I created the more generic TabsPage component which is basically an skeleton for a page that have:

This is how it looks like

https://github.com/vocdoni/ui-scaffold/blob/7927f33e7cb88948c417863f31ddf60f90269a17/src/components/ProcessCreate/Steps/Census.tsx#L12-L39

This component is used on the Questions step and on the Census step.

github-actions[bot] commented 5 months ago

πŸš€ Deployed on https://667bd908a7e1c4066fb3f522--vocdoni-app-stg.netlify.app

github-actions[bot] commented 5 months ago

πŸš€ Deployed on https://667bd8fff69c40d757ee730a--vocdoni-app-dev.netlify.app

github-actions[bot] commented 5 months ago

πŸš€ Deployed on https://667bd8fd7bb2cc0aab99a079--onvote-stg.netlify.app

selankon commented 4 months ago

Missing translations and we should select, by default, the "Single choice" voting, instead of none:

@jpaulet added translations and set default to single choice

elboletaire commented 4 months ago

This is still shown without proper interpolation of html tags imatge imatge