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

[IMP] tables: introduce dynamic tables #3624

Closed
wants to merge 2 commits into from

Commits on Mar 25, 2024

  1. [IMP] array formula: getSpreadPositionsOf now returns root position

    Before this the getter `getSpreadPositionsOf` only returned the
    position of the cells an array formula was spread to, minus the
    cell the array formula was in. This made it impossible to differentiate
    between a cell with a normal formula, and a cell with an array formula
    returning a 1x1 matrix.
    
    Now the getter returns the root position of the array formula as well.
    
    The getter `getArrayFormulaSpreadingOn` was also modified to work when
    calling it on the root position of an array formula.
    
    There was also a bug where the spread relation weren't properly cleaned.
    
    Task: 3707037
    hokolomopo committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    f10e882 View commit details
    Browse the repository at this point in the history
  2. [IMP] tables: introduce dynamic tables

    This commit introduces the concept of dynamic table. A dynamic table
    is a table that is bound to a array formula, instead of a static range.
    The table will grow and shrink along the results of the array formula.
    
    This means that the table zones are now an UI concept. The core plugin
    now manages `CoreTable` objects, that can be either static or
    dynamic (in which case they don't have a zone, but a single cell position).
    The UI plugin `DynamicTablesPlugin` transform those `CoreTable` into
    `Table` objects that every other plugin and component can easily use.
    
    As the core plugin doesn't have access to the evaluation results, and
    can't know if a cell contains an array formula, it's the responsibility
    of the components that create a table to determine if it's dynamic or not.
    
    It is now not possible to keep the same filtered values in a copied
    table, since an UPDATE_CELL will invalidate the tables of the
    `DynamicTablesPlugin` until the next finalize, and thus `UPDATE_FILTER`
    won't work in the clipboard.
    
    Task: 3707037
    hokolomopo committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    891e892 View commit details
    Browse the repository at this point in the history