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 getDataFromColumnPath logic #2971

Merged
merged 5 commits into from
Dec 20, 2022
Merged

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Dec 19, 2022

  • simplify code and reduce duplication
  • fix bug with long integers

Followup to comments in #2956

* fix bug with long integers
* simplify code and reduce duplication
@julieg18 julieg18 self-assigned this Dec 19, 2022
@julieg18 julieg18 changed the title Refactor getDataFromColumnPath logic Refactor getDataFromColumnPath logic Dec 19, 2022
@@ -147,7 +147,7 @@ describe('pickExperiments', () => {
description: '[exp-456]',
detail: `Created:${formatDate(
mockedExperiments[1].Created as string
)}, split:2.2000e+9, data/data.xml:22a1a29`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Spotted this bug that was happening with long integers while working on the refactoring.

Copy link
Member

@mattseddon mattseddon Dec 20, 2022

Choose a reason for hiding this comment

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

This was actually intended (see #2813 (comment)).

There is a long tail of edge cases here. For example, why would we treat 2200043556.1 differently? What if we had 10000000000000000 or 10000000000000000.1? The JS numbers rabbit hole is deep.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, whoops! Must have missed that comment! The table has the full number so I assumed it was a bug. Will revert this change :)

Copy link
Member

Choose a reason for hiding this comment

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

Do you think we should update the webview?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you think we should update the webview?

Sure! Apologies if that's what you wanted originally, I misunderstood. When you say webview, are you referring to just the tooltips or the table as well? I'll open a pr that does both for now.

Copy link
Member

Choose a reason for hiding this comment

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

I didn't even think about that until you replied. No need to apologise. It was probably me that missed something back in the original PR.

@julieg18 julieg18 marked this pull request as ready for review December 19, 2022 18:40
@codeclimate
Copy link

codeclimate bot commented Dec 20, 2022

Code Climate has analyzed commit 5519cec and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

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.5% (0.0% change).

View more on Code Climate.

@julieg18 julieg18 merged commit a1486c7 into main Dec 20, 2022
@julieg18 julieg18 deleted the plots-exp-blocks-followup branch December 20, 2022 15:52
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.

3 participants