Skip to content

Conversation

@mvolkmann
Copy link
Collaborator

No description provided.

import {
Alert,
Button,
Card,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New MUI components are needed for a new confirmation dialog.


const TeamReviews = ({ onBack, periodId }) => {
const { state, dispatch } = useContext(AppContext);
const history = useHistory();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't need to use the History API to go back. We just need to call the onBack function that is passed in.

data: {
...period,
reviewStatus: ReviewStatus.AWAITING_APPROVAL
reviewStatus: ReviewStatus.OPEN
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When a review period is "launched", its status changes to OPEN, not AWAITING_APPROVAL.

return null;
};

const requestApproval = async () => {
Copy link
Collaborator Author

@mvolkmann mvolkmann May 20, 2024

Choose a reason for hiding this comment

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

This function now appears after the launchReviewPeriod function.

setValidationMessage(msg);
if (msg) return;

const visibleIds = new Set(visibleTeamMembers().map(m => m.id));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If there are no validation errors, we now display a modal dialog whose text depends on the number of unapproved review assignments.


const onPeriodSelected = useCallback(
period => {
setSelectedPeriod(period);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Setting this causes the UI to display the TeamReviews page.

@@ -1,18 +1,17 @@
import React from 'react';
import renderer from 'react-test-renderer';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Simplified this snapshot test.

Copy link
Contributor

Choose a reason for hiding this comment

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

See changes to this file as well by @jackkeller on #2402

setScore={() => {}}
/>
);
const input = screen.getByTestId('comment-input').querySelector('input');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The input was changed to a textarea.

Copy link
Collaborator

@jackkeller jackkeller left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Contributor

@vhscom vhscom left a comment

Choose a reason for hiding this comment

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

I think there may be a conflict following rebase but should be a straight-forward merge once the snapshots are regenerated. Code looks good.

@mvolkmann mvolkmann merged commit d9e2acd into develop May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants