Topic on User talk:MSchottlender-WMF/ooui-doc-draft

Working on OOUI itself

2
Lucas Werkmeister (WMDE) (talkcontribs)

While working on T218229, I couldn’t find any information for developers working on OOUI itself. I put together a draft at User:Lucas Werkmeister (WMDE)/Working on OOUI, but it’s not great (I assume there must be some better build step than a full grunt build, or perhaps the HTML should use some other JS file that will automatically pull in everything?). If you think something like that would be useful in the OOUI documentation, feel free to use what’s on that page :)

MSchottlender-WMF (talkcontribs)

Unfortunately, right now, we are all "stuck" with using the grunt build method. There's a grunt quick-build but from my experience, it's really insufficient. It skips images and a few other things that, in theory, are unnecessary for a quick test of the script, but in effect it tends to be buggy. You can try it, maybe it'll work for what you're trying to do? :\


I usually run the OOUI demos locally while I work on OOUI. So, I clone the OOUI repo and then run

npm install and grunt build . Then, I open the oojs-ui-folder/demos/index.html in a browser.

If I'm fixing a bug, I first try to reproduce it in the demos. If the bug involves a specific set of configuration, I change one of the widgets to have that config (or add another instance of it with the new config). Then I work with the ooui files, and run grunt build, and recheck the demo.


If I am creating a new widget, I add that widget to the demos (which is good to do anyways!) and then test it through the demos page.


I find that I have to run grunt build mostly because the .less files must be compiled, and I usually have at least some changes there. It's not an ideal way to work, but I think it might be easier and better than pulling the files manually, and working with the npm package separately.


Reply to "Working on OOUI itself"