Skip to content

Conversation

@hokolomopo
Copy link
Contributor

Description:

This commit adds a side panel for all number formats. This merges
the old date format/currency format panels into a single "More formats"
panel, with tabs for each category of formats (number, date, currency).

Task: 3149088

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

@robodoo
Copy link
Collaborator

robodoo commented Oct 2, 2025

Pull request status dashboard

@hokolomopo hokolomopo changed the base branch from master to master-fix-input-rar October 2, 2025 09:43
@hokolomopo hokolomopo changed the base branch from master-fix-input-rar to master October 2, 2025 09:44
@robodoo
Copy link
Collaborator

robodoo commented Oct 2, 2025

Pull request status dashboard

@hokolomopo hokolomopo force-pushed the master-custom-format-panel-adrm branch 2 times, most recently from 0db08e7 to 14c457b Compare October 30, 2025 09:49
Comment on lines +54 to +56
this.model.selection.observe(this, {
handleEvent: this.handleSelectionEvent.bind(this),
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.onDispose(() => {
      // release the selection, sinon, bim: memory leak
});

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch ! There is no method to unobserve in the selection processor tho 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added another commit to add an unobserve method :)

In the test `can set cell format`, after opening the `More Formats`
tool, we do a snapshot of the whole fixture for testing purposes.

Snapshotting the whole fixture, is useless and guarantees that
any change will need to update this unrelated snapshot.

Task: 3149088
This commits adds a check for the command `SET_FORMATTING` to avoid
useless revisions when the command doesn't change the format/style of
any cell.

Task: 3149088
The selection stream processor was missing a method to stop observing
events after starting to observe them, which could lead to memory leak.

The `AggregateStatisticsStore` was never releasing its observation,
which was not a problem in practice because the store is never disposed,
but let's fix it anyway.

Task: 3149088
This commit adds a side panel for all number formats. This merges
the old date format/currency format panels into a single "More formats"
panel, with tabs for each category of formats (number, date, currency).

Task: 3149088
@hokolomopo hokolomopo force-pushed the master-custom-format-panel-adrm branch from 14c457b to 9c6f863 Compare October 31, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants