Page MenuHomePhabricator

Author = uploader: 'Me (Username)' quick-select (!24)
Closed, ResolvedPublic

Description

Summary

The most common Author value for a user uploading their own work is the uploader's own Commons username. Add this as a one-click default in the Author field, so users don't have to type their username each time. The implementation must use the correct on-wiki representation of "user as author" both for Wikitext descriptions and for Structured Data on Commons (SDC).

Research first

Look up the canonical way Commons represents "uploader as author":

  • In Wikitext: typically [[User:Foo|Foo]] inside the author= field of the {{Information}} template — verify against current Commons docs.
  • In SDC: the correct property + value form (likely wikidata:P170 "creator" with the appropriate value type — confirm against Commons docs / a real recent upload).

Document the chosen forms in the task before implementing.

Behavior

  • In the Author cell editor, surface a quick-select option labelled "Me (Username)" or similar that, on click, fills the field with the correct wikitext form and (where applicable) sets the SDC creator claim accordingly.
  • Should also be settable as the column default value via the existing column-defaults UI, so a whole batch can be auto-populated.

Acceptance

  • Logged-in user opens an Author cell → sees an obvious "Me (Username)" quick-select.
  • Clicking it produces wikitext output matching what Commons expects (verified by inspecting an existing real upload's wikitext).
  • The same path produces a correct SDC creator claim where SDC is being written.
  • The columns-defaults UI lets the user set "Me" as the default for all rows.

Source

User feedback session, 2026-05-10.

Event Timeline

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

Research findings

Wikitext form for Author = uploader (own work):

|author=[[User:Username|Username]]

Confirmed canonical against current Commons docs (Template:Information says "Author should be a link, but without the link to a user talk space") and against real recent uploads, e.g. File:Topknot Pigeon 0A2A6700.jpg (|author=[[User:JJ Harrison|JJ Harrison]]) and File:Panoramic Overview from Glacier Point over Yosemite Valley 2013 Alternative.jpg (|author=[[User:Tuxyso|Tuxyso]]).

SDC form for P170 (creator) when uploader is the author:
Mainsnak somevalue with qualifiers — confirmed against Commons:Structured data/Modeling/Author and the real uploads above (M28633332, M154373445):

P3831 (role, e.g. Q33231 photographer) is omitted to keep it medium-agnostic; appears in some uploads but not others.

Plan:

  1. Helper selfAuthorWikitext(username) returns [[User:X|X]].
  2. Author cell editor in src/table.jsx shows a one-click "Me (Username)" button below the input.
  3. Column-defaults UI in src/columns-modal.jsx for the Author row gets the same quick-insert button.
  4. src/api/publish.js buildSdcClaims detects when item.author is the canonical [[User:X|X]] form (where X matches the current user) and emits the P170-somevalue claim with qualifiers.

Will proceed unless you flag.

Correction — Wikidata property links

The earlier research comment refers to four Wikidata properties as P170, P2093, P2699, P4174. Those got auto-linked by Phab to paste objects with the same numeric IDs, which is a Phab markup collision (P<n> is paste shorthand) and pulled unrelated objects into "Mentioned Here". The intended references were Wikidata properties — corrected links below:

(The original comment can't be edited via the Phab API — only via web UI. The bogus "Mentioned Here" entries from the original comment will linger unless the original is edited manually.)

Daanvr renamed this task from own work to Author = uploader: 'Me (Username)' quick-select (!24).May 11 2026, 2:13 PM

Released as v0.8.0 (MR !24 merged into main).