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

🐛 inherit review data from multiple archetypes #1493

Merged
merged 5 commits into from
Oct 30, 2023

Conversation

ibolton336
Copy link
Member

@ibolton336 ibolton336 commented Oct 27, 2023

@ibolton336 ibolton336 force-pushed the mta-1382 branch 3 times, most recently from 249e925 to e8573fb Compare October 27, 2023 16:51
@ibolton336 ibolton336 changed the title Mta 1382 🐛 inherit review data from multiple archetypes Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (319f8d2) 40.22% compared to head (b3b6b15) 40.22%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1493   +/-   ##
=======================================
  Coverage   40.22%   40.22%           
=======================================
  Files         143      143           
  Lines        4539     4539           
  Branches     1096     1096           
=======================================
  Hits         1826     1826           
  Misses       2616     2616           
  Partials       97       97           
Flag Coverage Δ
client 40.22% <0.00%> (ø)
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
client/src/app/api/rest.ts 51.31% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ibolton336 ibolton336 force-pushed the mta-1382 branch 2 times, most recently from ac929b1 to 171da19 Compare October 27, 2023 17:01
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

It's look like 90% good to go -- I just have a few suggestions to help reduce some complexity and repetition.

isFetching: isFetchingArchetypes,
error: archetypesFetchError,
refetch: fetchArchetypes,
} = useFetchArchetypes();
Copy link
Member

@sjd78 sjd78 Oct 27, 2023

Choose a reason for hiding this comment

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

Just a thought -- when the application assessment + analysis tables are combine, it would be good to rework the data fetching & data cross-references into its own hook. That way the hook can do something like...

heavyApplication = {
  ...applicaiton,
  archetypes: mapRefsToObject(applicaiton.archetypes, archetypes),
  isReviewed: ....,
  hasReviewedArchetype: ...,
}

...then the component code can just wire things together

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

A rogue console.log is still in there, and 1 more suggestion

item: ReviewDrawerLabelItem,
labelText?: string | number
) => {
console.log("generateReviewLabel", item, labelText);
Copy link
Member

Choose a reason for hiding this comment

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

Don't forget to remove the console log.

Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: ibolton336 <ibolton@redhat.com>
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.

2 participants