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] web: kanban: rendering of async widgets #31327

Closed
wants to merge 1 commit into
base: 12.0
from

Conversation

Projects
None yet
4 participants
@aab-odoo
Copy link
Contributor

aab-odoo commented Feb 21, 2019

This rev. fixes 3 issues with async (field) widgets in the kanban
view.

From rev. 5faec34, widget'$el doesn't exist before start. This
means that for async widgets, one can't interact with the widget's
$el right after calling appentTo. In KanbanRecord, this is exactly
what we did for both field widgets () and widgets
().

Moreover, when the kanban view was updated (e.g. when the user
refined the search using the search view), and the rendering was
async (because of the presence of an async widget), the renderer
didn't wait at all for the widget to be ready before updating the
view. This caused flickering, mostly, but also a crash in
accounting with the JournalDashboardGraph widget (because
on_attach_callabck was called before the widget was ready). To
reproduce this particular issue, go to accounting, add a filter
that doesn't match any record and save it as favorite (default),
press F5 (no record is displayed), remove the filter.

opw-1925079
opw-1925479

Closes #30087
Closes #31254

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

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

@robodoo robodoo added the seen 🙂 label Feb 21, 2019

@aab-odoo

This comment has been minimized.

Copy link
Contributor Author

aab-odoo commented Feb 21, 2019

@Julien00859 There were more issues than the one we spotted together. And this is only the web/ part. Some more is coming for web_studio, which doesn't handle the async part at all.

@aab-odoo aab-odoo force-pushed the odoo-dev:12.0-web-kanban-async-fix-aab branch Feb 21, 2019

[FIX] web: kanban: rendering of async widgets
This rev. fixes 3 issues with async (field) widgets in the kanban
view.

From rev. 5faec34, widget'$el doesn't exist before start. This
means that for async widgets, one can't interact with the widget's
$el right after calling appentTo. In KanbanRecord, this is exactly
what we did for both field widgets (<field name=.../>) and widgets
(<widget name=.../>).

Moreover, when the kanban view was updated (e.g. when the user
refined the search using the search view), and the rendering was
async (because of the presence of an async widget), the renderer
didn't wait at all for the widget to be ready before updating the
view. This caused flickering, mostly, but also a crash in
accounting with the JournalDashboardGraph widget (because
on_attach_callabck was called before the widget was ready). To
reproduce this particular issue, go to accounting, add a filter
that doesn't match any record and save it as favorite (default),
press F5 (no record is displayed), remove the filter.

opw-1925079
opw-1925479

Fixes #30087
Closes #31254

@aab-odoo aab-odoo force-pushed the odoo-dev:12.0-web-kanban-async-fix-aab branch to 383c558 Feb 21, 2019

@C3POdoo C3POdoo added the OE label Feb 21, 2019

@robodoo robodoo added the CI 🤖 label Feb 21, 2019

@aab-odoo aab-odoo requested a review from dmo-odoo Feb 22, 2019

@aab-odoo

This comment has been minimized.

Copy link
Contributor Author

aab-odoo commented Feb 22, 2019

robodoo delegate=dmo-odoo

@dmo-odoo

This comment has been minimized.

Copy link
Contributor

dmo-odoo commented Feb 22, 2019

robodoo r+

@robodoo robodoo added the r+ 👌 label Feb 22, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 22, 2019

Linked pull request(s) odoo/enterprise#3701 not ready. Linked PRs are not staged until all of them are ready.

robodoo pushed a commit that referenced this pull request Feb 22, 2019

[FIX] web: kanban: rendering of async widgets
This rev. fixes 3 issues with async (field) widgets in the kanban
view.

From rev. 5faec34, widget'$el doesn't exist before start. This
means that for async widgets, one can't interact with the widget's
$el right after calling appentTo. In KanbanRecord, this is exactly
what we did for both field widgets (<field name=.../>) and widgets
(<widget name=.../>).

Moreover, when the kanban view was updated (e.g. when the user
refined the search using the search view), and the rendering was
async (because of the presence of an async widget), the renderer
didn't wait at all for the widget to be ready before updating the
view. This caused flickering, mostly, but also a crash in
accounting with the JournalDashboardGraph widget (because
on_attach_callabck was called before the widget was ready). To
reproduce this particular issue, go to accounting, add a filter
that doesn't match any record and save it as favorite (default),
press F5 (no record is displayed), remove the filter.

opw-1925079
opw-1925479

Fixes #30087
Closes #31254

closes #31327
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 22, 2019

Merged, thanks!

@robodoo robodoo closed this Feb 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.