Skip to content

Conversation

@fdamhaut
Copy link
Contributor

@fdamhaut fdamhaut commented Dec 9, 2025

Description:

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

Task: 4863945

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 9, 2025

Pull request status dashboard

@fdamhaut fdamhaut force-pushed the master-avoid-empty-target-flda branch from b44208d to 79b7180 Compare December 9, 2025 14:18
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.

Sounds good 👍

Did you check the allowDispatch of all the target dependent commands ? Maybe some were already rejecting the command if it was empty, in which case it's duplicated code.

}
);

test.each(Object.entries(TEST_COMMANDS).filter(([cmdName, cmd]) => isTargetDependent(cmd)))(
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have OT_TESTS_TARGET_DEPENDANT_COMMANDS constant. But filtering on the command content sounds like a better idea than a static list, could you maybe change OT_TESTS_TARGET_DEPENDANT_COMMANDS (and similar constants) to do that ?

Comment on lines +1055 to +1057
if (isTargetDependent(cmd) && cmd.target.length === 0) {
return CommandResult.EmptyTarget;
}
Copy link
Contributor

@hokolomopo hokolomopo Dec 17, 2025

Choose a reason for hiding this comment

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

could we do the same for the rangeDependantCommands ? I don't quite get @rrahir comment in the pad about ADD_CONDITIONAL_FORMAT being valid with an empty list of range, we have an explicit check to reject it if the ranges are empty.

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