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] Selection: convert grid drag-n-drop into a hook #5919

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rrahir
Copy link
Collaborator

@rrahir rrahir commented Mar 14, 2025

Task: 3582335

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

Sorry, something went wrong.

@robodoo
Copy link
Collaborator

robodoo commented Mar 14, 2025

Pull request status dashboard


const cleanUp = () => {
cleanUpFns.forEach((fn) => fn());
cleanUpFns = [() => clearTimeout(timeOutId), () => (timeOutId = null)];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we coul call it by hand and not repush each time

@rrahir
Copy link
Collaborator Author

rrahir commented Mar 17, 2025

Missing a test with the improved behaviour that clears up the event listeners once the caller was unmounted

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.

oops


let cleanUpFns: (() => void)[] = [() => clearTimeout(timeOutId), () => (timeOutId = null)];

const cleanUp = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to test that the callbacks are cleanup on unmount now ?

@rrahir rrahir force-pushed the master-grid-dnd-hook-rar branch 3 times, most recently from 6fd6118 to fbdd6cd Compare March 18, 2025 13:46
@rrahir rrahir force-pushed the master-grid-dnd-hook-rar branch from fbdd6cd to c58da86 Compare March 25, 2025 12:11
Task: 3582335
@rrahir rrahir force-pushed the master-grid-dnd-hook-rar branch from c58da86 to 756e549 Compare March 25, 2025 12:12
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.

None yet

3 participants