-
Notifications
You must be signed in to change notification settings - Fork 7
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
[TTAHUB-3281] manual mark goals similar #2303
Conversation
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, but let's get another approval before merging
} | ||
|
||
checkFeatureFlags(); | ||
}, []); |
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.
Is an empty [] on use effect allowed by our linter rules?
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.
no complaints by the linter
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.
useEffect with empty deps is standard, and means "run only once" - what's the concern?
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.
NVM seems like its a one and done thing.
|
||
await markSimilarGoals(recipientId, similarGoals); // PUT request to mark similar goals | ||
selectAllGoalCheckboxSelect({ target: { checked: false } }); // Deselect all goals | ||
history.go(0); |
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 do we trigger a manual reload of the page?
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.
so the newly added similarity group shows up in the banner
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.
Shouldn't this be using state to trigger re render?
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 guess I dont know what you mean
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.
If you have an alternative, that would work better, please suggest the code change.
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.
Are you reloading the page to display something that was not previously there? If yes its means you are changing the state of the page. In this case I would think you would want to use some sort of useState() var to trigger the re render and display the state change.
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.
Pushed suggested change.
@@ -256,7 +257,7 @@ export async function createSimilarityGroup( | |||
); | |||
} | |||
|
|||
if (group) { | |||
if (!byPassChecks && group) { |
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.
Looks good assuming we are cleaning up any groups that might already have these goals.
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.
Looks good!
Description of change
Implemented the ability to manually mark goals as similar within the Head Start TTA Hub. This new feature allows users to select multiple goals and group them together if they are determined to be similar. The change includes updates to the frontend UI to support this functionality, new routes, and backend modifications to process and store the similarity groupings.
How to test
Issue(s)
Checklists
Every PR
Before merge to main
Production Deploy
After merge/deploy