-
Couldn't load subscription status.
- Fork 116
Add "Save Snippet" sidebar button + display custom inner content in the sidebar #3952
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
Add "Save Snippet" sidebar button + display custom inner content in the sidebar #3952
Conversation
|
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
21a0353 to
b2480c8
Compare
|
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.js
Outdated
Show resolved
Hide resolved
addons/html_builder/static/tests/custom_tab/container_buttons.test.js
Outdated
Show resolved
Hide resolved
addons/html_builder/static/src/builder/builder_sidebar/builder_sidebar.js
Outdated
Show resolved
Hide resolved
addons/html_builder/static/src/builder/builder_sidebar/builder_sidebar.js
Show resolved
Hide resolved
| context: this.context, | ||
| }, | ||
| }); | ||
| resolve(); |
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.
add new customSnippet to snippetsByCategory.snippet_custom. It will trigger the reactivity. We probably not need to reload the page
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 the end, I simply reloaded the snippets by calling load, because I still need to get the snippet html after the call (in order to be able to drop it afterwards), which is not easy to retrieve from the orm call
So the easiest was to just reload the snippets 🙂
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.xml
Outdated
Show resolved
Hide resolved
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.js
Outdated
Show resolved
Hide resolved
c4f9a57 to
ab088d7
Compare
|
I made the changes (see diff + other diff improving the rest of the of the test) 🙂 |
ab088d7 to
0cfd31b
Compare
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.xml
Outdated
Show resolved
Hide resolved
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.xml
Outdated
Show resolved
Hide resolved
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.xml
Outdated
Show resolved
Hide resolved
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.
t-on-pointerdown.stop="() => {}" (Why you need to do it ?)
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.
Because the sidebar or the container (don't remember which one) does something on pointerDown, which means that every time I clicked on the input, this click was canceled by this something, so I could not write in it
But I think this is temporary, when we will make the style,... of the sidebar correctly, maybe this could be removed ? I will see at that time 👍
addons/html_builder/static/src/builder/builder_sidebar/tabs/block_tab/block_tab.xml
Outdated
Show resolved
Hide resolved
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.
space
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 is because of prettier 🥲 I cannot add it back 😬
0cfd31b to
935584f
Compare
|
I made the changes (see diff) 🙂 |
No description provided.