Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

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) <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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)

5 participants