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

[9.0.0] Nested rows don't work well while HyperFormula is enabled as formulas engine #8048

Closed
aninde opened this issue May 17, 2021 · 6 comments · Fixed by #8608
Closed

[9.0.0] Nested rows don't work well while HyperFormula is enabled as formulas engine #8048

aninde opened this issue May 17, 2021 · 6 comments · Fixed by #8608
Assignees
Labels
bug HyperFormula Nested rows Plugin Regression Issues that were created while adding new changes to the source code Status: Released

Comments

@aninde
Copy link
Contributor

aninde commented May 17, 2021

Description

Nested rows don't work with the new engine of formulas.

Some of the bugs:

  1. Detaching from parent returns blank cell.
  2. After collapsing and uncollapsing, wrong values are returned.
  3. Undoing of row removal don't work.
  4. Autofill doesn't work and breaks the table due to the error in the console.
  5. All inserting options from context menu or drop-down menu doesn't work and the console throws error:
CrudOperations.js:352 Uncaught Error: Invalid arguments, expected an array of arrays or a raw cell value.
    at CrudOperations.setCellContents (CrudOperations.js:352)
    at HyperFormula.setCellContents (HyperFormula.js:344)
    at Formulas.onModifySourceData (formulas.mjs:454)
    at Core.eval (formulas.mjs:266)
    at Hooks.run (pluginHooks.mjs:190)
    at Core.runHooks (core.mjs:2101)
    at DataSource.setAtCell (dataSource.mjs:132)
    at eval (core.mjs:1535)
    at arrayEach (array.mjs:133)
    at Core.setSourceDataAtCell (core.mjs:1533)
    at DataManager.addChildAtIndex (dataManager.mjs:368)
    at DataManager.addSibling (dataManager.mjs:392)
    at Core.row_above (contextMenu.mjs:128)
    at eval (commandExecutor.mjs:81)
    at arrayEach (array.mjs:133)
    at CommandExecutor.execute (commandExecutor.mjs:80)
    at ContextMenu.executeCommand (contextMenu.mjs:277)
    at Menu.eval (contextMenu.mjs:207)
    at eval (localHooks.mjs:24)
    at arrayEach (array.mjs:133)
    at Menu.runLocalHooks (localHooks.mjs:23)
    at Menu.executeCommand (menu.mjs:330)
    at Core.beforeOnCellMouseUp (menu.mjs:196)
    at Hooks.run (pluginHooks.mjs:190)
    at Core.runHooks (core.mjs:2101)
    at Object.onCellMouseUp (tableView.mjs:584)
    at Settings.getSetting (settings.mjs:143)
    at Walkontable.getSetting (core.mjs:179)
    at Event.onMouseUp (event.mjs:205)
    at HTMLDivElement.eval (event.mjs:90)
    at HTMLDivElement.callbackProxy (eventManager.mjs:45)

Demo v(pre)9.0.0 from this PR + HyperFormula 0.6.0 https://codesandbox.io/s/nestedrows-withhyperformula-k81xx

Old engine for comparison v8.4.0 https://codesandbox.io/s/nestedrows-with-formulas-forked-xv8s6

Steps to reproduce

  1. Collapse all parents.
  2. Uncollapse them.

Demo

https://codesandbox.io/s/nestedrows-withhyperformula-k81xx

Your environment

  • Handsontable version: v9.0.0 from PR + HF v.0.6.0
  • Browser Name and version: Chrome
  • Operating System: macOS
@aninde aninde added bug Nested rows Plugin Regression Issues that were created while adding new changes to the source code HyperFormula labels May 17, 2021
@aninde aninde changed the title nested Rows don't work well while HyperFormula is enabled as formulas engine [9.0.0] Nested rows don't work well while HyperFormula is enabled as formulas engine May 17, 2021
@rsify
Copy link
Contributor

rsify commented May 18, 2021

Could be because we use visual indexes to retrieve values from hf, #7648 (comment)

@rsify
Copy link
Contributor

rsify commented May 19, 2021

After #8067 (abf1880) it seems like basic collapsing/uncollapsing is fixed at least, but there's still a lot more problems, such as undo of row removal crashing the table, autofill not working with the correct indexes when folds are folded, detaching from parents still returning a blank row and the insert options still crashing the table.

@aninde
Copy link
Contributor Author

aninde commented May 26, 2021

Collapsing and uncollapsing works in v9.0.0. https://jsfiddle.net/aninde/vzf2e0bg/
The rest of the bugs persist, so we don't close the issue. This case will need to be carefully investigated later.

@Siemienik
Copy link
Contributor

Siemienik commented May 26, 2021

Test results

Angular React Vanilla Vue ⚠️
image image image image

@rsify rsify assigned rsify and unassigned rsify May 27, 2021
@rsify
Copy link
Contributor

rsify commented May 31, 2021

I took a shot at this but gave up quickly as it was too difficult for me. From what I found:

  • Detaching from parent returns blank cell - it seems like this already wasn't working in the old plugin (throws: rowObj is undefined)
  • After collapsing and uncollapsing, wrong values are returned - fixed in abf1880
  • Autofill doesn't work and breaks the table due to the error in the console - works now
  • All inserting options from context menu or drop-down menu doesn't work and the console throws an error - still happens
  • Undoing of row removal don't work - still doesn't

@jansiegel jansiegel self-assigned this Jul 6, 2021
@jansiegel jansiegel linked a pull request Jul 30, 2021 that will close this issue
11 tasks
jansiegel added a commit that referenced this issue Aug 2, 2021
jansiegel added a commit that referenced this issue Aug 19, 2021
…8608)

* Fix some issues with nested rows, with the formulas plugin enabled. #8048

* Add some tests for #8048.

* Update src/plugins/nestedRows/data/dataManager.js

Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com>

* Add the changelog entry

Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com>
@aninde
Copy link
Contributor Author

aninde commented Sep 29, 2021

All cases from this issue will be fixed by v10.
http://jsfiddle.net/tpa2q4z5/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug HyperFormula Nested rows Plugin Regression Issues that were created while adding new changes to the source code Status: Released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants