[Bug 47518] Thumbnails that are inline should break paragraphs

2013-07-12 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

C. Scott Ananian wikime...@cscott.net changed:

   What|Removed |Added

   Assignee|mtrac...@member.fsf.org |wikime...@cscott.net

--- Comment #17 from C. Scott Ananian wikime...@cscott.net ---
Adopting this bug, just in case it is re-opened.  I am king of all images!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-07-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

Andre Klapper aklap...@wikimedia.org changed:

   What|Removed |Added

  Component|JS/General  |General

--- Comment #16 from Andre Klapper aklap...@wikimedia.org ---
[Parsoid component reorg by merging JS/General and General. See bug 50685 for
more information. Filter bugmail on this comment. parsoidreorg20130704]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-06-05 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

ssas...@wikimedia.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #15 from ssas...@wikimedia.org ---
Please reopen if this is still an issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #14 from ssas...@wikimedia.org ---
To further clarify:

123 figure/ 456 and p123/p figure/ p456/p render identically in the
browser modulo any CSS styles set on p-tags.  We verified this on en.wp.org and
the difference is in a small bottom margin on p-tags.  However, this can fixed
in two ways:

1. gwicke indicated that VE wraps all plain text into p-tags anyway, so would
this take care of it?  Can we verify this on the VE end?

2. Since figure only shows up in Parsoid's output, not PHP parser output, could
this be equivalently fixed by adding some appropriate top/bottom margin on
figure as required?

We could fix this in the p-wrapper, but it seems unnecessary and we are keen to
avoid adding special cases in addition to what already exists in the code to
deal with PHP parser oddities and old hacks.  Special cases add longer-term
maintenance headaches.  So, if that could be avoided by (1) and/or (2) above,
that would be the best solution all around given that current Parsoid output
RTs correctly and is valid HTML as gwicke indicated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #10 from Inez Korczyński i...@wikia-inc.com ---
In VE we create new DOMDocument from htmldom that we receive from Parsoid and
we don't want browser to modify it (break the flow) cause based on that
DOMDocument we create our data model - then we create view nodes and render
them.

Btw. as far as I know breaking the flow before/after figure will vary in
different browser and also based on CSS (display: inline, etc.).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #11 from Gabriel Wicke gwi...@wikimedia.org ---
(In reply to comment #10)
 In VE we create new DOMDocument from htmldom that we receive from Parsoid and
 we don't want browser to modify it (break the flow) cause based on that
 DOMDocument we create our data model - then we create view nodes and render
 them.
 
 Btw. as far as I know breaking the flow before/after figure will vary in
 different browser and also based on CSS (display: inline, etc.).

Our current output for this example is plain text (not inside a paragraph)
interspersed with the figure. This is not broken up in the DOM by any browser.

Can you describe why this result is not acceptable for VE?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #12 from Inez Korczyński i...@wikia-inc.com ---
I so no reason to keep Parsoid and Parser outputs inconsistent for that case.

Output 123figure/456 and p123/pfigure/p456/p will render
differently in browser - and we want to avoid that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #13 from Gabriel Wicke gwi...@wikimedia.org ---
(In reply to comment #12)
 I so no reason to keep Parsoid and Parser outputs inconsistent for that case.
 
 Output 123figure/456 and p123/pfigure/p456/p will render
 differently in browser - and we want to avoid that.

The difference is hardly noticeable unless there is custom styling though.
Without the paragraphs, this round-trips already and is valid HTML.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

Mark Holmquist mtrac...@member.fsf.org changed:

   What|Removed |Added

 CC||i...@wikia-inc.com,
   ||mtrac...@member.fsf.org

--- Comment #4 from Mark Holmquist mtrac...@member.fsf.org ---
It's useless because the figure will break out of the inline context and do
unexpected things. Sorry for being less than clear about it.

Adding InezK because he was the original reporter IIRC.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #5 from Inez Korczyński i...@wikia-inc.com ---
I agree with what Mark said in the first comment:

Lorem [[File:Blargh|thumb]] ipsum

should produce

pLorem/p
!--Thumbnail goes here--
pipsum/p

Actually the most common usage that I noticed is putting thumb image at the
beginning or the end of the paragraph, for instance:

[[File:Wiki.png|thumb]] Lorem ipsum

which in my opinion definitely should produce two block elements (as siblings).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #6 from Gabriel Wicke gwi...@wikimedia.org ---
I tried ignoring figure and figcaption elements in the ParagraphWrapper:
var isBlockToken = Util.isBlockToken(token) 
token.name !== 'figure' 
token.name !== 'figcaption';

This wraps the entire line into a single paragraph, but the treebuilder (sadly
not our own, but FF's) then breaks it into pfoo /pfigure/figure
barp/p.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

Gabriel Wicke gwi...@wikimedia.org changed:

   What|Removed |Added

   Priority|Unprioritized   |Normal

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

C. Scott Ananian mediaw...@cscott.net changed:

   What|Removed |Added

 CC||mediaw...@cscott.net

--- Comment #7 from C. Scott Ananian mediaw...@cscott.net ---
Doesn't the tree builder do this automagically if we use figure elements for
the image?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #8 from Gabriel Wicke gwi...@wikimedia.org ---
See my comment above: Ours doesn't (HTML5 lib), FF's does.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #9 from ssas...@wikimedia.org ---
This should be possible to fix -- but requires additional tweaking of the
p-wrapper. 

Tweaking the 'isBlockToken' by itself is insufficient since the output is
wrapping everything in a single para whereas we effectively need p-breaks
before and after the figure.

We will probably need a special case in the p-wrapper for figure.

But, the question is if we need pLorem/p figure .. /figure pIpsum/p
really if browsers treat the figure tag as a block element.  Doesn't Lorem
figure .. /figure Ipsum? give you the same thing since the browser should
break the flow before/after figure?  Or is figure a flow element?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-05-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

Gabriel Wicke gwi...@wikimedia.org changed:

   What|Removed |Added

   Priority|Normal  |Low

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-04-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #1 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Related URL: https://gerrit.wikimedia.org/r/60378 (Gerrit Change
I47ac2c0e73331bb6829427d58138984337df14e0)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-04-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #2 from ssas...@wikimedia.org ---
Ignore this -- I used the wrong bug id in the commit message.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47518] Thumbnails that are inline should break paragraphs

2013-04-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47518

--- Comment #3 from Gabriel Wicke gwi...@wikimedia.org ---
There is a trade-off between round-tripping and ease of editing / conformance
to the PHP parser behavior here. You are right that the PHP parser creates two
paragraphs, so it might make sense to emulate that behavior. We will however
need to find a way to still cleanly round-trip content like this.

To me it is also not self-evident why the current behavior is 'useless'. Could
you elaborate on that?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l