OpenVAA / voting-advice-application

An open-source platform for creating Voting Advice Applications (VAAs)
https://demo.openvaa.org/
GNU General Public License v3.0
8 stars 0 forks source link

refactor: Svelte static and dynamic component separation #537

Open kaljarv opened 1 month ago

kaljarv commented 1 month ago

Some of the components used can easily be consider ’dumm’ or ’static’ in that the require no other data except their explicit properties, translations and the ability to create tracking events. Some, on the other hand, require deep access to the app’s internal state and data, which is unwieldy to provide as props.

The components ought to be divided into clear categories with differing access to these.

Components and templates currently used

See a list of all the components and templates currently used in both apps.

Preliminary categorisation

Category Access Contexts E.g.
Static localSettings • i18n • analytics global <Button>
Dynamic (Voter) localSettings • i18n • analytics • remoteSettings • vaa-data • writable voter stores global • data • voter <EntityDetails> • Voter app start page
Dynamic (Candidate) localSettings • i18n • analytics • remoteSettings • vaa-data • writable candidate stores global • data • candidate <PasswordSetter> • Candidate profile page

See #536 for more information on the contexts.