Tom, Raster thanks for comments.
Wiki: https://phab.enlightenment.org/w/ui_builders_format/
Changes:
- first letter of widget is now lower case;
- fixed indentation - 4 spaces everywhere;
- fix Resource description;
- other minor updates.
The reason I put resources separately is that I was still thinking in
Erigo scope.
You are right - resources should be right in the text.
And then gui builders should be able use API to get list of resources,
so GUI_BLDR'S own project files can be created to handle resource aliases.
As for format I like:
res("path/layout.edj")
or
@"path/layout.edj"
or
₪"path/layout.edj"
:)
...can be decided a little bit later
As for alignment in my example, I'd stick with indentation related to
parent. Don't know if it complicates implementation of generator...
part["short_name"]: table(id = "table2")
pack[0, 1, 1, 1]: image(file = "logo2.png")
part["very_long_part_name"]: table(id = "table2")
pack[0, 1, 1, 1]: image(file = "logo2.png")
Snippets:
I don't like my own suggestion either :) Need to re-think.
Yakov
On 03/30/2016 05:48 PM, Tom Hacohen wrote:
> You're a bit inconsistent on the wiki page.
> In some places you use lower case letters at the beginning of class
> names, in others upper case. In some cases you put a space after a
> class, in some not. Please take care of that.
> There are even more spacing mistakes/confusions all around, for example
> in the last example in snippets there is an extra space before Box.
>
> Content format: I know we talked about describing the "packing" in
> Eolian. We said we'd just mark functions/properties with @packer or
> something, right? Maybe mention it in the wiki.
>
> snippet: I feel like there should be a better name for that. No need to
> use the Android naming.
>
> I really don't like the way you suggested to customise snippets. I
> really don't like it. There must be a better way. Also, using the "id"
> as a type all of sudden is weird and confusing. I really dislike all of
> this, I think we need to get back to the drawing board for this one.
>
> I don't get why resources are done this way. I much prefer
> res("path/layout.edj") or even just a list of resources, why the
> "images" and "edje"? I guess for embedding edje compilation. I think
> that's wrong putting it in this tool.
>
> Looking at the format example at the end of the wiki page, it's
> inconsistent and outdated, please update it with the definitive format.
>
>
> As a side note, I don't like the way the discussions over this are being
> done. We just get random rewrites once every few weeks. Version 1, 2 and
> 3 are very different, and there's no explanation to why things were
> changed or done in the ways they were done. I have seen no comments from
> anyone on the ML or anything, just completely new versions that improve
> in some aspects are get worse in others without any specific comments or
> discussions. I expect to see something like: "we changed it to this
> because X, Y and Z. Unfortunately there was an issue with our previous
> idea that this one solves, but there are new caveats, bla bla bla."
>
>
> Other than the above (and the comments below), it looks good and is
> getting better, I'm just asking for an easier to follow process and some
> corrections. Sorry if it comes across a bit bitchy. :)
>
>
> Answers to your questions:
>
> On 28/03/16 16:04, Yakov Goldberg wrote:
>> Hello,
>> I'd like to initiate last call discussion on UI syntax.
>>
>> Wiki is here:https://phab.enlightenment.org/w/ui_builders_format/
>>
>> If you have any objections or ideas, please share.
>>
>>
>> Also some notes:
>>
>> As I understood from previous discussion, most like 4-spaced indentation.
>> But maybe we shouldn't stick with exact number? Think of case like this:
>>
>> window
>> layout
>> part["part1"]: box(id = "box1")
>> button(text="button")
>> part["long_part_name"]: table(id = "table2")
>> pack[0, 0, 1, 1]: image(file =
>> "logo.png")
>> part["short_name"]: table(id = "table2")
>>
>> Should user be able to align text like this?
>>
>> window
>> layout
>> part["part1"]: box(id = "box1")
>> button(text="button")
>> part["long_part_name"]: table(id = "table1")
>> pack[0, 0, 1, 1]: image(file =
>> "logo.png")
>> part["short_name"]: table(id = "table2")
>> pack[0, 1, 1, 1]: image(file =
>> "logo2.png")
> Decide, either:
> part["part1"]: Box
> Button
>
> Or:
>
> part["part1"]: Box
> Button
>
> Don't allow both. The second one is probably better, though a bit
> over-indented.
>
> I'd avoid things like you second suggestion, that is, aligning box and
> the tables to the same column, adds so much manual maintenance without
> any benefits.
>
>>
>> ---
>> Snippets:
>> As I said before snippets should be customizable, so user could check
>> properties, add callbacks., etc.
>> Thus updated suggested format is:
>>
>> box(id="mybox")
>> button(id="but1")
>> image(id="img1")
>>
>> window
>> layout
>> part["a"]: snippet.mybox (id="mybox1")
>> but1(text = "text", img1.file = "logo.png")
>> on("clicked", "func_name")
>> img1(file = "logo.png")
> See my comments above, I hate this.
>
>> ---
>> Should all files(paths) be defined as resources, so generator will be
>> able to generate paths properly?
>>
>> resources
>> images
>> "bg":"images/background.png"
>> "logo":"images/logo.png"
>> edje
>> "edje_res":["path/layout.edj", "path/layout.edc"]
>>
>> window
>> layout(file=res("edje_res"))
>> part["a"]: button(icon = res("logo"))
>>
> I don't understand this question, but I have commented on resources above.
>
>
> --
> Tom.
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel