Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13717 closed defect (fixed)

Missing closing ) in variables.less

Reported by: Enzo Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

In claro theme, there's the wonderful variables.less, with a generic syntax, that let parsing possible.

However, for better parsing, is it possible to correct the following line:

// Arrow buttons (stand alone, or inside ComboBox / ComboButton / Spinner / etc.

by:

// Arrow buttons (stand alone, or inside ComboBox / ComboButton / Spinner / etc.)

by adding just a closing ')' indeed.

Therefore, a parser will be able to understand "Arrow buttons" as a section and everything into brackets (stand alone... etc.) as some notes for this section

Change History (7)

comment:1 Changed 8 years ago by Enzo

Or, another option, maybe a better one, you can change the line:

// Arrow buttons (stand alone, or inside ComboBox / ComboButton / Spinner / etc.

by

// Arrow buttons
// stand alone, or inside ComboBox / ComboButton / Spinner / etc.

That way, a parser understands "Arrow buttons" as a section and any comments right below it as notes for this section

Last edited 8 years ago by Enzo (previous) (diff)

comment:2 Changed 8 years ago by ben hockey

i don't think its a good idea for you to try and parse the comments in that file as having some meaning. i don't think there's any guarantees that in the future the comments will be kept in the same format or even updated when changes are made.

comment:3 Changed 8 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Milestone: tbd1.7

Yah, that seems weird to expect a certain format. When you say "a parser" I assume you are talking about your own parser, rather then functionality built-in to less?

Of course, I can adding the missing right parenthesis.

comment:4 Changed 8 years ago by bill

Owner: set to bill
Resolution: fixed
Status: newclosed

In [26295]:

fix typo in comment, fixes #13717

comment:5 Changed 8 years ago by Enzo

Thanks for correction,

I understand the remark of neonstalwart,

but then, is it possible to force the format of the comments in variables.less ? in order to let parsing possible

Or a better way is maybe to add a variables.xml that takes all the variables, and for each give its section and the documentation of this variable.

In that way, it would be possible to have a consistent documentation for each variable found in variables.less, sorted by section

Just an idea...

Does it deserve a feature request ?

comment:6 Changed 8 years ago by ben hockey

my 2 cents... i don't think so. we can barely manage to keep the javascript properly documented. i don't think we want to be bound to commenting "utility" files in a specific format. variables.less is a matter of convenience and needing to format it in a particular way or adding an xml file is not a convenience - it just adds more complexity that's not needed imo.

you can maintain your own version of variables.less that is formatted however you prefer if you have some use for it.

comment:7 Changed 8 years ago by bill

See also #12306.

IIRC we've had discussions in the past to have javadoc-ish comments for CSS. I can understand the reason.

Note: See TracTickets for help on using tickets.