jase
 admin, 2160 posts
 Cogito, ergo procuro.
 Carpe stultus!
Fri 3 Apr 2009
at 17:13
Re: Easy Tables and Grids.
In reply to Yoss (msg #8):

The +---+ makes it look better when laying it out.  It also lets you have more than two tables in one section (and even other stuff inbetween) as it's them that trigger <table> and </table>.

What other portions trigger what is subject to change at this stage, but no, a new line wasn't automatically a new table row.


Still not sure on the grid design, needs to look square'ish when composing.

[A][B][C]
[1][2][3]
[A][B][C]
... possibly looks best, though it's pretty cramped.

[ A ][ B ][ C ]

[ 1 ][ 2 ][ 3 ]

[AAA][BBB][CCC]

Might also work, I can allow both by ignoring blank lines and white space after [ and also before ].



HTML can span cells, vertically and horizontally even.  It looks like people would prefer left/right/centre alignment.
Yoss
 member, 933 posts
 A Serious Waste of Time
 The largest game on RPOL
Fri 3 Apr 2009
at 18:10
Re: Easy Tables and Grids.
jase:
The +---+ makes it look better when laying it out.  It also lets you have more than two tables in one section (and even other stuff inbetween) as it's them that trigger <table> and </table>.

It seems a bit odd to me to have to type the <st> and </st> tags and then +-+ at the top and bottom.  Why not just have <st> start the < table > tag?

quote:
a new line wasn't automatically a new table row.

Out of curiosity, how are you triggering the < tr > tag then?  Without the newline character, wouldn't everything be on the same row?

quote:
Still not sure on the grid design, needs to look square'ish when composing.

[A][B][C]
[1][2][3]
[A][B][C]
... possibly looks best, though it's pretty cramped.

[ A ][ B ][ C ]

[ 1 ][ 2 ][ 3 ]

[AAA][BBB][CCC]

Might also work, I can allow both by ignoring blank lines and white space after [ and also before ].

Ignoring the white space seems prudent in order to get the input to look like the output.  When you have variable length input strings, it will start to not line up if you don't allow white space.

Option A
[A][Bbbbbbbbbbbbb][C]
[111][2][333]
[A][B][Ccc]


Option B
[A  ][Bbbbbbbbbbbbb][C  ]
[111][2            ][333]
[A  ][B            ][Ccc]


I'm guessing Option B would "b" more popular.

quote:
HTML can span cells, vertically and horizontally even.

RPOL does not currently support "colspan" and "rowspan" as tag modifiers though, last I checked.

quote:
It looks like people would prefer left/right/centre alignment.

Defaulting to centered for the smart tables seems like it would save trouble.  If you allow tag modifiers, the smart table format will not look quite so smart any more.  I'd say keep the st simple (maybe call it "simpletable" instead?) and save the tag modifiers for the actual html version.
Rhuie
 member, 133 posts
Fri 3 Apr 2009
at 18:56
Re: Easy Tables and Grids.
I would love to use those grids, especially for tactics-heavy games like D&D 4E. Much appreciated!
jase
 admin, 2164 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sat 4 Apr 2009
at 02:20
Re: Easy Tables and Grids.
In reply to Yoss (msg #14):

(Start of line) + any number of spaces + { = <tr><th>
} + any number of spaces + (end of line) = </th></tr>
(Start of a line) + any number of spaces + [ = <tr><td>
] + any number of spaces + (end of line) = </td></tr>


Option B on its own is not an option.  By allowing any number of spaces and new lines it allows for (as I said) both.


Alhaja asked "can we even do that with html at the moment", I thought she was referring to actual html.


And read my proposed method for alignment please (msg #6).  1 character, I'm sure it won't break the bank.
megadeus
 member, 1149 posts
 'Twas brillig and the
 slithy toves...
Sat 4 Apr 2009
at 22:22
Re: Easy Tables and Grids.
What about using something like PHP Markdown Extra's simple tables. They're really easy to use and the code is already written under an open-source license (BSD-style).

Basically, one types something like the following:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

and it gets rendered like this:

First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell


I think this makes sense because it's easy to remember how to do (just use dashes and pipes) and the author can easily visualize what the table will look like when rendered.

Side note: the more I read about Markdown, the more I want to implement it in every web project I touch. (I may start another thread espousing the benefits of Markdown and make a case for Markdown-style formatting on RPoL)
jase
 admin, 2169 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 5 Apr 2009
at 00:55
Re: Easy Tables and Grids.
That's certainly a possibility, a few notes regarding it;
  • You have to have the table header.
  • You cannot use table headers anywhere else.
  • It allows alignment based on a whole column.


It certainly seems a nicer way to do it than mine, but not quite as flexible.

My suggestion can do:

{ Header 1 }[ Data 1.1 ][ Data 1.2 ]
{ Header 2 }[ Data 2.2 ][ Data 2.2 ]

... So we're probably talking about flexibility vs ease of use here, I'll you guys sort out which you'd rather.  (c;
Utsukushi
 member, 636 posts
 I should really stay out
 of this, I know...but...
Sun 5 Apr 2009
at 01:21
Re: Easy Tables and Grids.
It seems like you already have flexibility in using the standard codes...so if you're implementing easy tables and grids, whatever makes them easier is probably the way to go.

Once we have people hooked on building tables, then they can go into the FAQs and learn how to make them do tricks...
megadeus
 member, 1150 posts
 'Twas brillig and the
 slithy toves...
Sun 5 Apr 2009
at 05:05
Re: Easy Tables and Grids.
In reply to jase (msg #18):

Understood. I'm not sure how much tinkering you would like to do in terms of reverse-engineering the Markdown code (which is also available in Perl, I've just remembered), but it might or might not be possible to change the way the hyphens and pipes are parsed into html table elements.

Example:

------------------------
Data 1 | data 2 | data 2
------------------------
content| text   | stuff
------------------------

The first line of hyphens indicates the start of a table, the pipes indicate separate fields, the line of hypens between table cells indicates a new table row, and the final line of hyphens indicates the end of the table.

This gets around the question of requiring the table header be the first row.

If you wanted table headers elsewhere (e.g. the leftmost column),  you could use something like Markdown's "emphasis" or "bold" syntax: surround the desired field's text with asterisks or underscores.

---------------------------
*Header1* | data 2 | data 2
---------------------------
*Header2* | text   | stuff
---------------------------




Also, I think  I'm with Utsukushi on this one: if we want an easy way for non-expert users to make tables, the limitations you mentioned in msg#18 are reasonable concessions in the name of ease of use. Complex tables can be created by hand or using one of a number of online table-writing tools.
jase
 admin, 2170 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 5 Apr 2009
at 05:35
Re: Easy Tables and Grids.
I'm happy to implement our own rendition of what the majority wants.  Few points though;

With your modifications they're starting to look pretty similar, just different text triggers.

While I'm happy (eager, even) to come up with easy, clean and nifty ways to design tables, grids etc etc, unless some kind of code becomes the defact web-standard I'll be pretty adverse to implementing it on RPoL.  Otherwise next thing we'll be supporting UBBC, Markdown, Wiki... the list goes on.  And they'll clash plus bog down the system.
Digital Mastermind
 member, 325 posts
 7 years of Rpol,, where
 has the time gone?
Sun 5 Apr 2009
at 08:27
Re: Easy Tables and Grids.
Not the easiest thread to follow/catch up on but I can assure you that many would appreciate easier access/usage of tables.
Yoss
 member, 936 posts
 A Serious Waste of Time
 The largest game on RPOL
Mon 6 Apr 2009
at 17:47
Re: Easy Tables and Grids.
Humm, I didn't know you could detect "start of line" and "end of line" without looking for the newline character.  But since you can, I agree that's best.  So we get the following conversions.


HTML             SmartTable
<table>          [st]
</table>         [/st]
<tr>             "start of line"
</tr>            "end of line"
<th>             {
</th>            }
<td>             [
</td>            ]
align="center"   ^ placed just after the [ or {
align="left"     < placed just after the [ or {
align="right"    > placed just after the [ or {

Plus, these would all ignore white space so that users can enter the data evenly spaced (Option B in my last post) or clumped up (Option A) and it gives the same result.



I really like this implementation, jase.  Well done!  (It's better than the Markdown option, for the reasons you listed in msg 18.)

The conversions to html will be done on the fly, right?  Meaning, the simple text entry is what's stored in the database, so that when you go back to edit you don't have to suddenly deal with the html.
jase
 admin, 2183 posts
 Cogito, ergo procuro.
 Carpe stultus!
Mon 13 Apr 2009
at 02:39
Re: Easy Tables and Grids.
So the question still remains, do we prefer my suggestion:

Smarttable:

+---------------------------+
{First Header}{Second Header}
[Content Cell][Content Cell ]
[Content Cell][Content Cell ]
+---------------------------+



PHP Markdown:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell



Or some Frankenstein hybrid?  I'm happy to implement whatever, even come up with your own ideas.  I don't care what as long as it meets the major design goals: easy for users, looks like the end result.  It'd also be great if it had some minor flexibility.  There also has to be some kind of majority agreement on what's best, which we seem to be lacking at the moment.
Alhaja
 member, 223 posts
Mon 13 Apr 2009
at 02:47
Re: Easy Tables and Grids.
Vote: SmartTable
pdubs83
 member, 91 posts
Mon 13 Apr 2009
at 03:12
Re: Easy Tables and Grids.
I'm all for whatever is easiest to use and, personally, I think I'd have a hard time remembering when to use [ and ] versus { and }... I'm just thick like that though.  So... I'd shoot for the PHP version if those two options are the ones up for vote.
katisara
 member, 3953 posts
 All is hardcore
 when made with love
Mon 13 Apr 2009
at 13:55
Re: Easy Tables and Grids.
Smarttable looks pretty sharp, and looks to require fewer keystrokes (and fewer esoteric HTML codewords).

Is there any particular difference in appearance of functionality between all of these different options?
Robin
 member, 617 posts
 The old grey wyrm
Mon 13 Apr 2009
at 15:52
Re: Easy Tables and Grids.
If I was typing up a table from scratch the Markdown system would be easier for me to remember. I get mixed up over <> and [] codes already. However, if SmartTable was implemented I would constantly refer back to an example like the one in msg #24, copy&paste and edit so I got the codes right. I expect there would be a suitable example presented in the FAQs or Help so it would be easy enough to find.

I would vote for SmartTable because I like the extra option of text alignment within cells.

Whichever way this goes, thanks Jase. This will be a real boon. The current tables codes has always scared me off from using them at all.
Yoss
 member, 952 posts
 A Serious Waste of Time
 The largest game on RPOL
Mon 13 Apr 2009
at 20:08
Re: Easy Tables and Grids.
In reply to jase (msg #24):

I vote ST, but without the +------+ part.  The +---+ just adds typing for no benefit as far as I can tell.  If +-+ is what triggers the <table> tags, just change it so that the [st] tag does it instead (like in msg 23).

@kat: The SmartTable is more flexible than the Markdown.  Reference message 18 from jase.
Brygun
 member, 64 posts
 RPG since 1982
Sat 18 Apr 2009
at 21:12
Re: Easy Tables and Grids.
I just wanna say this looks very helpful.

Whatever the formatting command I do like seeing a marker for a blank cell so I can manually count the cell location.

e.g.

+-+3 (start table of 3 columns)
[1] [2] [3]
[] [] [4]

The empty markers being needed to make the 4 appear below the 3.

oh..an easy link to where ever the table manual is (once its finalized by those that know tables more than I)

This message was last edited by the user at 21:13, Sat 18 Apr 2009.

jase
 admin, 2186 posts
 Cogito, ergo procuro.
 Carpe stultus!
Mon 20 Apr 2009
at 09:32
Re: Easy Tables and Grids.
Hmm, so it seems so far we have;

3 votes for php markdown
3 (4?) votes for smarttable (1 with modifications)
2 votes for either

Leaving all decisions up to me again, are we?  (c;
bigbadron
 moderator, 10267 posts
 He's big, he's bad,
 but mostly he's Ron.
Mon 20 Apr 2009
at 09:40
Re: Easy Tables and Grids.
Smarttable +1.  Can't be leaving you with any choice.  :)
ornot
 member, 10 posts
Mon 20 Apr 2009
at 09:41
Re: Easy Tables and Grids.
Looks that way Jase.

Personally I don't use the tables at present, and don't forsee needing to. That's probably down to laziness and lack of familiarity with markup language of any kind.
cruinne
 moderator, 4939 posts
 ''Grenades cost extra.''
Mon 20 Apr 2009
at 13:18
Re: Easy Tables and Grids.
make that smarttable +1 here, too.

If we're not going to ape HTML, there's no reason, to my mind, to ape some other system.
Foryn Gilnith
 member, 546 posts
 I intend to boldly go and
 split many infinitives
Tue 21 Apr 2009
at 00:09
Re: Easy Tables and Grids.
cruinne:
If we're not going to ape HTML, there's no reason, to my mind, to ape some other system.

For website consistency, really, I'd like to second this. Mashing more than one imitation together will produce confusion. I don't really have much preference, since I'm unlikely to use either system anyway; but for the purpose of setting a design precedent I'd have to vote for smarttable - whether its current incarnation or a revised one.
Kalak_of_Tyr
 member, 4 posts
Tue 21 Apr 2009
at 08:40
Re: Easy Tables and Grids.
smarttable too
megadeus
 member, 1151 posts
 'Twas brillig and the
 slithy toves...
Wed 22 Apr 2009
at 02:14
Re: Easy Tables and Grids.
Hearing the arguments against Markdown-like tables, I rescind my recommendation to mimic Markdown's table structure.

The alternate simple table structure proposed in this thread would work just as well, and I agree that since Rpol has its own unique markup for most other features, it might as well be consistent in making up its own markup, rather than picking and choosing from a number of possibly-conflicting syntaxes.