HF-161: document OFFSET function limitations#1666
Open
marcin-kordas-hoc wants to merge 5 commits into
Open
Conversation
|
Task linked: HF-161 Document limitations of the OFFSET function |
✅ Deploy Preview for hyperformula-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
3 tasks
Performance comparison of head (8fb75e9) vs base (d213a57) |
dac40ae to
563642b
Compare
… to known-limitations)
Per Q2 principle (describe runtime-observable behavior, not internal strings): replace verbatim copies of internal parser error messages with behavioral descriptions. Future internal-string refactors will no longer silently invalidate these doc comments.
8b0b936 to
4b5366c
Compare
- Replace 'Raises a parsing error' wording with explicit 'cell stores a parser error' — the JS API does not throw an exception - Specify 'bare positive integer literals' instead of 'positive integers' to reflect that the parser accepts only NUMBER AST nodes (so `+1` and parenthesised expressions are also rejected, not just non-integers) - Reframe the out-of-sheet bullet to make the parse-time-vs-evaluation distinction explicit (matches Excel value but not detection timing)
✅ Deploy Preview for hyperformula-dev-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1666 +/- ##
========================================
Coverage 97.16% 97.16%
========================================
Files 175 175
Lines 15319 15319
Branches 3287 3287
========================================
Hits 14884 14884
Misses 435 435 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a single canonical
### OFFSET functionsub-section under## Nuances of the implemented functionsindocs/guide/known-limitations.md. Documents all six behavioral limits of the OFFSET function in HyperFormula, each backed either by an existing test inunit/parser/offset-translation.spec.tsor by a runtime check captured before this PR was opened.Removes the now-superseded one-row OFFSET entry from
docs/guide/list-of-differences.md(per Kuba's decision in the 2026-04-21 meeting: "można wtedy to stąd też usunąć. Żeby wszystko było tam jednak"). The HF-vs-Excel/Sheets behavioral differences for OFFSET are not lost — they remain documented in full inknown-limitations.mdunder the new sub-section, which is the canonical place for parse-time restrictions per the 04-21 decision to consolidate.Linked
known-limitations/list-of-differences/specifications-and-limitspagesLimits documented
NUMBERAST nodes only (unary+, parens, non-integers, values <1 all rejected at parse time)#REF!error stored at parse time (not evaluation time), with the message Resulting reference is out of the sheetgetCellFormulareturns the resolved reference, not the original=OFFSET(...)getCellFormulashows the resolved reference rather than the callRuntime verification
All six limits were verified against this branch's HEAD before publishing:
Tests covering all six limits live in
test/hyperformula-tests/unit/parser/offset-translation.spec.ts(24 tests, lines 13–206 in the private repo). Run vianpm run test:jest -- --testPathPattern="offset-translation".Test plan
handsontable/hyperformula/guide/known-limitations— verify the new### OFFSET functionsub-section renders, including the four embeddedjscode blocks/guide/list-of-differences— verify the table is intact and the OFFSET row is goneNotes
ErrorMessage.OutOfSheetstring is intentionally NOT quoted verbatim in the docs; the bullet describes the behavior instead, so future internal-string refactors don't break the docs.NUMBERliterals (unary+etc. rejected).