Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Use displayName from Classification model #12424

Open
2 tasks
mnigh opened this issue Jan 6, 2025 · 2 comments
Open
2 tasks

♻️ Use displayName from Classification model #12424

mnigh opened this issue Jan 6, 2025 · 2 comments
Labels
debt Refactor or improve existing code.

Comments

@mnigh
Copy link
Contributor

mnigh commented Jan 6, 2025

♻️ Refactor

Remove need to combine classification.level and classification.group when classification.displayName is all that is needed in some cases.

Example

🙋‍♀️ Proposed Solution

Add displayName accessor from Classification model to schema.graphql for use in queries for frontend. Add displayName to queries where needed.

type Classification {
  displayName: String! 
}

✅ Acceptance Criteria

  • no uses of classification.level and classification.group when classification.displayName is what is needed
  • no instances iterating over classifications with map to combine group and level
@mnigh mnigh added the debt Refactor or improve existing code. label Jan 6, 2025
@petertgiles
Copy link
Contributor

Depending on how you feel about ternaries...

Both languages have idiomatic ways of left padding strings:
image
image

@vd1992
Copy link
Contributor

vd1992 commented Jan 7, 2025

Depending on how you feel about ternaries...

Both languages have idiomatic ways of left padding strings

That does look cleaner for sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Refactor or improve existing code.
Projects
Status: No status
Development

No branches or pull requests

3 participants