Last modified: 2012-08-14 17:35:33 UTC
If I type "a" and add add a link to [[a]] on it, wikitext generated is [[a|a]]. It looks impossible to create [[a]]. A related bug (or feature request) can be the default link target should be "a", not an empty string. Maybe we can have two types or links: link to the text itself, if the link is created with a target of empty string, if you edit the string by, eg, inserting some characters in middle, the target changes; another is link to a specified page that does not change no matter how you edit the link text.
Selecting text, then clicking on the arrow that appears above the selection and choosing the link icon asks for input for the page title, with the default input as a blank string. It should have the selected text prefilled as the title.
Confirmed as still a bug in current version.
Mass-moving items into VisualEditor product
Mass-move out of "General" to "ContentEditable".
This probably belongs in the data model or serialization, rather than the editing portion.
Problem in Parsoid-side serialiser?
Is the expectation that if link text is identical to target wikipage, the dom is serialized to [[a]] instead of [[a|a]]?
That would be the most compact and canonical way to serialize the link. We'll need support for the conversion of [[a]] to [[a|b]] in the serializer too, which is currently missing. Link tails and pipe tricks complicate things further, so I think there is some fun to be had in tweaking the link handler in the serializer.
(In reply to comment #7) > Is the expectation that if link text is identical to target wikipage, the dom > is serialized to [[a]] instead of [[a|a]]? I think, if the text can be normalized to target title, then no pipe. So, use [[page_title]] instead of [[Page title|page_title]].
I assume you mean [[page title]] over [[Page_title|page title]]? Obviously this is wiki-dependent (whether $wgCapitalLinks is true or not). Also, should things like [[X (foo)|]] auto-conversion on save to [[X (foo)|X]] be supported? This won't be used by VisualEditor, but might by something else and if Parsoid is to become feature-compatible...
(In reply to comment #10) > I assume you mean [[page title]] over [[Page_title|page title]]? Obviously this > is wiki-dependent (whether $wgCapitalLinks is true or not). Given that underscores and spaces are identical to MediaWiki, I'm not sure what distinction you're making here. > Also, should things like [[X (foo)|]] auto-conversion on save to [[X (foo)|X]] > be supported? This won't be used by VisualEditor, but might by something else > and if Parsoid is to become feature-compatible... As far as I'm aware, the current thinking on the pipe trick is that it should ideally not be doing transformations on the wikitext itself and that doing so (the current behavior) is a bug, not a feature. That is, when a user enters "[[Foo (bar)|]]", the current MediaWiki parser will change this to "[[Foo (bar)|Foo]]" on page save and render the result as "Foo". In an ideal world (according to some other bug I don't care to look up), the wikitext would stay "[[Foo (bar)|]]" and would render as "Foo" (as though it had gone through the magical transformation). That said, the pipe trick is annoying (and somewhat expensive) to support and given that the broader goal is to move away from wikitext altogether, I'm not sure the pipe trick is something worth preserving going forward. But this is all outside the scope of this bug.
The (In reply to comment #11) > (In reply to comment #10) > > I assume you mean [[page title]] over [[Page_title|page title]]? Obviously this > > is wiki-dependent (whether $wgCapitalLinks is true or not). > > Given that underscores and spaces are identical to MediaWiki, I'm not sure what > distinction you're making here. The design brief for the VisualEditor/Parsoid combo is to be as close as possible to the same as real human wikitext - which means, amongst other things, writing links like a human would (and never ever changing one written by an actual human). > > Also, should things like [[X (foo)|]] auto-conversion on save to [[X (foo)|X]] > > be supported? This won't be used by VisualEditor, but might by something else > > and if Parsoid is to become feature-compatible... > > As far as I'm aware, the current thinking on the pipe trick is that it should > ideally not be doing transformations on the wikitext itself and that doing so > (the current behavior) is a bug, not a feature. That is, when a user enters > "[[Foo (bar)|]]", the current MediaWiki parser will change this to "[[Foo > (bar)|Foo]]" on page save and render the result as "Foo". Thinking by whom? It's a widely-used long-term feature. If people believe they can switch it off as a 'bug fix', I predict that users will be unhappy. Burning our social capital like this seems... ill-prioritised. > In an ideal world > (according to some other bug I don't care to look up), the wikitext would stay > "[[Foo (bar)|]]" and would render as "Foo" (as though it had gone through the > magical transformation). Didn't come up in a search for me, unless I mis-read the results. Would value the actual bug ref. if you can find it! :-) > That said, the pipe trick is annoying (and somewhat expensive) to support and > given that the broader goal is to move away from wikitext altogether, I'm not > sure the pipe trick is something worth preserving going forward. But this is > all outside the scope of this bug. I'd argue that it's not outwith the scope of a bug in the Parsoid talking about this behaviour, which is what this is. :-)
(In reply to comment #12) >> As far as I'm aware, the current thinking on the pipe trick is that it should >> ideally not be doing transformations on the wikitext itself and that doing so >> (the current behavior) is a bug, not a feature. That is, when a user enters >> "[[Foo (bar)|]]", the current MediaWiki parser will change this to "[[Foo >> (bar)|Foo]]" on page save and render the result as "Foo". > > Thinking by whom? It's a widely-used long-term feature. If people believe they > can switch it off as a 'bug fix', I predict that users will be unhappy. Burning > our social capital like this seems... ill-prioritised. I think there are some mixed signals about design goals here. I was told (repeatedly) that the goal of VisualEditor was to eliminate human interaction with wikitext. If that's the goal (and you're rewriting the parser), I'm not sure why (given the extra, non-negligible cost of supporting it) you'd continue to support the pipe trick. It's an esoteric, poorly implemented hack, as far as I'm concerned. The referenced thinking is by me and others; this isn't a new issue. And it really does seem completely outside the scope of this bug. I expand on both these points below. >> In an ideal world >> (according to some other bug I don't care to look up), the wikitext would stay >> "[[Foo (bar)|]]" and would render as "Foo" (as though it had gone through the >> magical transformation). > > Didn't come up in a search for me, unless I mis-read the results. Would value > the actual bug ref. if you can find it! :-) It's hiding under bug 5004 ("Keep the pipe trick ([[Piped link|]]) syntax in wikitext instead of converting it at pre-save transform"). I thought there was a comment from Aryeh somewhere about this as well, but I don't see it on that bug. There are a number of related bugs: bug 16714 and bug 2700. And some marginally related bugs (e.g., bug 845). These were all found by searching Bugzilla for "pipe trick", creatively. >> That said, the pipe trick is annoying (and somewhat expensive) to support and >> given that the broader goal is to move away from wikitext altogether, I'm not >> sure the pipe trick is something worth preserving going forward. But this is >> all outside the scope of this bug. > > I'd argue that it's not outwith the scope of a bug in the Parsoid talking about > this behaviour, which is what this is. :-) This bug is (or was...) about [[a]] being turned into [[a|a]] when using the VisualEditor interface (cf. comment 0). Link trails and pipe tricks (and any other parser craziness) really are separate bugs.
Mass-moving bugs into the new 'Parsoid' product.
https://gerrit.wikimedia.org/r/17917 Done. Thanks to Gabriel for the over-shoulder glances.
Verified as fixed.