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

Add additional Analysis Methods #11994

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Add additional Analysis Methods #11994

wants to merge 30 commits into from

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented Jan 6, 2025

Description

  • Add ability to add custom analysis methods on drawer report page
  • Update display logic for this page

TODO

  • Add ability to delete custom entities

I welcome feedback on improvements to the code. This initial draft I just wanted to make it work so I could see how big the changes are.

Related ticket(s)

CMDCT-4115


How to test

FIGMA
Deployed URL

  • Log in as a state user
  • Create and enter a NAAAR report
  • Go to the Analysis Methods page
  • Verify you can:
    • Click the "Add other analysis method" button and fill out a new method (with its own form)
    • Upon save, that method shows up in the table (with a custom view, see figma)
    • You can click "Edit" to review and update that method
    • You can add multiple methods

Notes

I think this code could be better, and I welcome any suggestions for improvement. Some ideas I had:

  • Create a separate DrawerReportPage component that is specifically for this type of page
    • I thought I could strap on the new logic without too many changes and I feel we are teetering on the edge of it being worth it
      • For example: we still need to add the logic for deleting custom entities (to be completed separately)

Pre-review checklist

  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • I have manually tested this PR in the deployed cloud environment

Pre-merge checklist

Review

  • Design: This work has been reviewed and approved by design, if necessary
  • Product: This work has been reviewed and approved by product owner, if necessary

@gmrabian gmrabian marked this pull request as ready for review January 7, 2025 16:05
@JonHolman
Copy link
Contributor

How about extracting entity row into its own component?

@gmrabian
Copy link
Contributor Author

gmrabian commented Jan 7, 2025

How about extracting entity row into its own component?

Funny you mention it...we have one of those! I can take a look and see how well it would fit together.
https://github.com/Enterprise-CMCS/macpro-mdct-mcr/blob/main/services/ui-src/src/components/tables/EntityRow.tsx

@gmrabian gmrabian added the ready for review Ready for all the reviews! label Jan 8, 2025
karla-vm
karla-vm previously approved these changes Jan 9, 2025
Copy link
Collaborator

@karla-vm karla-vm left a comment

Choose a reason for hiding this comment

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

This looks great and works well, I don't have any major feedback on the code. I did create a separate ticket for us to refactor the DrawerReportPage in the future, so this might be a good case for it --- separating out this type of page as its own thing as you mentioned.

@gmrabian gmrabian dismissed stale reviews from karla-vm and bangbay-bluetiger via 83e2803 January 9, 2025 19:03
Copy link

codeclimate bot commented Jan 9, 2025

Code Climate has analyzed commit 83e2803 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 93.5% (90% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.0% change).

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants