Skip to content

Conversation

@fdamhaut
Copy link
Contributor

Task: 3323871

Description:

description of this task, what is implemented and why it is implemented that way.

Task: TASK_ID

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 Dec 16, 2025

Pull request status dashboard

Copy link
Contributor

@hokolomopo hokolomopo left a comment

Choose a reason for hiding this comment

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

A bunch of small issues, and added some testing notes in the pad. But the feature is very cool :D

import { Command, CommandResult } from "../../types/commands";
import { UIPlugin } from "../ui_plugin";

export class FigureUIPlugin extends UIPlugin {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're trying to replace feature UI plugins by stores.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case as there is no state and the plugin is only used to group the commands. I feel a plugin is a better choice according to this

Comment on lines +523 to +524
if (this.copiedData?.figureIds && this.copiedData.figureIds.length) {
const figureId = this.copiedData.figureIds[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add all the copied charts inside the HTML ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for this is that I want getClipboardTextAndImageContent to have matching HTML and Image content.
But I cannot add more image to the OS clipboard without a larger refactor of the clipboard to have multiple Image (which i plan to do another task for). So in the mean time, both method only copy the first image to the OS clipboard

Comment on lines +679 to +683
const figuresUI = selectedFiguresIds
.map((id) => this.getters.getFigure(sheetId, id))
.filter(isDefined)
.map((f) => this.getters.getFigureUI(sheetId, f));
const topLeft = rectUnion(...figuresUI);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say it's the responsibility of the clipboard handlers to figure the top-left, not of the clipboard plugin

Copy link
Contributor Author

@fdamhaut fdamhaut Dec 19, 2025

Choose a reason for hiding this comment

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

I feel like I would rather leave it there compared to having this copied thrice in the three figure clipboard handlers (which would then need to act based on data they don't copy).

@fdamhaut fdamhaut force-pushed the master-multi-figure-select-flda branch from 42f3d68 to 0739df9 Compare December 19, 2025 13:18
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.

3 participants