Commit 4912e06
authored
revamp JavaScript on the download page
Fixes #120 three bugs:
- Remove an extra "Variant" widget.
- Remove redundant "Platform" options
- Add extension information to variants
Additionally, it replaces the current implementation to a declarative approach
similar to big-bang / React framework. The current approach is _extremely_
complicated due to its imperative nature, generating multiple selection widgets,
embedding several information in non-standard attributes of DOM elements,
and showing/hiding them via JS. This is very error prone due to multiple levels
of the selection widgets, and how the number of levels is dynamic. Additionally,
it is very difficult to modify this page.
The new approach is similar to big-bang. We supply the framework the initial
state and the toDraw function, which constructs the DOM tree based on the input
state. Each DOM element can have a handler (such as onclick) which will
transition the current state into the next state. This makes it much easier to
reason about it.1 parent ec343fd commit 4912e06
File tree
4 files changed
+439
-226
lines changed- download
4 files changed
+439
-226
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments