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

[FIX] website, *: various fixes related to the website_preview client action #81485

Closed
wants to merge 5 commits into from

Conversation

younn-o
Copy link
Contributor

@younn-o younn-o commented Dec 15, 2021

task-2687506

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Dec 15, 2021

@younn-o younn-o force-pushed the master-website-in-backend-yol branch from 65baa0c to 7ef8ace Compare December 15, 2021 17:15
@C3POdoo C3POdoo added the RD research & development, internal work label Dec 15, 2021
@younn-o younn-o force-pushed the master-website-in-backend-yol branch 4 times, most recently from 234d429 to 06d5bd0 Compare December 21, 2021 17:05
@qsm-odoo
Copy link
Contributor

@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).
(and there is still the redirect flicker issue, I am sure there is a solution).

@younn-o younn-o force-pushed the master-website-in-backend-yol branch 2 times, most recently from a5d784d to 198163c Compare December 22, 2021 17:32
@younn-o younn-o closed this Dec 22, 2021
@younn-o younn-o deleted the master-website-in-backend-yol branch December 22, 2021 17:39
@younn-o younn-o restored the master-website-in-backend-yol branch December 22, 2021 17:41
@younn-o younn-o reopened this Dec 22, 2021
@younn-o younn-o force-pushed the master-website-in-backend-yol branch 4 times, most recently from a88dbe7 to aeb216b Compare December 30, 2021 13:09
@younn-o younn-o force-pushed the master-website-in-backend-yol branch 5 times, most recently from 37f5ecc to 25d05ee Compare January 6, 2022 18:21
@younn-o younn-o force-pushed the master-website-in-backend-yol branch 6 times, most recently from d979e27 to 23619f1 Compare January 13, 2022 17:41
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
@qsm-odoo qsm-odoo force-pushed the master-website-in-backend-yol branch from f021867 to be94eee Compare July 8, 2022 15:38
Copy link
Contributor

@qsm-odoo qsm-odoo left a 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

robodoo pushed a commit that referenced this pull request Jul 8, 2022
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
robodoo pushed a commit that referenced this pull request Jul 8, 2022
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
robodoo pushed a commit that referenced this pull request Jul 8, 2022
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
robodoo pushed a commit that referenced this pull request Jul 8, 2022
*: 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
robodoo pushed a commit that referenced this pull request Jul 8, 2022
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>
@robodoo robodoo closed this Jul 8, 2022
@robodoo robodoo temporarily deployed to merge July 8, 2022 19:01 Inactive
@robodoo robodoo added the 15.5 label Jul 8, 2022
@qsm-odoo qsm-odoo deleted the master-website-in-backend-yol branch July 12, 2022 09:46
eres-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jul 19, 2022
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
eres-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jul 19, 2022
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
eres-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jul 19, 2022
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
eres-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jul 19, 2022
*: 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
eres-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jul 19, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
15.5 RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants