MPDX-9352, MPDX-9353, MPDX-9354 Customized login designs#1687
MPDX-9352, MPDX-9353, MPDX-9354 Customized login designs#1687
Conversation
|
Preview branch generated at https://designs-for-customized-login.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against 27635fd
|
🤖 Multi-Agent Code Review ReportPR: #1687 — MPDX-9352, MPDX-9353, MPDX-9354 Customized login designs 📊 Risk Assessment
Risk Factors: Shared components modified, new GraphQL operations, cross-cutting navigation changes, new access control logic 🚫 CRITICAL BLOCKERS (Severity 9-10) — Must fix before merge1. Missing
|
| Component | Dependents |
|---|---|
| MultiPageHeader | 18 files |
| MultiPageMenu | 6 files |
| LimitedAccess | 6 files |
| useNavPages | 6 files |
Breaking Change: NoStaffAccount export removed → replaced by LimitedAccess (all usages migrated ✅)
✅ What's Good
- Clean refactor of
NoStaffAccount→LimitedAccesswith broader use case support - Proper separation of HR Tools nav items into dedicated hook
- Good test coverage for new components (ConfirmUserGroupModal, LimitedAccess)
- Navigation restructuring is well-organized (Reports / HR Tools / MPDX Tools)
- Consistent use of
GqlMockedProviderpatterns in tests
🎯 Checklist
Must fix:
- Add
idfield toGetUserGroup.graphql+ re-runyarn gql - Fix conditional hook calls in
MultiPageMenu.tsx - Rename
GetUserGroup→UserGroup -
awaitmutations + add error handling inConfirmUserGroupModal.tsx - Localize strings in
getUserType.ts
Should fix:
- Simplify dead PENDING check in
Dashboard.tsx:42 - Replace hardcoded
navPages[N]indices inNavMenu.tsx - Fix fragmented localization strings
🤖 Generated by AI Multi-Agent Review (5 agents: Architecture, Data Integrity, Testing, UX, Standards)
|
@canac I won't merge this PR until customized login is fully done since I don't want users to be able to click on the new request forms if they don't have access. Also, what do you think the path name should be for the HR Tools? Right now it is |
canac
left a comment
There was a problem hiding this comment.
This is solid! I think /hrTools is a find name for the URL. I think it's a little better than requests, since it also includes the goal calculator.
If this PR will be sitting open for a while, one thing you could do is have a feature-flag environment variable, like DISABLE_HR_TOOLS. We set up Amplify to set that flag in production and check it in this PR.
I assume in a future PR we'll be checking the user type to determine which nav menus to show and hide?
src/components/Shared/ConfirmUserGroupModal/ConfirmUserGroupModal.tsx
Outdated
Show resolved
Hide resolved
src/components/Shared/ConfirmUserGroupModal/ConfirmUserGroupModal.tsx
Outdated
Show resolved
Hide resolved
|
You can also look into using the |
|
@canac I tried to use the user preference hook, however, there was a timing issue where the modal would open/close based on the default option which wasn't correct. I thought it better to use the query and mutation directly. Also, do you think we should rename |
|
That makes sense! Just wanted to make sure you knew about that hook if you didn't before.
Probably not because we'd have to update documentation links and any users' bookmarks would break. I think |
canac
left a comment
There was a problem hiding this comment.
Code looks good! I'm going to wait to approve until either we're ready to launch these forms or until we set up the feature flag to hide them in production (I can help you set that up if you want!).
| const serializedValue = | ||
| typeof newValue === 'string' ? newValue : JSON.stringify(newValue); | ||
| updateUserOption({ | ||
| return updateUserOption({ |
There was a problem hiding this comment.
Do we still need this change?
| }, | ||
| { | ||
| id: 'mpdx-tools-page', | ||
| title: t('MPDX Tools'), |
There was a problem hiding this comment.
What do you think about about keeping this as "Tools"?
Also, what about moving it before "HR Tools" here and anywhere else?
| title: t('MPDX Tools'), | |
| title: t('Tools'), |
Description
Customized login for different user groups requires a few designs:
NoStaffAccountcomponent to include wrong user group messageuser_typefield from backendNot sure what the path name should be for HR Tools
Tickets:
Testing
Checklist:
/pr-reviewcommand locally and fixed any relevant suggestions