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

[Feat] Add employee profile page #12371

Merged
merged 10 commits into from
Jan 7, 2025
Merged

[Feat] Add employee profile page #12371

merged 10 commits into from
Jan 7, 2025

Conversation

esizer
Copy link
Member

@esizer esizer commented Dec 24, 2024

πŸ€– Resolves #12002

πŸ‘‹ Introduction

Adds the employee profile page with table of contents and initial section.

πŸ•΅οΈ Details

I believe the check for government employee makes sense πŸ€” All must be true:

  • isGovEmployee
  • workEmail
  • workEmailisVerified

πŸ§ͺ Testing

  1. Build pnpm run dev:fresh
  2. Login as any role
  3. Ensure the conditions in details is met for that user
  4. Navigate to /applicant/employee-profile
  5. Confirm it loads and has the appropriate content (minus the forms being created in other tickets)
  6. Update the users in the database to not meet one of the conditions in details
  7. Refresh the page and confirm it shows unauthorized

πŸ“Έ Screenshot

2024-12-23_12-29

isWorkEmailVerified?: Maybe<boolean>;
}

export const isVerifiedGovEmployee = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

@esizer Does this function satisfy the acceptance criteria for #12363 and then allow it to be closed as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

May need to wait and see. I think to but not 100% sure

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this does satisfy 12363.

Copy link
Contributor

Choose a reason for hiding this comment

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

isWorkEmailVerified is computed server-side making it not 100% frontend but I'm not sure if that is a problem. Issue linked has no A/C or details.

@petertgiles petertgiles self-requested a review January 2, 2025 13:59
Copy link
Contributor

@petertgiles petertgiles left a comment

Choose a reason for hiding this comment

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

Looking good! A few things to check on, though. I've left questions for Josh and Nienke, who will need to approve before merging, too.

apps/web/src/utils/userUtils.ts Show resolved Hide resolved
apps/web/src/pages/EmployeeProfile/EmployeeProfilePage.tsx Outdated Show resolved Hide resolved
return (
<>
<SEO title={pageTitle} description={subtitle} />
<Hero title={pageTitle} subtitle={subtitle} crumbs={crumbs} />
Copy link
Contributor

Choose a reason for hiding this comment

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

In mobile widths, the Hero should be centred. The section headers should be, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, this is just using our base hero/heading components. That would require modifying it specifically for this page which seems odd. I feel like we should either:

  1. Update the base component so we have consistent styles on all pages
  2. Or leave this page alone so we don't have special styles for one page

Copy link
Contributor

Choose a reason for hiding this comment

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

I vote: leave this page alone so we don't have special styles for one page.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, the hero does go centred on its own. I didn't test narrow enough.
image

All the admin page refreshes use centred headings in mobile widths. I don't know if this is standard enough to include in the base component or not.
image

data-h2-gap="base(x3 0)"
>
<TableOfContents.Section id={SECTION_ID.CAREER_PLANNING}>
<Heading
Copy link
Contributor

Choose a reason for hiding this comment

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

According to Figma, this should be font-weight 400.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I can do that but this is also using the base heading component and we should avoid changing font styles for headings because they need to be consistent for visual users to indicate content hierarchy for accessibility.

Should the heading 2 have 400? If not, I don;'t think we should be messing with font weight since it can gave a negative affect on the sites accessibility.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, the designers have explicitly said there is no standard font weight for a given heading level and should be set on a case-by-case basis.
#11859 (comment)
You could check in with a designer and see if the design could be changed.

Copy link
Member

Choose a reason for hiding this comment

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

For both heading related things:

  • h1, h2, h3 at a minimum should always be centered on mobile devices
  • h2s will generally be 400 weight in most cases if you need to set a default on the component - this has been the case for a while in the designs and it's fine to propagate it everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

If we are editing the base component, would it be better to create a separate ticket to fix our base heading? It seems a little out of scope for a basic stub page to affect all other pages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, I'll write one up. πŸ™ƒ
#11859

Comment on lines 64 to 68
const pageTitle = intl.formatMessage({
defaultMessage: "Your empoloyee profile",
id: "HwW7BZ",
description: "Page title for a users employee profile",
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Your employee profile*

Copy link
Member Author

Choose a reason for hiding this comment

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

Good eye, fixed in update copy

@NienkeBr
Copy link
Contributor

NienkeBr commented Jan 6, 2025

We'd like to make a change to the copy. Instead of "talent mobility preferences", we want to use "career development preferences".

  • Could you please update this in the table of content?
    • EN: Career development preferences
    • FR: PrΓ©fΓ©rences en matiΓ¨re de dΓ©veloppement de carriΓ¨re
  • Could you also update this in the page description?
    • EN: Manage your government employee information, including career development preferences and work styles.
    • FR: GΓ©rez vos renseignements d’employΓ©e ou d’employΓ© du gouvernement, y compris vos prΓ©fΓ©rences en matiΓ¨re de dΓ©veloppement de carriΓ¨re et les faΓ§ons de travailler.

@esizer
Copy link
Member Author

esizer commented Jan 6, 2025

We'd like to make a change to the copy. Instead of "talent mobility preferences", we want to use "career development preferences".

Yup! We have done that as part of update copy

@esizer esizer requested a review from petertgiles January 7, 2025 14:36
@petertgiles
Copy link
Contributor

I think it's just the header font-weight and centering on mobile left.

@esizer
Copy link
Member Author

esizer commented Jan 7, 2025

I think it's just the header font-weight and centering on mobile left.

Sorry, I thought we planned on doing that as a separate ticket to fix the underlying components instead of doing single page overrides (something we should be avoiding).

@petertgiles
Copy link
Contributor

Let's make a decision in standup today.

@esizer
Copy link
Member Author

esizer commented Jan 7, 2025

Let's make a decision in standup today.

okay, based on decision during stand up, I have added in the overrides: override heading

@esizer esizer added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit c49a4e4 Jan 7, 2025
15 checks passed
@esizer esizer deleted the 12002-employee-profile-page branch January 7, 2025 19:26
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.

✨ Employee profile page
6 participants