Page MenuHomePhabricator

Add "add table entry" and "edit row" for the wikitext editors as well as "edit with VisualEditor" functions to tables for simplyifing editing tables
Closed, DeclinedPublicFeature

Description

The problem:

Currently it is difficult for new editors and nonoverseeable/unclear/confusing to experienced editors to edit tables via the source editor. To see how an editor views the source editor when clicking "Edit" on a section that contains a table to edit the table see this example - it should be clear that this is not easy for new editors to make sense of and edit properly and is at least cluttered/nonoverseeable for anybody else too.

Why it is a significant problem:

  • Tables are important content of Wikipedia, featured in many articles and often displaying very useful, well/better-structured content that is sometimes making up most of an article's content and often of high interest to the readers of the article.
  • Many - afaik most - editors are using the source editor. This is partly because it has some important advantages over the VisualEditor and some things are only possible with the source editor.
  • It is important to enable high levels of contribution/editing to table-contents and make it easy for people to add new or edit entries.
  • This is one of a series of tasks that would allow (/ improve) converting the Events list of https://en.wikipedia.org/wiki/2020_in_science to a table as suggested on the page's talk page. This would also allow many more features and could make the article shorter for the reader and more useful. Converting lists to tables or something table-like could also be useful for many other lists and it would be important to make table-editing easier before converting some lists to tables or something table-like. Other issues of this series are linked under "Further issues" below.

Suggested solution:

  • At the top and bottom of a table and/or at the row that the user is hovering the mouse over display an "Add"/"+" button that, when clicked, opens the source editor with content for an additional row with empty columns in the edit field (example below) but when previewed it shows either the entire table including the new row or only the new row and the table-header.
  • At the row that the user is hovering the mouse over display an "Edit"/"pencil-icon" button that, when clicked, opens the source editor with only the selected column being shown in the edit field but when previewed it shows either the entire table including the edited row or only the edited row and the table-header.
  • For people editing with the source editor also display an option to edit via VisualEditor for tables only with an additional edit-button next to tables.

A basic example for "Comparison of display technology" of what might show in the edit field after an "Add" button is clicked (only content relevant to a new row):

|- 
| {{rh}} | 
|  
|  
| 
| 
|

The user could then add content to the columns to this much clearer, smaller part of wikitext and preview it to make sure everything is in the right columns.

The article could also specify the expected row-content in some way via a comment in the wikitext that is not displayed in the article but displayed in the edit-view. For example:

<!-- !row_template
|- 
| {{rh}} | Display technology
| Screen shape
| Largest known diagonal
| Typical use
| Usable in bright room
| {{yes}} / {{partial}} / {{no}}
-->

Additional suggestions/requests beyond the basic solution:

Users would still be able to edit the table the usual way with the source editor or change the edited row by looking at the source of the other rows. The template simplifies the most common edits to the table and if the template is not completely fit for the edited row it still makes things a bit less confusing for the editor.

However, probably only later on, there could be more advanced row_templates so that for the "Comparison of display technology" row template it somehow could indicate that the "Largest known diagonal" has two options: a) diagonal in inch and cm or b) the string "(limited only by brightness)" with a colspan=2. Such column-content-options could also be used for the yes/partial/no-column in the example.

There could also be a "copy row template"-button next to the hovered row to copy a template for the selected row. Maybe it would be best if one first has to click "add table entry"/"add"/"+"/... and then it gives the user the option to use either the default template or a template generated from a row the user can then select.

Furthermore the VisualEditor for tables could be improved so that it's possible to do everything that can be done with the source editor.

Further issues:

T258382: Fix the display of tables on mobile (responsive web design: when the user taps on a table rotate the screen for a fullscreen view) (display of tables on mobile)
T233340: Add sortability to sortable tables for readers of the mobile web site (sortability)
T181452: Add sortability to tables with "sortable" class in the Android app (sortability)

Event Timeline

Prototyperspective renamed this task from Add "add table entry", "edit row" and "edit with VisualEditor" functions to tables for the source editor for simplyifing editing tables to Add "add table entry" and "edit row" for the source editor as well as "edit with VisualEditor" functions to tables for simplyifing editing tables.Jul 20 2020, 4:35 PM

Unrelated to VE hence removing tag; though not clear which editor software this is about - see https://www.mediawiki.org/wiki/Editor for the list

When would the "suggested solutions" apply to show some buttons and in which specific editor should that happen?

Aklapper updated the task description. (Show Details)

Unfortunately closing this Phabricator task as no further information has been provided.

@Prototyperspective: After you have provided the information asked for and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!

Unrelated to VE hence removing tag; though not clear which editor software this is about - see https://www.mediawiki.org/wiki/Editor for the list

It is about the default MediaWiki editor (referred to as "source editor" here) and the VisualEditor. If it gets implemented via a new editing tool i.e. a "table editor" then this should probably still be part of these two editors.

When would the "suggested solutions" apply to show some buttons and in which specific editor should that happen?

See:

At the top and bottom of a table and/or at the row that the user is hovering the mouse over display an "Add"/"+" button that, when clicked [...]

and

At the row that the user is hovering the mouse over display an "Edit"/"pencil-icon" button that [...]

and

For people editing with the source editor also display an option to edit via VisualEditor for tables only with an additional edit-button next to tables. [...]

These buttons would be displayed when hovering over the table on a page when logged in and maybe also when logged out, similarly to the current [edit] buttons of sections to ease editing of tables.

Aklapper changed the task status from Open to Stalled.Nov 5 2020, 12:05 PM

As requested before, please define what you think is "the default MediaWiki editor". See https://www.mediawiki.org/wiki/Editor

As requested before, please define what you think is "the default MediaWiki editor". See https://www.mediawiki.org/wiki/Editor

The default wikitext editor on English-language Wikipedia - Extension:WikiEditor. And asap also the default source editor on mobile ("MobileFrontend's current wikitext editor"). This/these are referred to as "source editor" here. I referred to them as "source editor" because Wikipedia article sections show buttons "edit source".

VisualEditor referred to "2017 wikitext editor" and "VisualEditor".

Prototyperspective changed the task status from Stalled to Open.Nov 5 2020, 12:13 PM
Aklapper changed the subtype of this task from "Task" to "Feature Request".

Thanks for clarifying. Not dealing with WikiEditor in this task. Completely different codebase and a separate issue.

Aklapper renamed this task from Add "add table entry" and "edit row" for the source editor as well as "edit with VisualEditor" functions to tables for simplyifing editing tables to Add "add table entry" and "edit row" for 2017 wikitext editor as well as "edit with VisualEditor" functions to tables for simplyifing editing tables.Nov 5 2020, 12:36 PM
Prototyperspective renamed this task from Add "add table entry" and "edit row" for 2017 wikitext editor as well as "edit with VisualEditor" functions to tables for simplyifing editing tables to Add "add table entry" and "edit row" for the wikitext editors as well as "edit with VisualEditor" functions to tables for simplyifing editing tables.EditedNov 5 2020, 12:39 PM

Thanks for clarifying. Not dealing with WikiEditor in this task. Completely different codebase and a separate issue.

What do you mean? That's what the issue was mainly about. I'm referring to the editor that is shown/used when clicking on [ edit ] - or [ edit source ] depending on the user settings - in English-language Wikipedia.

Two different editors and codebases. Hence two completely different tasks to track separately. Tasks must be specific, otherwise it's impossible to track work.
This task is now about VisualEditor-MediaWiki-2017WikitextEditor, not about WikiEditor. That's why I asked which editor you are referring to.

In that case it's about both but mainly about WikiEditor. I don't know why and how many are using the 2017 Wikitext editor. If it's not a default wikitext editor it would be far less important to add this functionality to this editor - I changed the task's tag.

In that case declining, as users are free to use the VisualEditor instead of the WikiEditor if they want to use the VisualEditor table editing implementation instead of the WikiEditor table editing implementation, and as this is not feasible at all to implement.

In that case declining, as users are free to use the VisualEditor instead of the WikiEditor if they want to use the VisualEditor table editing implementation instead of the WikiEditor table editing implementation, and as this is not feasible at all to implement.

see:

Many - afaik most - editors are using the source editor. This is partly because it has some important advantages over the VisualEditor and some things are only possible with the source editor.

and

  • For people editing with the source editor also display an option to edit via VisualEditor for tables only with an additional edit-button next to tables.

Your objection only relates to the above aspects, but not the rest of the issue and did not address the former quote. Maybe the issue should be split to clearly distinguish between (these) two related proposals.