VisualEditor: Make defaultsort input field always use "real" text, not a placeholder
OpenPublic

Description

From [[Wikipedia:VisualEditor/Feedback#Editing_Defaultsort]]:

The Page Settings box displays the article title as a default "Defaultsort". But it doesn't seem possible to edit it: typing any letters removes the whole existing text, while trying to delete a few characters has no effect. Where the sort key is not identical to the article title it's usually a variation of it - delete a leading "The ", or move the given name from start to end. It's a waste to have to retype it all: we ought to be able to edit that box.

This is because the default defaultsort value (article title) is implemented as "placeholder" text. Instead, it should be normal editable text.

Upon closing the page settings dialog, the logic should be, "if defaultsort != article title, add a {{DEFAULTSORT:}} magic word, else remove existing {{DEFAULTSORT:}} if present".

bzimport set Reference to bz50002.
TTO created this task.Via LegacyJun 22 2013, 1:30 AM
PamD added a comment.Via ConduitJul 3 2013, 7:57 PM

This seemed yesterday to be fixed (I managed to edit the DEFAULTSORT of [[The New Elizabethans]] by removing "The " and retyping it at the end), but today - both this morning and just now - the problem is still/again there: to edit the DEFAULTSORT of [[Alexander Gilkes]] I had to retype it all. ~~~~

Jdforrester-WMF added a comment.Via ConduitJul 3 2013, 8:22 PM

(In reply to comment #1)

This seemed yesterday to be fixed (I managed to edit the DEFAULTSORT of [[The
New Elizabethans]] by removing "The " and retyping it at the end), but today

  • both this morning and just now - the problem is still/again there: to edit the DEFAULTSORT of [[Alexander Gilkes]] I had to retype it all.

We've not touched this code in the past two weeks; what you saw was the effect of someone setting the DEFAULTSORT actively to "The New Elizabethans" - see the diff on your edit: https://en.wikipedia.org/w/index.php?title=The_New_Elizabethans&diff=562509771&oldid=562443570

PamD added a comment.Via ConduitJul 3 2013, 9:54 PM

Thanks for the explanation! So it remains a bug - and distinctly irritating, for someone who adds a lot of DEFAULTSORTs to articles.

That said, I suppose it doesn't actually create any more work for the editor than adding the DEFAULTSORT in the old edit system: the value would always have had to be typed in from scratch.

TrevorParscal added a comment.Via ConduitMar 7 2014, 9:42 PM

What if the article "Abc" has a DEFAULTSORT set to "Alphabet", but is then renamed to "Alphabet", making the DEFAULTSORT and article title the same. Then someone opens the category editor, upon save we see that DEFAULTSORT and the article title are the same and remove it. Now you have a dirty diff.

So, we see that separating the default value of the actual value is... well, valuable.

The UX issue is that we force the user to start from scratch when editing the field. The real cause of all this is that we are using the value of text input widget to not only detect a change, but also whether to set or not.

We may consider doing something else, like having a tick to explicitly override the sorting key, and separately have a text input widget which, as requested, is populated with the default or current value.

There are a few things I'm not happy with here, however.

  • What happens when DEFAULTSORT is set to empty string?
  • It feels like we are adding too much complexity
  • If the user unticks override, does the text input widget's value get set to the deafult value, or just get grayed out (either has it's downfalls)
Jdforrester-WMF added a comment.Via ConduitAug 15 2014, 9:57 AM
  • Bug 69568 has been marked as a duplicate of this bug. ***
PamD added a comment.Via ConduitAug 15 2014, 2:56 PM

(In reply to pamdavies7 from comment #3)

Thanks for the explanation! So it remains a bug - and distinctly irritating,
for someone who adds a lot of DEFAULTSORTs to articles.

That said, I suppose it doesn't actually create any more work for the editor
than adding the DEFAULTSORT in the old edit system: the value would always
have had to be typed in from scratch.

But in the old system one could copy and paste the title from some part of the record, edit as needed (move "The" to end, replace an accented letter by plain), highlight, click on "DEFAULTSORT" from the editing menu below the edit box, and that was that. Having to retype is more work; having to retype when you can't see the original to copy from is sometimes impossible.

Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 1:22 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.