Page MenuHomePhabricator

Move for_wikis transform from backend to frontend
Closed, ResolvedPublic

Description

Similar to T277235: Move icon transform from backend to frontend, the transformation of the database for_wikis collection to pretty strings by the GET /api/tools/ and GET /api/tools/{name} routes ends up making the output different than the output of /api/search/tools/ which complicates display of search vs direct records. It also means that the response from the /api/tools/* routes needs to be transformed back the "raw" state before it can be used for editing.

Details

Event Timeline

https://github.com/wikimedia/toolhub/blob/main/vue/src/components/search/FilterList.vue#L73-L104 is an existing recreation of the mappings on the UI side. The fix here may reuse this somehow and must replace it with a unified solution. We do not want multiple source of truth implementations of the display string mappings.

bd808 triaged this task as High priority.
bd808 moved this task from Backlog to In Progress on the Toolhub board.

Change 674150 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[wikimedia/toolhub@main] toolinfo: Move for_wikis display transform to frontend

https://gerrit.wikimedia.org/r/674150

Change 674150 merged by jenkins-bot:
[wikimedia/toolhub@main] toolinfo: Move for_wikis display transform to frontend

https://gerrit.wikimedia.org/r/674150