podlite inspirations #1839
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Went through https://podlite.org/specification, and it sparked some ideas:
Inline headers
Is shortcut for
Longer Caption
If there is no newline between section line, and caption, the first "paragraph" is assumed caption.
We can also start the caption in caption position and continue in next lines.
I like the later example actually.
Terse Headers
Here we have passed some headers in section line, and we have used terse syntax for adding multiple headers, z, src and id in same line using the comma as separator. This can not be used if the value of any header contains comma, in that case you have to use the
header on its own line.
Header continuation
Compare it with the older continuation proposal.
This syntax is less error prone, it does not break easily if header or caption values contains color characters.
Inline Styling
They have nice
B<text to show as bold>
syntax but I still prefer our older "markup" syntax{bold: text to show as bold}
, and we can extend it to{bold, x: 20: this is bod with x property also set}
.Table
We should borrow table syntax from them, as thats neater than the corresponding "markup" syntax.
ftd.table
body can be only a "static string" (available to compiler statically, can be reference to static variables, but not dynamic variables). For dynamic data it better to use the later syntax, instead of converting data to string and then trying to get fastn to parse the string back.complex table
We will have to make
column-span
,row-span
"universal arguments" that can be passed to any components (and compiler will make sure they are only passed when they are children of aftd.table
.ftd.table
will have to make sure that each row has same number of columns, and therow-span
,column-span
have meaningful values.We can easily nest ables here.
Tables Over Data
Here the data must be a list of
T
andsome-component
must take only one non optional argument, typecaption T
. Bothsome-header-component
andsome-component
should useftd.row
as top level elements and must have right number of children with row/column span values.For this to work we will have to support generic. We can implement generic only for
ftd.table
for example, as a special compiler hack tho, we do not have to expose generic as a user accessible feature just to implementftd.table
.Beta Was this translation helpful? Give feedback.
All reactions