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

Fix: change request info #3971

Merged
merged 8 commits into from
Jul 4, 2023
Merged

Fix: change request info #3971

merged 8 commits into from
Jul 4, 2023

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Jun 13, 2023

About the changes

  • fixed spacing in sidebar
  • consolidated info into one banner

closes #1-969/change-requests-ui-inconsistency

@vercel
Copy link

vercel bot commented Jun 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2023 2:45pm
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2023 2:45pm

const drafts = useMemo(
() =>
data?.filter(changeRequest =>
['Draft', 'In review', 'Approved'].includes(changeRequest.state)
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed to unfinishedChangeRequests

Copy link
Contributor

@sjaanus sjaanus left a 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(
Copy link
Contributor

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?

Copy link
Contributor

@kwasniew kwasniew left a 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<{
Copy link
Contributor

Choose a reason for hiding this comment

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

Too much untested logic

@Tymek Tymek merged commit ce90083 into main Jul 4, 2023
16 of 18 checks passed
@Tymek Tymek deleted the fix/change-request-bar branch July 4, 2023 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants