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: fix Visual Editor nested flow flickering issue by improving layout cache management #2176

Merged
merged 10 commits into from
Mar 24, 2020

Conversation

yeze322
Copy link
Contributor

@yeze322 yeze322 commented Mar 5, 2020

Description

#2175
Problem:
When deleting / adding nodes under nested flow (such as IfCondition / SwitchCondition), visual editor will have flickering issue.

Root cause:
When user deleting / inserting a leaf node, parent nodes' sizes will still be loaded from layout cache instead of recalculating the size. It makes the layouter measure the size of parent nodes incorrectly, then deletion/insertion of any nested node will cause flickering issue.

Solution:
This PR fixes #2175 by making some improvements on layout cache management. The solution can be described as the picture below.
image

For example, when user inserts/deletes new action to triggers[0].actions[0].elseActions[1], the cache of triggers[0] and triggers[0].actions[0] will be cleared, then Visual Editor layouter can remeasure their sizes to make sure the layout is updated at first render.

Task Item

fixes #2175

Screenshots

More context

Layout Cache Problem in Visual Editor.pdf

@yeze322 yeze322 changed the title fix: fix Visual Editor flickering issue by improving layout cache management fix: fix Visual Editor nested flow flickering issue by improving layout cache management Mar 5, 2020
@yeze322 yeze322 added the R9 Release 9 - May 15th, 2020 label Mar 10, 2020
@cwhitten cwhitten merged commit c640632 into microsoft:master Mar 24, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…ut cache management (microsoft#2176)

* clean affected parent node cache

* add UT for getParentPaths

* support batch change

* use trackActionListChange in CutSelection

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R9 Release 9 - May 15th, 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants