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
[FIX] website, *: various fixes related to the website_preview client action #81485
Conversation
65baa0c
to
7ef8ace
Compare
234d429
to
06d5bd0
Compare
@younn-o I had to test to be able to sleep :D I pushed 4de4f29 over your branch (you can just remove it and push-force over it) -> just to show that this really work for me: it's the idea with the 2 iframes displaying the same thing... and I don't even need the scroll synchro: my eyes can't see it. I guess it's possible to see that the page "scroll to top before leaving"... but don't see it in my 3min testing. At worst, it should not be difficult to improve on top of that solution to scroll at the same place "beforeunload" or something like that. ... still we double the requests for connected users though, that's not ideal so if there is a better solution, obviously think about it 😉 (maybe something with 2 iframes but instead of loading the same URL twice, you just copy the body DOM of the user-used one "beforeunload" and paste it into the first iframe (supposing the should be the same)? (we can speak about it tomorrow if needed). |
addons/website/static/src/widgets/website_editor/website_editor.js
Outdated
Show resolved
Hide resolved
a5d784d
to
198163c
Compare
a88dbe7
to
aeb216b
Compare
37f5ecc
to
25d05ee
Compare
d979e27
to
23619f1
Compare
Before this commit, switching languages from the language dropdown while in edit/translate mode was broken. Now, the click event on this dropdown is listened alongside links with external redirection from the WebsitePreview client action, so that the client action leaves the edit mode while frontend is redirected to the right language. For that, a new leaveEditMode method is added to the website service, which removes the edition classes and unmounts the Editor component. This will further be reviewed in future commits. Also, adding a new language from the language switcher dropdown directly opens the wizard in a dialog on top of the WebsitePreview client action. Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506
Before this commit, clicking on the edit button of a slide viewed in fullscreen mode would instantiate the wysiwyg, remove it, exit the fullscreen mode et re-instantiate the wysiwyg. To prevent that, the editor component never starts with the wysiwyg shown by default when mounted. Before that, it checks if it should redirect somewhere in the publicRootReady method (if not, it shows the wysiwyg). Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506
*: test_website_modules This commit restores the display of the website loader (the "Building your website" GIF) during the installation of a module from the new content modal, or after completing the configurator flow. Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506
Before this commit, the switchTheme option was redirecting the window to the theme_install_kanban_action url. After [1] was merged, the editor is instantiated inside the webclient and the action can now be opened directly from there, without a reload. For that, the request_save event data can include an 'action' parameter, which the WysiwygAdapter will use after leaving debug mode to trigger the action with the action service. [1]: odoo@31cc10b task-2687506
f021867
to
be94eee
Compare
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.
Solved conflicts with BS5
@robodoo r+ again
This commit adds the PagePropertiesDialogWrapper and AceEditorComponentAdapter as children of the client action, instead of the NavBar. Both of the components are displayed conditionally based on the websiteContext. It allows us to remove the navbar xml patch. With the PagePropertiesDialogWrapper rendered only when needed, it can open directly the appropriate dialog in the onRendered hook, so that we can avoid passing the widget to the parent that would later open it. Follows the merge of the "website in backend" task at [1]. [1]: 31cc10b task-2687506 Part-of: #81485
Before this commit, switching languages from the language dropdown while in edit/translate mode was broken. Now, the click event on this dropdown is listened alongside links with external redirection from the WebsitePreview client action, so that the client action leaves the edit mode while frontend is redirected to the right language. For that, a new leaveEditMode method is added to the website service, which removes the edition classes and unmounts the Editor component. This will further be reviewed in future commits. Also, adding a new language from the language switcher dropdown directly opens the wizard in a dialog on top of the WebsitePreview client action. Follows the merge of the "website in backend" task at [1]. [1]: 31cc10b task-2687506 Part-of: #81485
Before this commit, clicking on the edit button of a slide viewed in fullscreen mode would instantiate the wysiwyg, remove it, exit the fullscreen mode et re-instantiate the wysiwyg. To prevent that, the editor component never starts with the wysiwyg shown by default when mounted. Before that, it checks if it should redirect somewhere in the publicRootReady method (if not, it shows the wysiwyg). Follows the merge of the "website in backend" task at [1]. [1]: 31cc10b task-2687506 Part-of: #81485
*: test_website_modules This commit restores the display of the website loader (the "Building your website" GIF) during the installation of a module from the new content modal, or after completing the configurator flow. Follows the merge of the "website in backend" task at [1]. [1]: 31cc10b task-2687506 Part-of: #81485
Before this commit, the switchTheme option was redirecting the window to the theme_install_kanban_action url. After [1] was merged, the editor is instantiated inside the webclient and the action can now be opened directly from there, without a reload. For that, the request_save event data can include an 'action' parameter, which the WysiwygAdapter will use after leaving debug mode to trigger the action with the action service. [1]: 31cc10b task-2687506 closes #81485 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adds the PagePropertiesDialogWrapper and AceEditorComponentAdapter as children of the client action, instead of the NavBar. Both of the components are displayed conditionally based on the websiteContext. It allows us to remove the navbar xml patch. With the PagePropertiesDialogWrapper rendered only when needed, it can open directly the appropriate dialog in the onRendered hook, so that we can avoid passing the widget to the parent that would later open it. Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506 Part-of: odoo#81485
Before this commit, switching languages from the language dropdown while in edit/translate mode was broken. Now, the click event on this dropdown is listened alongside links with external redirection from the WebsitePreview client action, so that the client action leaves the edit mode while frontend is redirected to the right language. For that, a new leaveEditMode method is added to the website service, which removes the edition classes and unmounts the Editor component. This will further be reviewed in future commits. Also, adding a new language from the language switcher dropdown directly opens the wizard in a dialog on top of the WebsitePreview client action. Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506 Part-of: odoo#81485
Before this commit, clicking on the edit button of a slide viewed in fullscreen mode would instantiate the wysiwyg, remove it, exit the fullscreen mode et re-instantiate the wysiwyg. To prevent that, the editor component never starts with the wysiwyg shown by default when mounted. Before that, it checks if it should redirect somewhere in the publicRootReady method (if not, it shows the wysiwyg). Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506 Part-of: odoo#81485
*: test_website_modules This commit restores the display of the website loader (the "Building your website" GIF) during the installation of a module from the new content modal, or after completing the configurator flow. Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506 Part-of: odoo#81485
Before this commit, the switchTheme option was redirecting the window to the theme_install_kanban_action url. After [1] was merged, the editor is instantiated inside the webclient and the action can now be opened directly from there, without a reload. For that, the request_save event data can include an 'action' parameter, which the WysiwygAdapter will use after leaving debug mode to trigger the action with the action service. [1]: odoo@31cc10b task-2687506 closes odoo#81485 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
task-2687506
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr