Posting in these forums is disabled. These forums will be available for archive purposes. Please join the new forums at the links below:
This support forum belongs to the Accordion Gallery Module.
Accordion has a bug tracker here: http://github.com/ipeychev/yui3-gallery/issues
Page 1 of 1 | [ 3 posts ] |
First off, nice Widget, I just have one problem with it; it fails w3c validation. JeffI have two threads on this issue that might be of some interest: http://yuilibrary.com/forum/viewtopic.php@f=18&t=1520&p=4849#p4849 http://www.webproworld.com/search-engine-optimization-forum/93667-w3c-validation-yui-widgets.html#post475741 I'm asking questions about a standard way or best practise for doing this; I believe that to make it easy on the end user, it must be done in a way that is consistent in the YUI community; which is not the case now; with 3.x so new; I think now is the time to set a standard for this. By far this best way; would be to get W3C to fix their test, I'm willing to ignore the validation error for now, HTML 5 will one day be the standard and one day will pass the validation test. This way I can say that we should standardize and use the "data-", a HTML 5 standard http://dev.w3.org/html5/spec/Overview.html#custom-data-attribute, in this case "data-yui-config" or something to that effect will work. Now what I meant as far as best practices; how to format the parameters in a standard way: This code is easy for a javascript programmer to use; but for an end user, it is a foreign language; I would ask that we follow the HTML 5 standard to the tee; such that this code would be written: yuiConfig='{"alwaysVisible":true, "contentHeight":{"method":"fixed", "height":150}}'> To data-alwaysvisible="true" data-content-height-method="fixed" data-content-height="150" One problem I see in using Widgets is the end users ability to post JavaScript in Content Management Systems (CMS), it is clear that the CMS needs to be more flexible in allowing Widgets to run, this is of course another topic; but one that we need to keep in mind; not many end users can post JavaScript or even know how; so its up to the CMS to provide these tools and the Widgets designers to make them easy to use from a pure HTML solution. By the way; I was not picking on your code in my post; I was using it as an example to get my point across; its clear I'm not doing that very well. http://vetshelpcenter.com/ |
Jeff,
jflesher wrote:
First off, nice Widget, I just have one problem with it; it fails w3c validation.
Setting config parameters via custom attribute is optional, not mandatory. You have two more options: 1. Use "class" attribute - see here: http://ipeychev.github.com/yui3-gallery/gallery-accordion/build_from_markup.html. 2. Subscribe to "beforeItemAdd" event and set your config parameters in the callback. jflesher wrote:
yuiConfig='{"alwaysVisible":true, "contentHeight":{"method":"fixed", "height":150}}'>
To data-alwaysvisible="true" data-content-height-method="fixed" data-content-height="150" That is a good suggestion and I will implement it in the next version. In this way, the developer will have one more option when creating markup. |
Version 1.06 has been released.
You may use "data" attribute in order to set the following parameters:
|
Page 1 of 1 | [ 3 posts ] |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
All code on this site is licensed under the BSD License unless stated otherwise.
Powered by phpBB® Forum Software © phpBB Group