Skip to content

Add generic context option for custom function resolution#1398

Merged
sequba merged 5 commits intohandsontable:feature/issue-1396from
michaelbridge:context
Apr 3, 2024
Merged

Add generic context option for custom function resolution#1398
sequba merged 5 commits intohandsontable:feature/issue-1396from
michaelbridge:context

Conversation

@michaelbridge
Copy link
Copy Markdown
Contributor

@michaelbridge michaelbridge commented Mar 27, 2024

Context

Enable pass-through of generic parameters to underlying custom functions via context option. Further discussion here.

How did you test your changes?

Added tests; ran npm run test

Types of changes

  • Breaking change (a fix or a feature because of which an existing functionality doesn't work as expected anymore)
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues:

  1. Fixes Passing an object into new instance of hyperformula that can be accessed from Custom Functions #808

Checklist:

  • I have reviewed the guidelines about Contributing to HyperFormula and I confirm that my code follows the code style of this project.
  • I have signed the Contributor License Agreement.
  • My change is compliant with the OpenDocument standard.
  • My change is compatible with Microsoft Excel.
  • My change is compatible with Google Sheets.
  • I described my changes in the CHANGELOG.md file.
  • My changes require a documentation update.
  • My changes require a migration guide.

@AMBudnik AMBudnik added the CLA signed Required for PR label Mar 27, 2024
Copy link
Copy Markdown
Contributor

@sequba sequba left a comment

Choose a reason for hiding this comment

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

Thank you for contributing to the HyperFormula project. Please look at my comments about the code.

Comment thread test/config.spec.ts Outdated
Comment thread test/config.spec.ts
Comment thread src/Config.ts Outdated
Comment thread src/Config.ts Outdated
Comment thread src/Config.ts Outdated
Comment thread src/Config.ts
@michaelbridge michaelbridge requested a review from sequba March 28, 2024 14:51
@sequba sequba changed the base branch from master to develop March 28, 2024 16:01
@sequba sequba requested a review from evanSe March 28, 2024 16:01
Copy link
Copy Markdown
Contributor

@sequba sequba left a comment

Choose a reason for hiding this comment

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

Good job! After @evanSe approval, it can be merged to develop and released with the next version of HyperFormula.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.36%. Comparing base (48bceb0) to head (0d30593).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1398   +/-   ##
========================================
  Coverage    97.36%   97.36%           
========================================
  Files          169      169           
  Lines        14421    14422    +1     
  Branches      3100     3100           
========================================
+ Hits         14041    14042    +1     
  Misses         377      377           
  Partials         3        3           
Files Coverage Δ
src/Config.ts 98.01% <100.00%> (+0.01%) ⬆️

@sequba sequba changed the base branch from develop to feature/issue-1396 April 3, 2024 11:11
@sequba sequba merged commit 16a774f into handsontable:feature/issue-1396 Apr 3, 2024
@sequba
Copy link
Copy Markdown
Contributor

sequba commented Apr 3, 2024

Merging to temporary branch feature/issue-1396 to resolve conflicts with develop

sequba added a commit that referenced this pull request Apr 3, 2024
… custom functions (#1400)

Add generic context option for custom function resolution (#1398)

* Add generic context option for custom function resolution

* Apply suggestions from code review

* Unknown type; add function test

* Update changelog

Co-authored-by: Michael Bridge <michael@chronograph.pe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA signed Required for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-instance internal custom state accessible from a custom function implementation

4 participants