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

[IMP] web: handle async event handlers in debounced & throttled #3923

Draft
wants to merge 34 commits into
base: master-public-widgets
Choose a base branch
from

Conversation

bso-odoo
Copy link

@bso-odoo bso-odoo commented Jan 9, 2025

Maybe a very bad idea: this breaks other tests

ged-odoo and others added 30 commits January 8, 2025 15:30
This commit introduces a minimalist "framework" that will replace the
PublicWidget system. The goal is to make it easier for all public code
(website/portal/...) to integrate with the web framework and Owl. At the
same time, the new code does not depend on jquery and uses more solid
and modern abstractions.

The main part of this is the Interaction class, that defines a lifecycle
system and a way to specify the dynamic content of an interaction (event
handlers/dynamic attributes/...)
The next commit in this PR is a large scale refactoring of website to
rewrite all public widgets as interactions. However, many files will be
moved around and modified. So, we add this preliminary commit that only
moves files around so the git history will be maintained.
With the new Interaction system, it is now possible to remove all public
widgets. This commit refactors all the code from website to do that.
Before adapting public widgets to the Interaction, we introduce this
commit to make it easier to follow the history of files that will be
moved around.
This commit adapt the code of many (but not all) public widgets as
Interactions.
Before this commit the menu built in the sidebar would not be
created properly, which could result in bugs or just one item
behing present.

This commit moves the main functions that generate the sidebar
menu in the base interaction to avoid duplicate, modify it to
handle the style that was added by the purchase sidebar and
make sure all the text content is taken into account for the
menu.

Moreover it improves the master version by not splitting some
titles. Before, "Request for Quotations P000004" was splitted
in 2 items ("Request ..." and "P000004"). It is now only 1 item.

a
robinlej and others added 4 commits January 9, 2025 13:14
*: blog, event, sale

HOOT's `MockRequest` constructs a new Request, but the `body` parameter
isn't supported on Firefox, and therefore shouldn't be used in tests.
`el.style.transform` don't send the same info in Firefox and Chrome,
it's better to use the actual computed styles to make the comparison.

Additionnally, `checkHeader` now processes several `expect()` so we have
more accurate outputs when launching the tests, rather than just a
boolean which is hard to debug when it fails.
Maybe a very bad idea: this breaks other tests
@robodoo
Copy link

robodoo commented Jan 9, 2025

This PR targets the un-managed branch odoo-dev/odoo:master-public-widgets, it needs to be retargeted before it can be merged.

@ged-odoo ged-odoo force-pushed the master-public-widgets branch 2 times, most recently from 4775765 to 163eaa9 Compare January 15, 2025 14:19
@robinlej robinlej force-pushed the master-public-widgets branch 3 times, most recently from 6910b8e to a06a3d5 Compare January 17, 2025 15:55
@ged-odoo ged-odoo force-pushed the master-public-widgets branch 3 times, most recently from bd71f76 to 076bf2d Compare January 23, 2025 08:27
@ged-odoo ged-odoo force-pushed the master-public-widgets branch 3 times, most recently from 66d48d3 to 5583f3c Compare January 27, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants