I used React over the weekend to familiarize myself with it. I love the idea of reusable, self contained web components... I think Allura would benefit from adopting this.
+1 On Fri, May 8, 2015 at 7:02 AM, Wayne Witzel III <[email protected]> wrote: > I've been using React.js recently and I am very happy with it. It plays > well with other scripts and it makes it really easy to plug and play > pieces of your UI without having to rewrite the whole thing. > > +1 > > -- > Wayne Witzel III > [email protected] > > On Fri, May 8, 2015, at 07:04 AM, Igor Bondarenko wrote: > > Hey guys! > > > > Every time I'm working on some small js/ajax piece of UI for Allura I'm > > thinking > > that I'm creating something fragile which can break apart in any moment > > without > > me even noticing. That's mainly because of direct DOM manipulation. The > > latest > > example of this is > https://forge-allura.apache.org/p/allura/tickets/7866/ > > where > > I needed to check a state of background task and display status to the > > user > > and > > enable/disable different pieces of UI depending on task result (this > > pattern > > actually can be found in a few places in Allura). Every time I write > > something > > like this > > > https://forge-allura.apache.org/p/allura/git/ci/master/tree/Allura/allura/templates/repo/merge_request.html#l218 > > I feel like I'm stepping on a landmine :) > > > > Does it happen to any of you? :) > > > > The reason I bring this up now is that I'm starting work on phone > > verification > > UI (#7868) and I expect some of js/ajax shenanigans there as well. I > > would > > like > > to try a different approach for dealing with the DOM, but since it > > requires > > to > > pull a new technology into our stack I can't do it before discussing it > > with > > you. > > > > There's a library that removes this pain. It's React.js. I have some > > experience > > using it and it's just a breeze for tasks like that. It is built in a way > > that > > allows to use it only for a small piece of a page, exactly where you need > > it, so > > there's no need to worry about rewriting existing code to support it and > > it > > can > > be included only on a pages that need it. It's pretty small, latest > > compressed > > version is 129K. For example our jquery-base, which we include on every > > page is > > twice that size (332K). It's BSD licensed. > > > > I don't think our current situation is *that* bad, but on the other hand > > it > > can > > restrain us from trying to build more complex things, UI wise. In my > > opinion it > > worth to try React in Allura, starting with such small problems as I > > described. > > In my case, I'm sure it will give me more confidence, that UI pieces I > > build > > work as expected. > > > > What do you think? >
