-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
Fix: change request info #3971
Fix: change request info #3971
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
frontend/src/component/layout/MainLayout/DraftBanner/DraftBanner.tsx
Outdated
Show resolved
Hide resolved
frontend/src/component/layout/MainLayout/DraftBanner/DraftBanner.tsx
Outdated
Show resolved
Hide resolved
frontend/src/component/layout/MainLayout/DraftBanner/DraftBanner.tsx
Outdated
Show resolved
Hide resolved
const drafts = useMemo( | ||
() => | ||
data?.filter(changeRequest => | ||
['Draft', 'In review', 'Approved'].includes(changeRequest.state) |
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.
why is approved and in review added to drafts variable? it doesn't make sense to me
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.
renamed to unfinishedChangeRequests
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.
LG , just minor tweak
}> = ({ changeRequest, onClick }) => { | ||
}> = ({ changeRequests, onClick }) => { | ||
const environments = changeRequests.map(({ environment }) => environment); | ||
const count = changeRequests.reduce( |
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.
Can we name it more explicit, count of what?
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.
Non blocking approve, but I'd add tests since there's so much untested UI logic. Also not sure why we're doing type casting in 2 places.
@@ -37,43 +37,61 @@ const StyledBox = styled(Box)(({ theme }) => ({ | |||
})); | |||
|
|||
const DraftBannerContent: FC<{ |
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.
Too much untested logic
About the changes
closes #1-969/change-requests-ui-inconsistency