Because decisions are hard for me, I made this.
- trap for NaN when only one slider
- make mobile-first with tabs or slider panes
- store previous choices to laod again
- provide a question text field to replace 'Decision Maker'
- enable deletion of reasons
- untangle and abstract choiceYtotal and choiceNtotal calculations
- replace fieldset h2 with legend and style
- branch master in "static", merge textinput into master
- delete redundant branches
- use Y N sliders instead of total sliders (line ~46)
- CSS: use classlist.add instead of
style.color
- fix long decimals in % with .toFixed(2) if choice(Y|N) contain "." as char 2
- fix NaN for initial percentages
- clear text input after entry
- multiply calculations for % by 100
- update decision totals
- increment numbers on each reason
- add input and handler to enable users to add for/against
- restrict length of reasons to a reasonable length (110 chars)
- add Open Graph Protocol data and image
- limit reasons to 7 decisions for/against to manage cognitive load/indecision
- use a component for list items
For the model, remove "for" and "against" to simplify. Just take the average or the weighted average if you add weights (0.0 - 1.0). For the interface, address each individual item in isolation to allow for a clear focus. You can present the summary on a separate page to avoid distraction. All handled via localstorage or similar.
Originally ported to Meteor from a pure Javascript prototype, now reverted to the latter because… frameworks.