Page MenuHomePhabricator

Typing after a footnote in Special:ContentTranslation contenteditable results in superscript text
Closed, ResolvedPublic1 Story Points

Description

Typing after a footnote in Special:ContentTranslation contenteditable results in superscript text.

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterMake it possible to adapt references manually to an empty paragraph

Event Timeline

Amire80 created this task.Jan 3 2015, 12:09 AM
Amire80 raised the priority of this task from to Needs Triage.
Amire80 updated the task description. (Show Details)
Amire80 added a subscriber: Amire80.
Krenair added a subscriber: Krenair.
Amire80 triaged this task as High priority.Jan 15 2015, 10:24 AM
Amire80 set Security to None.
Arrbee lowered the priority of this task from High to Low.Feb 11 2015, 2:58 PM
Arrbee added a subscriber: Arrbee.
santhosh raised the priority of this task from Low to Normal.Mar 5 2015, 4:58 PM
santhosh added a subscriber: santhosh.

Observed a user can stuck at this formatting(superscript) with no way to go back to normal text mode. This is more important when it is not just MT correction but translator actually type lot of text.

Increasing priority.

Some more details: This isse happens if the superscript is at the end of content in the section. If there are content after the superscript, you can use arrow button to move cursor outside.

In Firefox, you can always go outside the superscript by pressing right arrow, even if there are no content after superscript. Chrome does not allow moving outside if the superscript is the last item in block section- causing a 'stuck' behavior

Arrbee moved this task from Long term to CX5 on the ContentTranslation board.Apr 20 2015, 6:04 AM

Can I propose a DWIM solution? If somebody types a space after a reference, it should switch out of superscript mode.

Arrbee raised the priority of this task from Normal to High.Apr 21 2015, 9:38 AM
Arrbee added a project: LE-Sprint-86.
Nikerabbit edited a custom field.Apr 21 2015, 9:47 AM

I suggested some similar solutions for T93854: Facilitate editing the text of a link (especially adding text to the beginning/end of it), I think it is something that may be worth it to solve for any kind of markup (links and superscript being the most critical).
I think that a keyboard way to escape that (using arrows, space, and escape) will be helpful. In addition to that, we can provide an extra "clear format" tool in the styling toolbar that allows users to recover some text from unintended format.

I illustrated the concepts I mentioned above:


In this example, the user moves the cursor to the right:

  • When the text cursor is inside a formatting area, the "clear formatting" action of the toolbar becomes active.
  • When the text cursor is inside a formatted area that gets highlighted when the user clicks it (like links and references, not bold or italics) the background of the element becomes subtly highlighted to communicate that the user is still editing it.
  • When the user tries to move right and reaches the limit of the available text, the formatting is removed for the cursor and the next time the user types it would be in plain text.

Especially with the interaction with text cursor movements it may be a good idea to set some set some experiment texts (e.g., using codepen) in order to check how the different interaction feels in different contexts. There may be also some technical limitations that may limit what we can do here.


In this example, the user types some text next to a reference and selects that text to make it normal again by using the "clear format" tool.

Arrbee edited projects, added LE-Sprint-87; removed LE-Sprint-86.May 25 2015, 8:12 AM
santhosh claimed this task.May 26 2015, 9:09 AM
santhosh moved this task from Backlog to In Progress on the LE-Sprint-87 board.

I found a shortcut to solve this issue. Just making the reference readonly(contenteditable=false) make sure that you can never place curser inside the superscript tag.

Change 213793 had a related patch set uploaded (by Santhosh):
Make it possible to adapt references manually to an empty paragraph

https://gerrit.wikimedia.org/r/213793

santhosh moved this task from In Progress to In Review on the LE-Sprint-87 board.May 26 2015, 9:13 AM
Amire80 closed this task as Resolved.May 27 2015, 9:03 AM
Amire80 removed a project: Patch-For-Review.
Amire80 moved this task from In Review to Done on the LE-Sprint-87 board.

Change 213793 merged by jenkins-bot:
Make it possible to adapt references manually to an empty paragraph

https://gerrit.wikimedia.org/r/213793