-
Notifications
You must be signed in to change notification settings - Fork 108
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
API fix #687
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #687 +/- ##
===========================================
- Coverage 92.27% 92.14% -0.14%
===========================================
Files 166 166
Lines 39412 39548 +136
Branches 3575 3606 +31
===========================================
+ Hits 36368 36442 +74
- Misses 3038 3100 +62
Partials 6 6
|
This pull request introduces 1 alert when merging 0db693e into 6f64f7c - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 53a5af5 into 6f64f7c - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 3284b60 into 6f64f7c - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging d3c36c1 into 6f64f7c - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from API pov 👍
I'm adding @kirszenbaum as reviewer as he's responsible for the docs, and we're touching public API here. We probably should check if we're not using those methods anywhere in docs
This pull request introduces 1 alert when merging 831818a into 0041732 - view on LGTM.com new alerts:
|
CHANGELOG.md
Outdated
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- **Breaking change**: Changed API of many sheet-related methods to take sheetId instead of sheetName as an argument. (#645) | |||
- **Breaking change**: Removed support for matrix formulas (`{=FORMULA}`) notation. Engine now supports formulas returning array of values (instead of only scalars). (#652) | |||
- **Breaking change**: Removed numeric matrix detection along with matrixDetection and matrixDetectionThreshold config options. (#669) | |||
- **Breaking change**: Changed API of many function to take SimpleCellRange type argument instead of corner + width + height. (#687) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **Breaking change**: Changed API of many function to take SimpleCellRange type argument instead of corner + width + height. (#687) | |
- **Breaking change**: Changed API of the following methods to take `SimpleCellRange` type argument: `copy`, `cut`, `getCellDependents`, `getCellPrecedents`, `getFillRangeData`, `getRangeFormulas`, `getRangeSerialized`, `getRangeValues`, `isItPossibleToMoveCells`, `isItPossibleToSetCellContents`, `moveCells`. (#687) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wojciechczerniak FYI: The release note gets kinda long when we list all affected methods
@izulin Looking at the API ref, I think there are two more code examples that need updating. GitHub doesn't allow me to suggest changes to those lines, so I'm listing them here:
getRangeFormulas
In HyperFormula.ts, change line 2259 from:
* const rangeFormulas = hfInstance.getRangeFormulas({ sheet: 0, col: 0, row: 0 }, 2, 2);
to:
* const rangeFormulas = hfInstance.getRangeFormulas({start: { sheet: 0, col: 0, row: 0 }, end: { sheet: 0, col: 1, row: 1 }});
getRangeSerialized
In HyperFormula.ts, change line 2289 from:
* const rangeSerialized = hfInstance.getRangeSerialized({ sheet: 0, col: 0, row: 0 }, 2, 2);
to:
* const rangeSerialized = hfInstance.getRangeSerialized({start: { sheet: 0, col: 0, row: 0 }, end: { sheet: 0, col: 1, row: 1 }});
Co-authored-by: kirszenbaum <jakub.wisniewski@handsontable.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
This pull request introduces 2 alerts when merging ca619d0 into 9831e63 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 47252a7 into 9831e63 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging a0af181 into 9831e63 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point we validate all arguments? Maybe we have to update changelog entry "Added validation of API argument types for simple types." then?
@@ -892,6 +905,9 @@ export class HyperFormula implements TypedEmitter { | |||
* | |||
* @param {Partial<ConfigParams>} newParams configuration options to be updated or added | |||
* | |||
* @throws [[ExpectedValueOfTypeError]] when some parameters of config are of wrong type (e.g. currencySymbol) | |||
* @throws [[ConfigValueEmpty]] when some parameters of config are of invalid value (e.g. currencySymbol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"value empty" error for "invalid value" ? This line may not be correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it's actually like that: if you try to provide ""
as a currencySymbol then you get this error
@@ -2699,26 +2754,30 @@ export class HyperFormula implements TypedEmitter { | |||
* | |||
* @category Helpers | |||
*/ | |||
public getCellDependents(address: SimpleCellAddress | AbsoluteCellRange): (AbsoluteCellRange | SimpleCellAddress)[] { | |||
public getCellDependents(address: SimpleCellAddress | SimpleCellRange): (SimpleCellRange | SimpleCellAddress)[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirszenbaum Probably for another issue, should we add another example with SimpleCellRange as input? Currently only SimpleCellAddress is demonstrated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wojciechczerniak - sure, I added a note to the backlog: https://github.com/handsontable/hyperformula/projects/1#card-63587403
@@ -2730,20 +2789,22 @@ export class HyperFormula implements TypedEmitter { | |||
* | |||
* @category Helpers | |||
*/ | |||
public getCellPrecedents(address: SimpleCellAddress | AbsoluteCellRange): (AbsoluteCellRange | SimpleCellAddress)[] { | |||
public getCellPrecedents(address: SimpleCellAddress | SimpleCellRange): (SimpleCellRange | SimpleCellAddress)[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirszenbaum Same here, we may show another way to use this method in the @example
tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wojciechczerniak - sure, I added a note to the backlog: https://github.com/handsontable/hyperformula/projects/1#card-63587403
This pull request introduces 1 alert when merging e2ced12 into 8f02f1d - view on LGTM.com new alerts:
|
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
This pull request introduces 1 alert when merging 97ceab9 into ee22e12 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Context
Fixes API of getFillRangeData so it conforms to how we pass ranges.
How has this been tested?
Types of changes
Other: change to API.
Related issue(s):
Checklist: