[Freeipa-devel] [PATCH] 240-252 AMD modules and Web UI build

Petr Vobornik pvoborni at redhat.com
Thu Jan 17 13:01:41 UTC 2013


On 01/17/2013 04:24 AM, Endi Sukma Dewata wrote:
> On 1/8/2013 11:46 PM, Petr Vobornik wrote:
>> This patchset does following things:
>>   * integrates Dojo library into FreeIPA Web UI
>>   * encapsulates UI parts by AMD definition so they can be used in build
>> process and by AMD loader
>>   * introduces Dojo builder for building Web UI and UglifyJS for
>> minimizing JS
>>   * contains help and build scripts for developers and a make process
>>
>> Overall it makes final application smaller, faster loadable and it's a
>> foundation for additional refactoring.
>>
>> More information in design page:
>> http://www.freeipa.org/page/V3/WebUI_build
>>
>> https://fedorahosted.org/freeipa/ticket/112
>>
>> These patches introduce one regression: extension.js file isn't used. I
>> want to fix it in #3235 ([RFE] Make WebUI extensions functional just by
>> adding files). Which I will implement after I finish #3236 ([RFE] more
>> extensible navigation) on which I'm working now.
>
> Nice work! They seem to be working fine so it's ACKed.

I found a little error - there is a jsl problem in dojo.profile:86 - 
comma at the end of a list. Updated patch 243 attached.

> I have some questions though:
>
> 1. Patch #241 includes another patch
> (001-dojo-build-pvoborni-01-Make-dojo-builder-buildable-by-itself.patch). Is
> there an instruction how and where to use the patch?

The patch is automatically applied by dojo-prep.js (with --all option) 
when one wants to build the builder. We might consider to send this 
patch to dojo upstream (requires CLA).

The use case is described here: 
http://www.freeipa.org/page/V3/WebUI_build#Make_new_Builder_build


> 2. Is there a way to disable uglify in case we need to debug with Firebug?

Currently no. I found myself that I have needed it only when I was 
trying to figure out what is the output of the builder or some build 
debugging (what modules are actually used).

What's your use case with Firebug? If I want to debug, I would use plain 
source codes and send it to the test server [1] or I would use the local 
file modes [2]. The output of the builder is quite ugly to debug.

If it's really useful we might add some option to make-ui.sh, should be 
easy.

[1] 
http://www.freeipa.org/page/V3/WebUI_build#Copy_source_codes_of_FreeIPA_layer_on_test_server
[2] 
http://www.freeipa.org/page/V3/WebUI_build#Set_environment_to_debug_source_codes_of_FreeIPA_layer_using_offline_version

>
> 3. Is it possible to set breakpoints in AMD modules in Firebug, for
> example line 44 in widget.js?

Yes.

>
> 4. Calling change-profile.sh allsource modifies the install/ui/js/dojo.
> Should they be included in .gitignore? Or is there a way to select the
> profile without modifying any files included in git (e.g. using
> parameter)? The concern is that the changes could accidentally get
> checked in and affect the official build.
>

change-profile.sh has option --git-ignore which marks those symbolic 
links with  'git update-index --assume-unchanged ' which should prevent 
this issue. Option --git-undo removes this mark.

It might be little uncomfortable, but I didn't find better method. 
Possible option is to remove those links from git repository and add 
them to .gitignore, but by using it the 'offline version' wouldn't be 
functional out of the box (checkout).
-- 
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0243-1-Minimal-Dojo-layer.patch
Type: text/x-patch
Size: 82268 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130117/7665ffcf/attachment.bin>


More information about the Freeipa-devel mailing list