Page MenuHomePhabricator

Wikitext preview + custom-template columns + publish review (!27)
Closed, ResolvedPublic

Description

Summary

Give the user direct visibility into and control over the wikitext for each file, alongside the structured data on Commons (SDC) the table edits today. The UI should let the user read, edit, add, and review wikitext — both per row during editing, and as a final sign-off step in the publish flow.

Background

Each row's data feeds two outputs at publish time: the file's wikitext page (legacy / human-readable) and SDC (modern / structured). SDC is the priority going forward, but the wikitext side still matters for backwards compatibility, legacy templates, and any cases SDC doesn't cover. Right now the user can't see the wikitext that will be generated, and can't customise it per row.

Requirements

1. Per-row wikitext preview

  • Each row exposes a way to view the wikitext that will be generated from its current values (e.g. an action in the per-row settings dropdown / detail panel).
  • Read-only is fine for v1; full inline edit can come later.

2. Custom wikitext-template columns

  • User can add a custom column whose definition is a wikitext template (e.g. {{Custom-template|param=__VALUE__}}).
  • When defining the column: the user provides the template text and marks where the cell value goes (e.g. with a placeholder like __VALUE__ or an explicit field name).
  • Each cell in that column is a free-text input; the entered value is substituted into the template, and the resulting wikitext is appended to the file's final wikitext at publish time.
  • The column behaves like other columns for sort / filter / required / column-defaults purposes.

3. Publish-stage review modal

  • Extend the existing publish-confirmation modal so that for each file the user can preview both the final wikitext and the SDC payload before committing.
  • In the publish modal, the wikitext must be editable by hand, so the user can patch any last-minute issues.
  • The modal should make it obvious which file's wikitext / SDC is being shown when there are many files.

Out of scope

  • A full wikitext WYSIWYG editor; a plain <textarea> with monospace styling is fine.
  • Server-side wikitext rendering; we're showing the source the tool will publish, not a rendered preview.

Acceptance

  • Any row exposes an action to view its generated wikitext.
  • Adding a custom wikitext-template column results in published wikitext containing the template instantiations, one per row.
  • The publish modal shows per-file wikitext and SDC, with the wikitext editable; published files reflect the user's edits.

Source

User feedback session, 2026-05-10.

Event Timeline

Daanvr moved this task from To do to Doing on the Tool-upload-workbench board.

I would also like acces to the wikitext in the table layout. without opening the details panel.

Daanvr renamed this task from wikitext preview to Wikitext preview + custom-template columns + publish review (!27).May 11 2026, 2:12 PM

Iterated per follow-up feedback: added an in-table 'Wikitext' column (visible by default, sits between the structured-data block and the EXIF block) that renders a single-line monospace snippet of the assembled wikitext and acts as a click-to-open launcher for the existing read-only preview modal. Keyboard-reachable (Tab → Enter/Space) with role=button + aria-label. Existing users get the column auto-inserted into their stored column prefs on next load via a one-shot migration in loadColumnState, so no manual columns-modal trip is needed to discover it. Build passes; CI green; preview verified asset paths under /mr-27/.
Preview updated: https://upload-workbench.toolforge.org/mr-27/

Released as v0.14.0 (MR !27 merged into main).