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

Bug: Widgets can render twice during a scheduled render #712

Merged
merged 2 commits into from Apr 2, 2020

Conversation

agubler
Copy link
Member

@agubler agubler commented Apr 1, 2020

Type: bug

The following has been addressed in the PR:

Description:

Widgets can end up rendering twice during a single scheduled render which can cause issues with the rendered dom and cause unnecessary processing. This happens when the widget and a parent of a widget is invalidated and ends up rendering due to a property changes or being marked as dirty - then during the render something marks the widget dirty again which means it's rendered again.

The widget should be marked as not dirty after the render and not before.

codesandbox: https://codesandbox.io/s/dreamy-swartz-dco38

@agubler agubler added needs back-port The fix requires back porting to one or more previous major versions area: core Core bug Something isn't working labels Apr 1, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 1, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4b51411:

Sandbox Source
blissful-sutherland-s7cd5 Configuration
distracted-johnson-vg6uz PR

@agubler agubler force-pushed the do-not-mark-dirty-during-render branch from 50f7039 to 4b51411 Compare Apr 1, 2020
@codecov
Copy link

codecov bot commented Apr 1, 2020

Codecov Report

Merging #712 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #712   +/-   ##
=======================================
  Coverage   97.75%   97.75%           
=======================================
  Files         120      120           
  Lines        6949     6949           
  Branches     1577     1577           
=======================================
  Hits         6793     6793           
  Misses        156      156           
Impacted Files Coverage Δ
src/core/vdom.ts 97.98% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5321b05...4b51411. Read the comment docs.

@agubler agubler merged commit 32bab69 into dojo:master Apr 2, 2020
4 checks passed
@jellison jellison mentioned this pull request Apr 2, 2020
6 tasks
agubler added a commit to agubler/framework that referenced this pull request Apr 3, 2020
* failing unit test for rendering twice during a scheduled render

* mark dirty false after render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Core bug Something isn't working needs back-port The fix requires back porting to one or more previous major versions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants