[web-devel] Yesod and Tables vs Divs
Michael Snoyman
michael at snoyman.com
Thu Oct 14 18:37:56 CEST 2010
On Thu, Oct 14, 2010 at 6:03 PM, Max Cantor <mxcantor at gmail.com> wrote:
> Just throwing out every feature req that pops into my head now.. Some features of Yesod sort of require tables (fieldsToTable function in the Forms module for instance. Although there is a FieldsToPlain function, you lose a lot when you use it.
>
> Given that the trend in web design is away from tables and towards divs+CSS, will this be a problem? Even a generic fieldsWithFxn :: (form element -> rephtml) -> GForm -> GWidget (pardon my pseudo code) might solve this particular problem.
Firstly, there's nothing magical about fieldsToTable: it's built on
top of publicly accessible functions in Yesod[1]. The most relevant
for declaring your own conversion functions is mapFormXml[2].
Regarding the question of divs versus tables, I think tables still
dominate for laying out forms, though I could be mistaken. In any
event, I'd be happy to add a fieldsToDivs function if you can come up
with some good HTML I should use for it.
> Just a thought, let me know if these brainstorms are getting too spammy, I'll stop.
Not spammy at all, keep 'em coming. By the way, due to a major fiasco
with MonadCatchIO breaking things (again), I'm probably going to be
releasing Yesod 0.6 soon to gut that dependency entirely. It will also
be breaking a few other things; I'll try to give a full list at the
release. So if anyone has breaking changes they want to introduce into
Yesod or Persistent, think of them now. My hope is that 0.6 is the
last release before 1.0.
Michael
[1] http://hackage.haskell.org/packages/archive/yesod/0.5.3/doc/html/src/Yesod-Form.html#fieldsToTable
[2] http://hackage.haskell.org/packages/archive/yesod/0.5.3/doc/html/Yesod-Form-Core.html#v:mapFormXml
More information about the web-devel
mailing list