Refactoring: warning and freeform tag display code

Description

Instead of sprinkling conditionals everywhere, tag classes should have a label name method for the class (to allow for "Additional Tags" vs. Freeforms) and a display name method for the instances (to allow for warning tag display names to differ from the version we use in forms).

Behavior should remain the same and just look less hacky on the backend.

Activity

Show:
redsummernight
April 4, 2019, 2:09 PM
Edited

On the work posting form (https://test.archiveofourown.org/works/new), the labels remain the same as on beta, in order: "Rating" (the only one singular), "Archive Warnings", "Fandoms", "Categories", "Relationships", "Characters", "Additional Tags".

The options for warnings are the same as on beta:

  • Choose Not To Use Archive Warnings

  • Graphic Depictions Of Violence

  • Major Character Death

  • No Archive Warnings Apply

  • Rape/Non-Con

  • Underage

The warnings when displayed on a work's meta (https://test.archiveofourown.org/works/1069405), or on a tag feed (https://test.archiveofourown.org/tags/6670/feed.atom), is the same as on beta:

  • Creator Chose Not To Use Archive Warnings

  • Graphic Depictions Of Violence

  • Major Character Death

  • No Archive Warnings Apply

  • Rape/Non-Con

  • Underage

Looks good.

Sarken
April 8, 2019, 10:12 AM

The share code on a work, filters on work and bookmark listings, and work search page all correctly showed "Creator Chose Not To Use Archive Warnings," while the posting form continued to correctly show "Choose Not To Use Archive Warnings."

I don't have an RSS reader, so I couldn't check the labels there.

GoldenFalls
April 9, 2019, 1:57 PM

I just checked the RSS, it looks the same using a test archive RSS feed as using a Production one. The behaviour as far as I can tell has remained the same, with the same tag category names in the same order, as Red noted.

Lady Oscar
April 10, 2019, 3:45 PM

Looks good! (Confirmed with casual searching/browsing) I will assume things are less hacky on the back end.

DeployedToBeta

Assignee

Elz J

Reporter

Elz J

Roadmap

Tags

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9