o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

[IMP] filter: allow filter by criterion

Open hokolomopo opened this issue 9 months ago • 1 comments

Description:

[IMP] filter: allow filter by criterion

With this commit, it is now possible to filter a table based on a criterion, eg. filters all the values greater than 10.

[REF] filter: add FilterValueList component

This commit moves the part of the filter menu dealing with the list of filtered values to a separate component.

Also fixed the hover style of the sort buttons in the filter menu.

[REF] conditional format: use same code as data validation

This commit refactors the conditional format to use the same code as the data validation to compute the CellIs rule operators.

This required a small fix in behavior of data validation to have a correct behavior that matches the CFs. Now the data validation rule are type sensitive, ="13" won't match a criterion isEqual 13.

[REF] data validation: make criterion component names more generic

This commit rename all the data_validation_criterion components to criterion components, since they will be used for more than just data validation.

[MOV] data validation: make criterion file names generic

This commit rename all the data_validation_criterion files to criterion files, since they will be used for more than just data validation.

[REF] conditional_format: rename types to match data validation

This commit renames the types of the conditional format operators to match the data validation operators, that way we can reuse the same code for both features.

[FIX] popover: adapt position if child is resized

The popover component would only update its position at useEffect. But if the child component is resized, useEffect would not be called.

This commit adds a resize observer to the popover component to update its position when the child is resized.

[FIX] hook: remove wrong useAbsoluteBoundingRect hook

The hook useAbsoluteBoundingRect is updated when the component is mounted/patched. But that's not enough: a HTML element can change boundingRect without a owl rendering. That happens if the element is inside a bootstrap collapsible, which never trigger an owl rendering.

Task: 4592118

review checklist

  • [ ] feature is organized in plugin, or UI components
  • [ ] support of duplicate sheet (deep copy)
  • [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • [ ] in model/UI: ranges are strings (to show the user)
  • [ ] undo-able commands (uses this.history.update)
  • [ ] multiuser-able commands (has inverse commands and transformations where needed)
  • [ ] new/updated/removed commands are documented
  • [ ] exportable in excel
  • [ ] translations (_t("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo

hokolomopo avatar Mar 24 '25 07:03 hokolomopo

Pull request status dashboard

robodoo avatar Mar 24 '25 07:03 robodoo

@robodoo rebase-ff

rrahir avatar May 12 '25 11:05 rrahir

Merge method set to rebase and fast-forward.

robodoo avatar May 12 '25 11:05 robodoo

@robodoo r+

rrahir avatar May 12 '25 12:05 rrahir