feat: '+ Add column' button at the right end of the table

Summary

  • Adds a discoverable, full-height column-shaped affordance ("+ Add column") at the right end of every table — adding a column was previously buried inside the "Templates and columns" modal toolbar button, where most users never look.
  • Click opens a popover with: (a) quick-add list of currently-hidden built-in columns (Source, Original filename, Lens, Focal length, Date taken, Camera location, Object location, Location of creation), (b) inline Wikidata-property search (mirrors the existing autocomplete pattern), (c) "Custom wikitext-template column" entry-point that opens the Templates-and-columns modal at the Columns tab with the inline custom-form auto-expanded, (d) "More options →" link to the full Templates-and-columns modal.
  • All add-paths route through the existing addCustomProp / toggleColVisible / addTemplateColumn handlers — no new persistence wiring. The existing "Templates and columns" toolbar button keeps working unchanged.

Phabricator

  • T426421 — Add a discoverable 'New column' button at the end of the table

Test plan

  • Open preview, verify the "+ Add column" button appears at the right end of both the stash table and the history table.
  • Click the button — popover opens, anchored under it.
  • Quick-add: click any hidden built-in column (e.g. "Source"). Column appears in the table; popover closes.
  • Wikidata property search: type "creator" — creator (P170) appears, click/Enter to add. Column appears as creator (P170); popover closes.
  • "Custom wikitext-template column" link: opens the Templates-and-columns modal at the Columns tab with the custom-form auto-expanded; the form is scrolled into view.
  • "More options →" link: opens the Templates-and-columns modal at the Columns tab with the form collapsed (existing behavior).
  • Outside-click closes the popover. Escape closes the popover.
  • Reload the preview — added columns persist (via existing colState save flow).
  • Verify on Groups view: each per-group mini-table also has the button (since Table is reused).
  • No regressions on the existing per-column chevron-triggered settings menu, header sort, drag-resize, or the "Templates and columns" toolbar button.

🤖 Generated with Claude Code

Merge request reports

Loading