[FR] Show triage owner's real name (without nick)?

Open
#323 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start in src/content/components/Triage/Triage.js at the owner rendering around the shown diff. Review how nick, real_name, and email are provided, then resolve which display format the project wants before checking the triage page and its existing tests or UI validation. Done means the chosen owner name format is displayed consistently without losing the fallback behavior.

Written by the indexing model from the issue text.

Description

enhancement

I'm thinking about how to show triage owner's name in https://www.bugzy.org/triage

Currently it shows just the owner's nick (which is from their real_name, prefixed by : like :aminomancer). I was thinking it might be better to show the real_name, but that also includes the nick. So these are the options and formats:

real_name

Shane Hughes [:aminomancer]
Shane Hughes (:aminomancer, :shughes)
Shane Hughes :aminomancer

nick

:aminomancer

just_name

Shane Hughes

I'd like to get some feedback from others before changing anything.

The issue with real_name is just that it's so long, especially since you can include multiple nicks. The trouble with nick is that it's more ambiguous, at least where our team is concerned (since we know each other by our legal names, not by our internet monikers). And just_name is not a real property, but it's something that could be extracted from the real_name like this:

diff --git a/src/content/components/Triage/Triage.js b/src/content/components/Triage/Triage.js
index 6e4ffb8..09d7dbd 100644
--- a/src/content/components/Triage/Triage.js
+++ b/src/content/components/Triage/Triage.js
@@ -169,8 +169,17 @@ export class Triage extends React.PureComponent {
     return (
       <span
         title="Triage ownership alternates every Monday at 12:30 UTC."
-        style={{ cursor: "help", "text-decoration": "underline .05em dotted" }}>
-        Owner: {nick || real_name || email} ({dateString})
+        style={{ cursor: "help", textDecoration: "underline .05em dotted" }}>
+        Owner:{" "}
+        {real_name.replace(
+          new RegExp(
+            `([^\\[\\(\\]\\)]*)(\\s[\\[\\(]?:${nick ?? ""}.*[\\]\\)]?)`
+          ),
+          "$1"
+        ) ||
+          nick ||
+          email}{" "}
+        ({dateString})
       </span>
     );
   }
Dominant language
JavaScript
Stars
11
Forks
14
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/bugzy

All issues in mozilla/bugzy

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.