-
Notifications
You must be signed in to change notification settings - Fork 114
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
mobile and desktop invisible elements #3727
base: master-mysterious-egg
Are you sure you want to change the base?
Conversation
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
467dadd
to
5cab1c7
Compare
9d42d96
to
213385b
Compare
18a0e98
to
58143fd
Compare
3faebbb
to
e0486d5
Compare
e0486d5
to
fb721c4
Compare
@@ -62,7 +63,10 @@ export class SnippetsMenu extends Component { | |||
canRedo: false, | |||
activeTab: this.props.isTranslation ? "customize" : "blocks", | |||
currentOptionsContainers: undefined, | |||
}); | |||
this.invisibleElsContext = reactive({ |
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.
Why not do a useState ?
invisibleEls: [], | ||
invisibleSelector: this.invisibleSelector, |
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.
It s ok to compute the value invisibleSelector just at the setup ?
What happens if a value in invisibleSelector change
useSubEnv({ | ||
mobileContext: this.state.mobileContext, |
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 overkill to pass it in the env ? Maybe wait to have a real use case ? Props is enough in this case no ?
let nbrCall = 0; | ||
patchWithCleanup(InvisibleElementsPanel.prototype, { | ||
getInvisibleElementsEntries() { | ||
nbrCall++; |
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.
In this type of use case, you can use expect.step :)
No description provided.