This is a migrated thread and some comments may be shown as answers.

View should optionally not create another layer in the DOM Tree

10 Answers 26 Views
SPA
This is a migrated thread and some comments may be shown as answers.
mgs
Top achievements
Rank 1
mgs asked on 28 Mar 2013, 04:45 PM
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

10 Answers, 1 is accepted

Sort by
0
Holger
Top achievements
Rank 1
answered on 28 Mar 2013, 07:14 PM
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
0
Accepted
Petyo
Telerik team
answered on 29 Mar 2013, 07:50 AM
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!
0
mgs
Top achievements
Rank 1
answered on 29 Mar 2013, 08:17 AM
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
0
Accepted
Iliana Dyankova
Telerik team
answered on 02 Apr 2013, 10:49 AM
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!
0
mgs
Top achievements
Rank 1
answered on 08 Apr 2013, 02:23 PM
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
0
Holger
Top achievements
Rank 1
answered on 09 Apr 2013, 06:05 AM
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.
0
Petyo
Telerik team
answered on 09 Apr 2013, 07:46 AM
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!
0
mgs
Top achievements
Rank 1
answered on 09 Apr 2013, 09:09 AM
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
0
Petyo
Telerik team
answered on 10 Apr 2013, 12:06 PM
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!
0
Accepted
mgs
Top achievements
Rank 1
answered on 10 Apr 2013, 01:24 PM
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
Tags
SPA
Asked by
mgs
Top achievements
Rank 1
Answers by
Holger
Top achievements
Rank 1
Petyo
Telerik team
mgs
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or