Investigate re-writing |mach try chooser| with React
Categories
(Developer Infrastructure :: Try, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: ahal, Unassigned)
References
(Blocks 1 open bug)
Details
In bug 1499822 I implemented |mach try chooser|. I used flask + jinja2 templates + jquery (because that's what I knew). Unfortunately, getting the data necessary to perform filtering into the template, and then processing it all in a JS file, ended up being pretty messy.
Part of the problem is that different kinds of tasks (builds, tests, etc) have different attributes. So I needed to come up with some filtering logic that yields a reasonable set of tests based on which tasks get clicked.
Imo, this logic ended up being very fragile. I think changing the behaviour of this app will be really difficult without breaking old expectations, to the degree that no one will want to take the time to figure out how it works. This is bad, because it replicates the try syntax situation to a degree.
From a high level, I think the problem is that I built a UI and am trying to shoe-horn data into it. From some conversations at the work week, it seems like maybe I should look into using React (I've never used it before). But React's mantra seems to be "Use data to drive your UI". From their website:
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
That certainly sounds like what we need. Definitely worth investigating.
Reporter | ||
Updated•6 years ago
|
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Probably won't happen any time soon if ever.
Description
•