Last modified: 2014-07-11 01:46:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55330, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53330 - VisualEditor: When text is being made superscripted and is already subscripted, clear the latter (and vice versa)
VisualEditor: When text is being made superscripted and is already subscripte...
Status: VERIFIED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Normal normal
: VE-deploy-2014-02-27
Assigned To: Ed Sanders
:
: 56795 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-25 21:24 UTC by Bartosz Dziewoński
Modified: 2014-07-11 01:46 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bartosz Dziewoński 2013-08-25 21:24:10 UTC
VE allows to mark text as both superscripted and subscripted (<sup><sub>text</sub></sup> or the other way). That sounds like a bad idea; such text simply ends up being displayed in smaller font.
Comment 1 James Forrester 2013-08-25 21:40:17 UTC
I don't see how this is a bug? Yes, it's bad, in the same way that setting text's colour to be white, or putting an image inside another image's caption, but that doesn't mean we should stop people doing it…

Generally, appropriate use of the software is a social thing, not a software thing. Willing to be convinced otherwise, but for now I'll mark this as a WONTFIX.
Comment 2 Bartosz Dziewoński 2013-08-25 21:44:45 UTC
Do other text editors permit that? I don't know of any that would.
Comment 3 Bartosz Dziewoński 2013-08-25 21:46:22 UTC
(Or in other words, this is not fitting users' expectations.)
Comment 4 James Forrester 2013-08-25 23:48:13 UTC
(In reply to comment #2)
> Do other text editors permit that? I don't know of any that would.
> 
> (Or in other words, this is not fitting users' expectations.)

Well, HTML lets you do this, which means VE needs to support it on the input side at the very least.
Comment 5 Bartosz Dziewoński 2013-08-26 00:26:49 UTC
As input, sure. But as output, HTML lets you do lots of things that VE doesn't.
Comment 6 Bartosz Dziewoński 2013-11-10 19:18:57 UTC
*** Bug 56795 has been marked as a duplicate of this bug. ***
Comment 7 Bartosz Dziewoński 2013-11-10 19:19:24 UTC
A dupe was just filed, this is not just me. Reopening.
Comment 8 James Forrester 2014-02-18 18:55:38 UTC
Wikitext lets you do this too. Do you think we should just silently kill all examples of this in the database? :-)

Closing again unless you can suggest (a) what should happen in VE when the user attempts this, (b) what should happen in VE when the page already has this, and (c) what should be changed in MediaWiki's PST to stop this happening in future(?).
Comment 9 Bartosz Dziewoński 2014-02-20 12:43:36 UTC
(In reply to James Forrester from comment #8)
> (a) what should happen in VE when the user attempts this

Text should be either super- or subscripted, not both.

Nesting superscripts in subscripts, subscripts in superscripts,
subscripts in subscripts and superscripts in superscripts
should be impossible, just like it's impossible to nest links in other
links. Currently only the last two are impossible.

> (b) what should happen in VE when the page already has this

The same thing that happens with all other unsupported input: it
should be alienated and left alone.

> (c) what should be changed in MediaWiki's PST to stop this happening
> in future(?).

Nothing. I suppose there are very rare use cases where this could be
wanted, we should just keep supporting them for backwards-compatibility.

In fact, the only things that I see in existing articles are currently
impossible in VE – you can't nest superscripts to produce, say,
10<sup>10<sup>26</sup></sup> (10^{10^26}) used in [[pl:Oś czasu dalekiej
przyszłości]]. Arguably this should just use <math/> tags though.
Comment 10 Ed Sanders 2014-02-20 15:46:40 UTC
I agree that the sub/superscript tool should clear any other sub/superscript annotations present. As pointed out you can't do a double superscript, so clearly our goal is not to let you create any complex hierarchy you want, that's for <math>.

I don't think we need to alienate such nested content though, in the same way we don't alienate a double bold tag (if someone used one). As long as the user doesn't try to change the sub/superscripting, the annotations will remain untouched.
Comment 11 Bartosz Dziewoński 2014-02-20 15:50:41 UTC
(In reply to Ed Sanders from comment #10)
> I don't think we need to alienate such nested content though, in the same
> way we don't alienate a double bold tag (if someone used one). As long as
> the user doesn't try to change the sub/superscripting, the annotations will
> remain untouched.

I'm willing to trust you on implementation details :)
Comment 12 Gerrit Notification Bot 2014-02-20 16:26:27 UTC
Change 114488 had a related patch set uploaded by Esanders:
Allow annotations to remove other annotations

https://gerrit.wikimedia.org/r/114488
Comment 13 James Forrester 2014-02-20 16:29:16 UTC
(In reply to Bartosz Dziewoński from comment #9)
> (In reply to James Forrester from comment #8)
> > (a) what should happen in VE when the user attempts this
> 
> Text should be either super- or subscripted, not both.
> 
> Nesting superscripts in subscripts, subscripts in superscripts,
> subscripts in subscripts and superscripts in superscripts
> should be impossible, just like it's impossible to nest links in other
> links. Currently only the last two are impossible.

This works for me. Re-wording bug for clarity – is this acceptable to you?
Comment 14 Bartosz Dziewoński 2014-02-20 16:33:42 UTC
Yeah, that's what I meant. Thanks.
Comment 15 Gerrit Notification Bot 2014-02-26 22:28:22 UTC
Change 114488 merged by jenkins-bot:
Allow annotations to remove other annotations

https://gerrit.wikimedia.org/r/114488
Comment 16 Rummana Yasmeen 2014-02-28 23:49:51 UTC
Verified the fix in betalabs
Comment 17 Rummana Yasmeen 2014-07-01 18:27:10 UTC
This is happening again, the superscript and subscript both are getting applied at the same time.
Comment 18 Bartosz Dziewoński 2014-07-02 14:56:45 UTC
I can't reproduce. Steps?
Comment 19 Gerrit Notification Bot 2014-07-02 22:50:32 UTC
Change 143756 had a related patch set uploaded by Catrope:
Follow-up: If717ef98 – Re-add subscript and superscript removes to DM nodes

https://gerrit.wikimedia.org/r/143756
Comment 20 Gerrit Notification Bot 2014-07-02 22:52:55 UTC
Change 143756 merged by jenkins-bot:
Follow-up: If717ef98 – Re-add subscript and superscript removes to DM nodes

https://gerrit.wikimedia.org/r/143756
Comment 21 Rummana Yasmeen 2014-07-10 23:13:00 UTC
Verified the fix in production
Comment 22 James Forrester 2014-07-11 01:46:13 UTC
Let's leave the bug as fixed in the original fix, not the recent minor breakage.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links