It made me think about an idea for KVision. What d...
# kvision
t
It made me think about an idea for KVision. What do you think about allowing custom html tag for custom components? It's a kind of angular approach but it would make html more readable and navigable. Somethign like:
Copy code
<tabpanel><tab><mycomponent><mycomponent></tab></tabpanel>
We often write custom components and it would help new developer to easily find the component in the source code.
r
But there is
CustomTag
component in KVision. Do you have something different on your mind?
t
I would prefer to have the option to set custom tag on all components, we usually extend
SimplePanel
It could default to
div
when it is not set.
Copy code
class MyComponent : SimplePanel() {
    override val customTag = "custom-tag"
}
would produce:
Copy code
<custom-tag></custom-tag>
or optionally it can be derived from component classname:
Copy code
class UserProfile : SimplePanel() {}
would render:
Copy code
<user-profile></user-profile>
It would also help with styling (no need to add extra class), we often add class which is specific for component:
Copy code
class UserProfile : SimplePanel(classes=setOf("useprofile")) {}