View should optionally not create another layer in the DOM Tree

11 posts, 3 answers
  1. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 28 Mar 2013 Link to this post

    If  view is rendered, it creates an additional layer in the DOM. With "tagName" the specific element can be configured. I prefered, if this layer could be omitted entirely.

    In all my recent SPA-related work this layer was not needed at all. Typically the layout has a "section" as the point of insertion, and the view has a "div" as the outer element.

    Michael G. Schneider
  2. Holger
    Holger avatar
    77 posts
    Member since:
    Nov 2012

    Posted 28 Mar 2013 Link to this post

    I would like to second Michael's suggestion, the wrapping HTML element that is created for the view should be optional.

    The only benefit I can think about this element is when it comes to destroying/removing views, then that element including the contained view can simply removed from the DOM.

    In addition to make the wrapping element optional, I would like to suggest to add an option to apply styles, e.g. class or other attributes, to it.

    Regards,
    Holger
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 29 Mar 2013 Link to this post

    Hello,

    Thank you for the feedback. The destroy/removing feature will work without the wrapping element, in fact - but it might be confusing (but not that much in the jQuery world) if the view element property actually contains more than one element. We will consider these suggestions in our next iteration. 

    Holger, currently the recommended time to customize the view element would be in the view init event handler. 

    Kind regards,

    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 29 Mar 2013 Link to this post

    Hello Petyo,

    thanks a lot for the answer.

    In all my SPA-testing during the last couple of weeks the view never contained a list of elements at its top. There always was a single div, or something similar like section or article. This topmost element was there for good reason. It had an id, it had certain classes, it was the starting point for styling,

    So from a practical standpoint, I am sure that most of the time there will be a single top element.

    Michael G. Schneider
  6. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 02 Apr 2013 Link to this post

    Hello guys,

    Thank you again for the suggestion. I logged the idea in our internal system and we will do our best to provide such feature as soon as possible.
     

    Regards,

    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 08 Apr 2013 Link to this post

    The release notes for 408 tell...

    What's new
    The wrapping HTML element that is created for the view should be optional

    How can I achieve that? I tried by setting "tagName" to an empty string and to undefined. None seems to work.

    Michael G. Schneider
  8. Holger
    Holger avatar
    77 posts
    Member since:
    Nov 2012

    Posted 09 Apr 2013 Link to this post

    Hi Michael,

    FYI: After looking into the sources I discovered that there is now an option field named wrap that can be set to false to omit the wrapper element.
  9. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 09 Apr 2013 Link to this post

    Hi Holger/ Michael,

    That is correct - the wrap configuration option is the newly introduced feature we have been discussing.  

    Regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 09 Apr 2013 Link to this post

    Hello Holger and Petyo,

    @Holger, thanks for looking into the sources.

    @Petyo, a generic question: will the documentation be updated for each internal build? Or will it only contain what is available as OpenSource?

    Michael G. Schneider
  11. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 10 Apr 2013 Link to this post

    Hi Michael,

    In general, we don't introduce new features in internal builds (or in Service Packs, for that matter), so documentation does not follow the internal builds. However, in that case I think that it is safe for the docs to be updated - please see the updated info here

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  12. Answer
    mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 10 Apr 2013 Link to this post

    Hello Petyo,

    perfect, thanks a lot for the information.

    The situation is a little bit difficult, as the OpenSource customer does not have access to the "wrap" property (if I understand the licensing issues correctly). So he might be confused, when reading the documentation. However, the paying customer wants to have a consistent documentation.

    Michael G. Schneider
Back to Top
Kendo UI is VS 2017 Ready