Skip to content

fix: Bind this to utils that moved from static to non-static with js api de-globalization#1795

Merged
mattrunyon merged 5 commits intodeephaven:mainfrom
mattrunyon:chart-utils-bind
Feb 12, 2024
Merged

fix: Bind this to utils that moved from static to non-static with js api de-globalization#1795
mattrunyon merged 5 commits intodeephaven:mainfrom
mattrunyon:chart-utils-bind

Conversation

@mattrunyon
Copy link
Copy Markdown
Collaborator

@mattrunyon mattrunyon commented Feb 12, 2024

I noticed this issue while investigating deephaven/deephaven-plugins#179 and switching a param of (v) => this.chartUtils.unwrapValue(v) to just this.chartUtils.unwrapValue

Looked through the other de-globalization PRs and added bindAllMethods to any classes where there were some static methods moved to non-static so that they can be used this way

@mattrunyon mattrunyon requested a review from vbabich February 12, 2024 16:28
@mattrunyon mattrunyon self-assigned this Feb 12, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa3a33d) 46.05% compared to head (a37186f) 46.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1795      +/-   ##
==========================================
- Coverage   46.05%   46.04%   -0.01%     
==========================================
  Files         628      628              
  Lines       37784    37781       -3     
  Branches     9516     9516              
==========================================
- Hits        17400    17397       -3     
  Misses      20330    20330              
  Partials       54       54              
Flag Coverage Δ
unit 46.04% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

this.handleGotoValueSelectedFilterChanged.bind(this);
this.handleGotoValueChanged = this.handleGotoValueChanged.bind(this);
this.handleGotoValueSubmitted = this.handleGotoValueSubmitted.bind(this);
this.makeQuickFilter = this.makeQuickFilter.bind(this);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we call this makeQuickFilter with the wrong context somewhere?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not that I'm aware of, it was just something that was a static method before de-globalization and is no longer static

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Got it, I couldn't find it either. Probably not necessary to bind then, but doesn't matter since we are doing bindAll in other places.

@mattrunyon mattrunyon requested a review from vbabich February 12, 2024 17:08
vbabich
vbabich previously approved these changes Feb 12, 2024
@mattrunyon mattrunyon enabled auto-merge (squash) February 12, 2024 17:16
@mattrunyon mattrunyon merged commit d137ee7 into deephaven:main Feb 12, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 12, 2024
@mattrunyon mattrunyon deleted the chart-utils-bind branch June 23, 2024 06:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants