Diagram Captions Should Be Fixed

Is something wrong? Do you have any suggestions? Let us know.
User avatar
Jordus
Site Admin
Posts: 1125
Joined: Fri Dec 04, 2009 6:06 pm
Rank: KGS 9k
GD Posts: 0
Universal go server handle: Jordus
Location: Allegan, MI, USA
Has thanked: 16 times
Been thanked: 116 times
Contact:

Re: Diagram Captions Should Be Fixed

Post by Jordus »

topazg wrote:Some characters are parsing badly
so the parsing of these characters is the issue? that is what I am trying to determine so I can possibly look into it.
I'm thinking...
User avatar
topazg
Tengen
Posts: 4511
Joined: Wed Apr 21, 2010 3:08 am
Rank: Nebulous
GD Posts: 918
KGS: topazg
Location: Chatteris, UK
Has thanked: 1579 times
Been thanked: 650 times
Contact:

Re: Diagram Captions Should Be Fixed

Post by topazg »

I don't know, it isn't my issue, but I know it was a complaint above and it's still the case.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

Hey Jordus,
I don't have time to fix this right now, but I know what the issue is. I modified the included php file for the diagrams to display the caption text as part of the image. This was easy to do at the time since we just construct the image from the url.

I also made word wrapping code which isn't completely bug-free. It's all in the php file, though, so if you want to take a look at the issue, it's within the php where the image is constructed for a diagram.

Probably a better solution would be to parse out the image caption and put it as text below the generated image, instead of constructing the characters as part of the image in the php file.
be immersed
User avatar
HermanHiddema
Gosei
Posts: 2011
Joined: Tue Apr 20, 2010 10:08 am
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
Location: Groningen, NL
Has thanked: 202 times
Been thanked: 1086 times

Re: Diagram Captions Should Be Fixed

Post by HermanHiddema »

The original issue is described in post #4 and is as Kirby explains: The text should not be inside the image at all:
HermanHiddema wrote:I really dislike having the caption text be part of the image.
  • It's bad style from a web standards perspective, because it ignores user settings for fonts, so you're breaking accessibility.
  • It doesn't get indexed by search engines, nor by the forum search function, so it makes it harder to find things.
  • You can't format it with the forum tools, so no italic, bold, or things like :b8: @ :w2: (very useful in captions)
It would be much better, IMO, to put a div tag around the image, set to slightly more than the width of the image for text wrapping purposes, and have the text inside that div, under the image, as normal text.
An additional reason to fix this quickly is because the current implementation is also broken, e.g:
Click Here To Show Diagram Code
[go]$$B :b7: @ :b1:, :w8: @ :b3:
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
(This is a very common usage of captions)
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

I guess I finally have some time to fix this. I'll keep my status posted here as I work.
be immersed
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

So I've modified the diagrams to use the captions as regular text. I'm still thinking about the scenario where formatting (eg. :b1:) is used within the caption.
be immersed
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

Okay, there you go:
Click Here To Show Diagram Code
[go]$$B :b7: @ :b1:, :w8: @ :b3:
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
Click Here To Show Diagram Code
[go]$$B I like :batman:
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
Click Here To Show Diagram Code
[go]$$B [i]i like italic[/i]
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
Click Here To Show Diagram Code
[go]$$B [u]and underlines[/u]
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
Click Here To Show Diagram Code
[go]$$B and weird characters: #@($*&!$)(*&!$#@
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
Click Here To Show Diagram Code
[go]$$B and [b]bold[/b] stuff
$$ +------------------
$$ | 6 3 4 . . . . . .
$$ | 2 1 O . . . . . .
$$ | . O X X . . . . .
$$ | 5 O O X X . . . .
$$ | 9 X X O . . . . .
$$ | . . . O . . . . .
$$ | . . O . . . . . .
$$ | . . . . . . . . .
$$ | . . . . . . . . .[/go]
I made the text bold by default, because it doesn't seem to look that nice otherwise. Let me know if you want this updated, or anything else.
be immersed
User avatar
HermanHiddema
Gosei
Posts: 2011
Joined: Tue Apr 20, 2010 10:08 am
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
Location: Groningen, NL
Has thanked: 202 times
Been thanked: 1086 times

Re: Diagram Captions Should Be Fixed

Post by HermanHiddema »

Kirby wrote:Okay, there you go:

I made the text bold by default, because it doesn't seem to look that nice otherwise. Let me know if you want this updated, or anything else.
Wonderful, thanks! :D

Personally, I would prefer if diagrams were put inside a box, with the caption inside it and a (faint) line around it. Not bold by default would then allow the use of bold for emphasis.

If that box would also float to the left, allowing the text to flow around it, that would be great. The current implementation results in a lot of white space next to diagrams, and thus makes posts longer than they need to be, IMO.

Anyway, this is already a huge improvement!
User avatar
Redundant
Lives in sente
Posts: 924
Joined: Thu Apr 22, 2010 3:00 pm
Rank: lazy
GD Posts: 0
KGS: redundant/silchas
Tygem: redundant
Wbaduk: redundant
DGS: redundant
OGS: redundant
Location: Pittsburgh
Has thanked: 45 times
Been thanked: 103 times

Re: Diagram Captions Should Be Fixed

Post by Redundant »

This update really messes with the formatting of the malkovich games. For example, look at big brother 3.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

Setting the surrounding div to have left float seems to mess up the layout, particularly with the stuff that's below a diagram. I will mess with the formatting and see if I can adjust it to get the behavior that you suggest.
be immersed
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

Redundant wrote:This update really messes with the formatting of the malkovich games. For example, look at big brother 3.
I think you might have caught things when I was experimenting with Herman's suggestion. I removed the float left that was requested. Does it look alright now (minus the fact that the box is too wide)? I may do some more experimenting in the near future.
be immersed
User avatar
Redundant
Lives in sente
Posts: 924
Joined: Thu Apr 22, 2010 3:00 pm
Rank: lazy
GD Posts: 0
KGS: redundant/silchas
Tygem: redundant
Wbaduk: redundant
DGS: redundant
OGS: redundant
Location: Pittsburgh
Has thanked: 45 times
Been thanked: 103 times

Re: Diagram Captions Should Be Fixed

Post by Redundant »

Kirby wrote:
Redundant wrote:This update really messes with the formatting of the malkovich games. For example, look at big brother 3.
I think you might have caught things when I was experimenting with Herman's suggestion. I removed the float left that was requested. Does it look alright now (minus the fact that the box is too wide)? I may do some more experimenting in the near future.
It's fixed.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Diagram Captions Should Be Fixed

Post by Kirby »

HermanHiddema wrote:
Kirby wrote:Okay, there you go:

I made the text bold by default, because it doesn't seem to look that nice otherwise. Let me know if you want this updated, or anything else.
Wonderful, thanks! :D

Personally, I would prefer if diagrams were put inside a box, with the caption inside it and a (faint) line around it. Not bold by default would then allow the use of bold for emphasis.

If that box would also float to the left, allowing the text to flow around it, that would be great. The current implementation results in a lot of white space next to diagrams, and thus makes posts longer than they need to be, IMO.

Anyway, this is already a huge improvement!
I have tried doing all of the things that you mentioned, but setting the box to left float seems to hurt the layout when there are multiple diagrams in a single post. For now, I am using align-block, with an added modification so that it shows up in IE.

The box seems to wrap around the image and caption, now, but as you can see, the text is not to the right of the image this way, as you desire.

If you have any suggestions regarding the left float situation, please feel free to let me know. Until I solve that issue, I'll take the other suggestions you had (box around image and text, and not bolding the text).
be immersed
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Diagram Captions Should Be Fixed

Post by daniel_the_smith »

They look great! Thanks!
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
User avatar
Joaz Banbeck
Judan
Posts: 5546
Joined: Sun Dec 06, 2009 11:30 am
Rank: 1D AGA
GD Posts: 1512
Kaya handle: Test
Location: Banbeck Vale
Has thanked: 1080 times
Been thanked: 1434 times

Re: Diagram Captions Should Be Fixed

Post by Joaz Banbeck »

Thank you, Kirby! :bow: :bow: :bow: :bow:
Help make L19 more organized. Make an index: https://lifein19x19.com/viewtopic.php?f=14&t=5207
Post Reply