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: Optimization of dialog validation #4485

Merged
merged 7 commits into from
Oct 23, 2020
Merged

Conversation

LouisEugeneMSFT
Copy link
Contributor

Description

Most recoil atoms in the Composer state are tracking data through arrays. In the case of dialogs, this was problematic since all dialogs were being validated any time any of them had any change (say a new character in a field).

This PR addresses this issue by introducing an atom family tracking the individual dialogs. Any creation, update, validation, deletion can now target an individual dialog instead of modifying the entire array of dialogs. To be able to still list all the dialogs, an array of dialogIds is introduced. All the dialogs data can still be accessed, but it is now through a selector rather than an atom.

image

Task Item

fixes #4203

@coveralls
Copy link

coveralls commented Oct 22, 2020

Coverage Status

Coverage increased (+0.03%) to 55.297% when pulling 491b1f1 on leugene/issue4203 into e447bf6 on main.

hatpick
hatpick previously approved these changes Oct 22, 2020
GeoffCoxMSFT
GeoffCoxMSFT previously approved these changes Oct 22, 2020
@LouisEugeneMSFT LouisEugeneMSFT merged commit 70c67b4 into main Oct 23, 2020
@LouisEugeneMSFT LouisEugeneMSFT deleted the leugene/issue4203 branch October 23, 2020 17:54
@cwhitten cwhitten mentioned this pull request Nov 13, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Tracking each dialog individually instead of through an array

* Fix namming: state -> selector

* Mr Geoff PR comments

Co-authored-by: Geoff Cox (Microsoft) <gcox@microsoft.com>
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.

Optimize unnecessary extra validations (eg arrays of items that cause validation on every children)
4 participants