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

Change request reject UI #4489

Merged
merged 14 commits into from
Aug 15, 2023
Merged

Change request reject UI #4489

merged 14 commits into from
Aug 15, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Aug 14, 2023

About the changes

  • change request reject behind a feature flag. Currently there's no modal and you can reject straight away. Next PR will add a modal with comment.
Screenshot 2023-08-14 at 14 58 10
  • in overview: show rejected badge, rejectors list and rejected status
Screenshot 2023-08-14 at 14 58 22
  • in change requests list show correct status and assign rejected CRs to closed list
Screenshot 2023-08-14 at 14 58 37

Important files

Discussion points

@vercel
Copy link

vercel bot commented Aug 14, 2023

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

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 15, 2023 6:54am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 15, 2023 6:54am

@@ -161,25 +156,7 @@ export const ChangeRequestOverview: FC = () => {
<ChangeRequestBody>
<StyledAsideBox>
<ChangeRequestTimeline state={changeRequest.state} />
<ChangeRequestReviewers
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to a new component so that adding rejectors is easier

approvals: IChangeRequestApproval[];
}

export const ChangeRequestApprovals: FC<ChangeRequestApprovalProps> = ({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

approvers extracted into a new components

rejections: IChangeRequestApproval[];
}

export const ChangeRequestRejections: FC<ChangeRequestRejectionProps> = ({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

rejectors just added in this PR

>
{name}
</Typography>
<ReviewerName variant="body1">{name}</ReviewerName>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

extracted styled component

condition={Boolean(
uiConfig?.flags?.changeRequestReject
)}
show={
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will open a modal in the next PR. For now it makes a direct change to test it E2E

{children}
</Paper>
);
};

export const ChangeRequestReviewers: FC<{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Existing code extracted here + added rejectors init

@@ -72,11 +72,13 @@ export const ChangeRequestsTabs = ({
const open = changeRequests.filter(
changeRequest =>
changeRequest.state !== 'Cancelled' &&
changeRequest.state !== 'Rejected' &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

rejections show on closed list

import { FC, useContext, useState } from 'react';
import { Box } from '@mui/material';
import { Alert, Box, Button, styled, Typography } from '@mui/material';
import React, { FC, useContext, useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

React seems not needed?

@@ -0,0 +1,30 @@
import React, { FC } from 'react';
import { Typography } from '@mui/material';
import { ConditionallyRender } from '../../../common/ConditionallyRender/ConditionallyRender';
Copy link
Contributor

Choose a reason for hiding this comment

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

can be without ../..

@sjaanus
Copy link
Contributor

sjaanus commented Aug 14, 2023

Not blocking approval, minor comments.

@kwasniew kwasniew merged commit 3227e30 into main Aug 15, 2023
16 checks passed
@kwasniew kwasniew deleted the change-request-reject-ui branch August 15, 2023 07:08
chriswk pushed a commit that referenced this pull request Aug 21, 2023
chriswk pushed a commit that referenced this pull request Aug 21, 2023
nunogois pushed a commit that referenced this pull request Aug 22, 2023
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

2 participants