-
Notifications
You must be signed in to change notification settings - Fork 1
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 Guardian Directory page #1127
Conversation
This pull request has been linked to Shortcut Story #2303: Create a Guardian Directory page and add pagination. |
9fd7bbd
to
21ca464
Compare
Great work! I do see some conflicts with the design.
|
@@ -35,6 +37,13 @@ const DefaultLayout = ({ | |||
}, | |||
{ path: '/ussf-documentation', label: 'USSF documentation' }, | |||
] | |||
if (flags.guardianDirectory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thank you!
} = await dataSources.personnelAPI.getGuardianDirectory() | ||
|
||
const guardianDirectory: GuardianDirectory[] = [] | ||
// Pull out and format relevant data to return for directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gidjin I noticed the formatting is gone and all the text is rendering as-is from the spreadsheet / mostly in caps. This might not be the best place to handle it (where I had it before), but maybe we should add it back somewhere else? Plain CSS wasn't working for me. Lmk what you think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never mind! i just saw it's in the personnel-api branch -- missed it before :) thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting moved to the personnel API see PR https://github.com/USSF-ORBIT/ussf-personnel-api/pull/18. I did that because I don't know what data formatting we will need to do once we have access to the real API we may still have to do data transformation and it felt best to do that in our personnel API since I see it as place to transform external APIs into what we need for this. Sorry for not flagging that in the description! If you have questions or can't get that to work let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work
if (flags.guardianDirectory === false) { | ||
router.replace('/404') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach! Hadn't considered using a flag like this before. I'll be stealing this for future features 🙂
accessibility review
|
Added a story for this sc-2666 |
## [4.24.0](4.23.3...4.24.0) (2023-10-31) ### Features * Add Guardian Directory page ([#1127](#1127)) ([99bd917](99bd917)) ### Documentation * move docs to the ussf-portal repo ([#1129](#1129)) ([6d6a740](6d6a740)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SC-2303
Related PR: https://github.com/USSF-ORBIT/ussf-personnel-api/pull/18
Proposed changes
Add guardian directory page and table. Reads from personnel api. New launch darkly flag to control visibility.
Reviewer notes
Due to changes needed in the shared e2e build workflow the e2e tests won't run for this branch until after those updates are merged. You can see that the tests are green though in this branch https://github.com/USSF-ORBIT/ussf-portal/pull/324
Setup
Run the system as normal and go to the guardian directory via the link
First you will need to clone and checkout the matching branch of the USSF-ORBIT/ussf-personnel-api
Second edit the
docker-compose.services.yml
file in this repo to use the local checkout of the personnel apiStart the system
yarn services:up --build yarn dev cd ../ussf-portal-cms yarn dev
Login to the portal http://localhost:3000
Start storybook
Login to storybook http://localhost:6006, though the command above should open it for you
Code review steps
As the original developer, I have
As a reviewer, I have
Check out our How to review a pull request document.
Screenshots