-
Notifications
You must be signed in to change notification settings - Fork 116
Do not start all plugins in translate mode #4598
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
Do not start all plugins in translate mode #4598
Conversation
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
ad51670
to
cf167fd
Compare
@@ -99,10 +99,10 @@ export class VisibilityPlugin extends Plugin { | |||
const isShown = this.toggleVisibilityStatus(editingEl, show); | |||
|
|||
if (!isShown) { | |||
this.dependencies["builder-options"].deactivateContainers(); | |||
this.dispatchTo("deactivate_containers"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.dispatchTo("element_toggle_visibility_handlers", { el, isShown });
if (show) { | ||
this.shared["builder-options"].updateContainers(snippetEl); | ||
this.getResource("update_containers").forEach((handler) => handler(snippetEl)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe duplicate code
b2fa8de
to
12f6a12
Compare
deactivateContainersIfTargetHidden(elToVisibilityMap) { | ||
for (const [el, visibility] of elToVisibilityMap.entries()) { | ||
if (el.contains(this.target) && !visibility) { | ||
this.deactivateContainers(); | ||
return; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need something more generic. Why not use onSelectedElVisibilityUpdated ?
Maybe rename onElVisibilityUpdated.
Check if el.contains(this.target) || el === this.target && !show then this.deactivateContainers
12f6a12
to
821df91
Compare
821df91
to
7527a6b
Compare
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
No description provided.