Page MenuHomePhabricator

Add ethnic group to author's page
Closed, ResolvedPublicFeature

Description

Feature summary: Add the property "ethnic group" (Property 172) as a new field to author's page profile.

Benefits: This will allow authors to be found and filtered by ethnicity, which will help to make the cultural production of certain ethnic communities more visible.

Event Timeline

Pepe_piton triaged this task as Medium priority.

Interested in taking up the task! Kindly assign it to me if possible.

image.png (328×724 px, 24 KB)

To Clarify: Adding "Ethnic Group" field here in Author Biography

Is this the correct implementation, please clarify if incorrect?

Hello, @shreya-bhagat ! Adding you as the assignee

Yes, that's the correct implementation!

Although, I'm not 100% sure I like putting the ethnicity property above the gender property.
@Pepe_piton , @marfossatti have you got opinions on the order of the properties? Here's Wikidata's order as a reference... I don't like it that much

Please @shreya-bhagat feel free to share your opinions on the order of the properties, if you''d like. And please go ahead and start working on the task, don't wait for us to reach to a conclusion on the the matter of the order since it's only a detail.

@Nat_WDU
I've completed the task. The screenshot is attached.
However, a few concerns:

  1. My Gitlab account hasn't been approved by the Administrator, I'm unable to create a PR.
  2. Property 172 often is a nil value for various authors. In those cases: do you want me show the ethnicity field as empty (analogous to how Date of Death shows up for authors who are alive), or do you want me to skip the field entirely?
  3. Let me know the order of properties: I'm not so sure which position will be appropriate.

When Ethnicity Property Exists:

Screenshot from 2025-10-08 18-43-34.png (983×1 px, 197 KB)

When the property doesn't exist:

image.png (856×1 px, 164 KB)

Let me know how to proceed!

Excellent job, @shreya-bhagat! I think you've got a good understanding of how the tool works, from how the "Author" class is built, to how Flask sends data to the HTML template, and how that data is displayed in the template.

As for question 2, I think it's a good question. I believe that, since the "ethnic group" property is not used very often, it's best to skip it when it's not found. So, after I merged your contribution, I added the if statement in the author html template, using Jinja2 syntax: https://gitlab.wikimedia.org/toolforge-repos/paulina/-/commit/902c6a6b364f00b917048a32633bbf6d18e76a90

The feature is now online:

  1. https://paulina.toolforge.org/author/Q19526
  2. https://paulina.toolforge.org/author/Q692