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

Refactor experiments column conditional shadow logic #2085

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Jul 22, 2022

  • updates naming, making logic more clear
  • reduces complexity with headerGroup data

Followup to #2062 (comment)

* updating naming, making logic more clear
* reduce complexity with `headerGroup` data
@@ -102,6 +101,8 @@ export const TableHead = ({

const selectedForPlotsCount = getSelectedForPlotsCount(rows)

const firstExpColumnCellId = headerGroups[0].headers[0].id
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of relying on array indexes to find the first experiments column cell, I realized I could find the cell with the id of the cell inside headerGroup.

@@ -130,7 +130,7 @@ const getIconMenuItems = (
}
]

const FirstTableHeaderCellWrapper: React.FC<{
const WithExpColumnNeedsShadowUpdates: React.FC<{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to make the naming more clear but this sounds weird to me as well... Open to other suggestions 😅

@julieg18 julieg18 marked this pull request as ready for review July 22, 2022 15:33
@codeclimate
Copy link

codeclimate bot commented Jul 25, 2022

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

The test coverage on the diff in this pull request is 100.0% (85% 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.

@julieg18 julieg18 merged commit 1c099a4 into main Jul 25, 2022
@julieg18 julieg18 deleted the refactor-exp-column-shadow-logic branch July 25, 2022 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants