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

Clean up keys; Fix up GoalTimeline tests #2721

Merged
merged 8 commits into from
Oct 30, 2023
Merged

Clean up keys; Fix up GoalTimeline tests #2721

merged 8 commits into from
Oct 30, 2023

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Oct 17, 2023

Resolves #2679

Removes unnecessary keys
Simplifies unnecessarily complicated keys
Replaces avoidable index-keys
Fixes GoalRedux/GoalTimeline testing


This change is Reviewable

@imnasnainaec imnasnainaec added frontend test maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. goal labels Oct 17, 2023
@imnasnainaec imnasnainaec self-assigned this Oct 17, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2023

@imnasnainaec imnasnainaec marked this pull request as ready for review October 18, 2023 12:13
@imnasnainaec imnasnainaec requested a review from jmgrady October 18, 2023 15:21
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 14 of 19 files at r1, 4 of 4 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jmgrady)


src/goals/ReviewEntries/ReviewEntriesComponent/CellComponents/NoteCell.tsx line 13 at r3 (raw file):

    <TextField
      variant="standard"
      key={`row-${props.rowData.id}-note`}

So we don't need this even if there is more than one note in the row?

Code quote:

      key={`row-${props.rowData.id}-note`}

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jmgrady)


src/goals/ReviewEntries/ReviewEntriesComponent/CellComponents/NoteCell.tsx line 13 at r3 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…

So we don't need this even if there is more than one note in the row?

The key (if necessary) will be assigned directly on the <NoteCell> component wherever it is called. And in our case, each row only has one instance of each type of cell anyway (1 per column).

@imnasnainaec imnasnainaec removed the request for review from jmgrady October 26, 2023 18:49
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit bf5b4e9 into master Oct 30, 2023
16 checks passed
@imnasnainaec imnasnainaec deleted the key branch October 30, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend goal maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use index as key where avoidable
3 participants