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

APPEAL/29184 - Add key to AmaIssueList #19280

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

brandondorner
Copy link
Contributor

Resolves https://jira.devops.va.gov/browse/APPEALS-29184

Description

This is a tech-debt task and should not change any functionality. https://jira.devops.va.gov/browse/APPEALS-29184

AmaIssueList was missing a key prop which was throwing a React error Warning: Each child in a list should have a unique "key" prop.

In an effort to reduce errors and increase performance we have added in these component keys.

Further reading on why React keys are important:
https://dev.to/francodalessio/understanding-the-importance-of-the-key-prop-in-react-3ag7

Acceptance Criteria

  • Code compiles correctly
  • The key warnings are gone

Testing Plan - At queue/appeals/{appeal-id}

  1. Switch user to BVAAABSHIRE
  2. Go to Queue and select an AMA Appeal (e.g. Bob SmithMayer)
  • The "Issues" section should display as expected
  • Inside the browser dev tools there should be no key warning for "AmaIssueList". (There may be other warnings not related to this that can become there own Jira tickets)

QA/Dev notes:

This error will show up in the browser Dev Tools (Message me if you need help with this)

The key prop itself will not show up on the element tree in the dev tools but that is okay as according to the React docs "Keys serve as a hint to React but they don’t get passed to your components."
I did not realize this prior to this task so I was looking for the key where it wouldn't be. So all we need for this task is just see if the error/warning went away.

Before

before

After

after

This is a tech-debt task and should not change any functionality.
https://jira.devops.va.gov/browse/APPEALS-29184

`AmaIssueList` was missing a key prop which was throwing a
React error `Warning: Each child in a list should have a unique
"key" prop.`

In an effort to reduce errors and increase performance we have added
in these component keys.

Further reading on why React keys are important:
https://dev.to/francodalessio/understanding-the-importance-of-the-key-prop-in-react-3ag7
@brandondorner brandondorner added Type: Tech-Improvement Team: Saturn 🪐 A development team for the VHA business line labels Aug 28, 2023
@codeclimate
Copy link

codeclimate bot commented Aug 28, 2023

Code Climate has analyzed commit 0b6b539 and detected 0 issues on this pull request.

View more on Code Climate.

@craigrva craigrva changed the base branch from master to dev-support/APPEALS-29184-4958 August 28, 2023 19:36
@craigrva craigrva merged commit 7f3c31a into dev-support/APPEALS-29184-4958 Aug 28, 2023
12 of 14 checks passed
@craigrva craigrva deleted the dorner/APPEALS-29184 branch August 28, 2023 19:37
@craigrva craigrva mentioned this pull request Aug 28, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: Saturn 🪐 A development team for the VHA business line Type: Tech-Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants