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

Improve frontend stability #1482

Merged
merged 5 commits into from
Mar 17, 2022
Merged

Improve frontend stability #1482

merged 5 commits into from
Mar 17, 2022

Conversation

zuozhiw
Copy link
Collaborator

@zuozhiw zuozhiw commented Mar 15, 2022

This PR improves the stability of the frontend by making two changes:

  1. After adding the lock related logic, we have an increasing number of error ExpressionChangedAfterItHasBeenCheckedError. When this error occurs, some components on the frontend might become freezing or unresponsive.
    image

This is due to not running angular change detection after the lock status is changed. We have manually added change detection check whenever lock status is changed. This is also one of Angular's recommended ways to fix it.

  1. After adding the async rendering functionaility, we found another JointJS related bug. This error is more likely to happen when switching workflows in version control. When this error happens, JointJS cannot render the operator links.
    image

This is due to an internal bug in JointJS, see clientIO/joint#1320 . We have adopted a recommended workaround to fix this issue. Thanks @MysteriousChallenger for identifying and solving this issue.

Copy link
Collaborator

@MysteriousChallenger MysteriousChallenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the version switcher bug where links disappear

@Yicong-Huang
Copy link
Collaborator

I have met this ExpressionChangedAfterItHasBeenCheckedError in another branch (maybe seen after upgrade of jointjs, I could be wrong). I wonder what is the best practice to avoid this error? also what kind of component would need to consider run change detection manually?

Copy link
Collaborator

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a question regarding the detechChange solution.

@zuozhiw zuozhiw merged commit ea2f7be into master Mar 17, 2022
@zuozhiw zuozhiw deleted the zuozhi-gui-stable branch March 17, 2022 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants