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

[Feature] Increases classification level options #12399

Merged
merged 12 commits into from
Jan 7, 2025

Conversation

mnigh
Copy link
Contributor

@mnigh mnigh commented Dec 31, 2024

🤖 Resolves #12248.

👋 Introduction

This PR increases classification level options and accounts for the absence or presence of a leading zero in the levels.

🧪 Testing

  1. make refresh-api; make seed-fresh; pnpm i; pnpm build:fresh
  2. Navigate to http://localhost:8000/en/admin/settings/classifications/create
  3. Create a classification item with a level of 19
  4. Navigate throughout the site wherever classification levels are rendered or used in aria-labels to verify absence or presence of a leading zero in the levels depending on if the level is single digit or two digits.

@mnigh mnigh marked this pull request as ready for review January 3, 2025 14:34
Copy link
Contributor

@JamesHuf JamesHuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just found a couple more places needing tweaked.

@@ -149,7 +149,7 @@ export const wrapAbbr = (text: ReactNode, intl: IntlShape, title?: string) => {
}
switch (stringifyText) {
// Regex that matches all IT classifications with levels
case /[IT]-0\d/.exec(stringifyText)?.input:
case /[IT]-[0-9]\d/.exec(stringifyText)?.input:
return (
<abbr title={intl.formatMessage(getAbbreviations("IT"))}>
<span aria-label={splitAndJoin(stringifyText.replace("-0", ""))}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is removing the colon in aria labels for single digit classifications but leaving it for double digit ones.
For example "IT-03" => "I T 3" as opposed to "IT-19" => "I T - 1 9".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3ecdaea

Screenshots

Screen Shot 2025-01-06 at 10 51 21 Screen Shot 2025-01-06 at 10 51 36

@JamesHuf
Copy link
Contributor

JamesHuf commented Jan 4, 2025

image
Levels not sorted on the Employee Information page (during registration).

@JamesHuf
Copy link
Contributor

JamesHuf commented Jan 4, 2025

image
"IT-019" x2 on the Browse Jobs page.

@mnigh
Copy link
Contributor Author

mnigh commented Jan 6, 2025

Levels not sorted on the Employee Information page (during registration).

fa6195a

Screenshot

Screen Shot 2025-01-06 at 10 02 34

@mnigh
Copy link
Contributor Author

mnigh commented Jan 6, 2025

"IT-019" x2 on the Browse Jobs page.

3c83c58

Screenshot

Screen Shot 2025-01-06 at 10 51 21

@mnigh mnigh requested a review from JamesHuf January 6, 2025 15:57
@mnigh
Copy link
Contributor Author

mnigh commented Jan 6, 2025

Created #12424 for possible related refactoring for the future.

Copy link
Contributor

@JamesHuf JamesHuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've gotten everything I can find! 👍

@mnigh mnigh added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit 3ef3ca8 Jan 7, 2025
16 checks passed
@mnigh mnigh deleted the 12248-classification-levels branch January 7, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Increase possible number of classification levels
2 participants