from what i have tested and seen there should not be a possibility to create custom wikitext-template**Scope:** Drop the custom-wikitext-template escape hatch in favour of a comprehensive, well-documented set of built-in Commons templates with a redesigned Templates-tab UI.
**Why:** "Custom wikitext-template" requires the user to know template syntax — there's no good UX for it. Every template Commons cares about is enumerable, so the right move is to enumerate them all and expose them as first-class options.
== What needs to change ==
**1. Remove all "custom wikitext-template" surface area:**
- Delete the `Custom template` radio-card option from the Templates tab (`src/columns-modal.jsx:537-543`).
- Delete the inline `+ Add custom wikitext-template column` form (`CustomColumnCreator`) at the bottom of the Columns tab (`src/columns-modal.jsx:307-312, 332-422`).
- Delete the `Custom wikitext-template column` entry-point from the new "+ Add column" popover (`AddColumnPopover` at `src/table.jsx:4912-4922` on branch `feat/T426421-new-column-button` / MR !49).
**2. Add the missing templates** so the Templates tab covers all primary file-description templates Commons uses. Currently 4 (`Information`, `Artwork`, `Photograph`, `Book` — see `src/wikitext-templates.js:40-153`); should add: `Map`, `Art photo`, `Specimen`, `Musical work`. Each needs:
- Entry in `BUILTIN_TEMPLATES` with all named parameters from its docs page.
- `fields[]` mapping each param to the matching workbench column key (or `key: null` if the workbench has no equivalent).
- `requiredColumns` + `recommendedColumns`.
**3. Redesign the Templates tab from cards to expandable list:**
- Each list row: template name (e.g. therefore the feature to add a column that way should be removed.
We already have the possiblity to select a different template.
How can we make sure to suport all the templates?`{{Map}}`) + one-line use-case description.
- Click → expand to show: live wikitext preview block (already computed by `renderTemplateBlock`), per-param table mapping `template_param` ↔ workbench column with visibility checkmark, please reasearch what templates exist"Open Commons docs" link to `https://commons.wikimedia.org/wiki/Template:<Name>`.
- Order rows by prevalence: `Information` > `Photograph` > `Artwork` > `Book` > `Map` > `Art photo` > `Specimen` > `Musical work`.
**4. and add them all to be suported.Surface field-level documentation:**
Fro each template research all the possible fealds that can be used in that template- In the expanded row, show per-param required/optional badge + the docs page's one-line "expected value" hint (e.g. ISO 8601 for `date`).
- Per-param docs anchor: `Template:<Name>#<param>`.
- Best-effort enforcement: where the workbench has a structured column (e.g. `dateTaken` is a date input, `objectLocation` is a coords pair), the existing column editor is the constraint. these would all be possible to use as a columnFree-text columns stay free-text.
it is important to be extensive in this regard because there is no flexible way for the user to add custom columns or values.
There must be documentation on the available templates and their fields and maybe more information like expected values and value constraints.**5. Back-compat:**
- Users with stored `wikitextTemplate = { id: 'Custom', body, fields }` in `User:<self>/UploadWorkbench/Preferences.json`: silently fall back to `Information` on load. Don't crash; follow those as much as posssibledon't drop their custom body without warning.
- Users with `customProps` of `kind: 'template'` (custom-wikitext columns saved as table columns): see Q-2 in the maintainer-question comment.
some UI changes in the Column modal under the template tab the template are presented in cards. thisis unmpractival make it a list and when one is selected it extends to show wikitext, values, if they are visible as columns in the table and more information on this template with a link to the documentation. order the template by prevalence.== Where in the code ==
also remove the custom wikitext from the ad new column button at the end of the table| Concern | File / range |
|---|---|
| Template registry | `src/wikitext-templates.js:40-153` (`BUILTIN_TEMPLATES`) |
| `Custom` template fallback | `src/wikitext-templates.js:229-244` (`resolveTemplate`) |
| Templates-tab UI (cards) | `src/columns-modal.jsx:447-667` (`TemplatesPanel`, `TemplateOption`) |
| Custom-column creator (inline form) | `src/columns-modal.jsx:307-312, 332-422` (`CustomColumnCreator`) |
| "+ Add column" popover entry | `src/table.jsx:4912-4922` on branch `feat/T426421-new-column-button` (not yet on `main`) |
| Wikitext rendering (downstream) | `src/api/publish.js:157-168` (`buildWikitext`) — no changes needed for new builtin templates |
| Persistence | `src/api/user-store.js` (`Preferences.json`) — read path needs the back-compat fallback |
== Acceptance criteria ==
- Templates tab no longer offers `Custom template`.
- Inline `+ Add custom wikitext-template column` form is gone from the Columns tab.
- `Custom wikitext-template column` entry is gone from the "+ Add column" popover.
- All 8 templates above appear in the Templates tab, ordered by prevalence, as an expandable list (not cards).
- Each expanded row shows wikitext preview, param→column mapping, and docs link.
- Per-param required/optional badge + expected-value hint in the expanded row.
- Existing user preferences with `id: 'Custom'` don't crash the app — fall back to `Information`.
- `npm run build` passes (undefined-identifier scanner runs first).
== Out of scope ==
- Adding new workbench column types for template-only concepts (`taxon`, `projection`, `composer`, etc.). Those params stay unmapped; user fills them via free-text or a future MR.
- Bulk migration of users' existing `customProps` of `kind: 'template'` (custom-wikitext columns). See Q-2.