Improve header and footer
zenangst opened this issue · 1 comments
Today we have a protocol called Componentable
which is used to configure both headers and footers. I got an idea how to improve those components by making them ItemConfigurable
. That would really increase the flexibility when working with headers and footer as they can carry a lot more configurable data.
So if you looks at the JSON, instead of:
{
"title" : "My component",
"header" : "MyHeaderView",
"footer" : "MyFooterView"
}
We could do something like this;
{
"header" : {
"title" : "My Header Title",
"subtitle" : "...",
"kind" : "MyHeaderView",
...
},
"footer" : {
"title" : "My Footer Title",
"subtitle" : "...",
"kind" : "MyFooterView",
...
},
}
Essentially, both header
and footer
would take an item. This renders title
redundant.
What do you guys think? @hyperoslo/ios
I was bored so I made a branch for this if we decide to go for this suggestion. It can be found on my fork here.
It refactors the ComponentModel
to use Item
's for both header
and footer
.
With that change, we can remove Componentable
from the project completely and it
would be much easier to work with views as anything can be placed anywhere.