podlite inspirations - table #1839
                  
                    
                      amitu
                    
                  
                
                  started this conversation in
                Ideas & RFCs
              
            Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note: Only the table part of this discussion is worth considering, other stuff are already handled by other "better" proposals.
Went through https://podlite.org/specification, and it sparked some ideas:
Table
We should borrow table syntax from them, as thats neater than the corresponding "markup" syntax.
ftd.tablebody 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.tablewill have to make sure that each row has same number of columns, and therow-span,column-spanhave meaningful values.We can easily nest ables here.
Tables Over Data
Here the data must be a list of
Tandsome-componentmust take only one non optional argument, typecaption T. Bothsome-header-componentandsome-componentshould useftd.rowas 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.tablefor example, as a special compiler hack tho, we do not have to expose generic as a user accessible feature just to implementftd.table.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}.Beta Was this translation helpful? Give feedback.
All reactions