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 dialog redirect/refresh behavior #3914

Merged
merged 6 commits into from
Aug 27, 2020
Merged

fix: Fix dialog redirect/refresh behavior #3914

merged 6 commits into from
Aug 27, 2020

Conversation

tdurnford
Copy link
Collaborator

Description

Currently, the <DesignPage /> component uses the useEffect hook to select the OnBeginDialog trigger when the user selects a dialog in the Project Tree. There are two issues with this approach. First, when the user refreshes the page or modifies the url, the page returns to the OnBeginDialog trigger. Secondly, the page navigates to the AdaptiveDialog editor first and then redirects to OnBeginDialog trigger. This causes the screen to flash between the two editors instead of just rendering the OnBeginDialog trigger.

To resolve this, we shifted the responsibility to select the OnBeginDialog trigger from the <DesignPage /> to the navTo dispatcher, which is called when the user selects a different dialog from the Project Tree. If the selected dialog has an OnBeginDialog trigger, the dispatcher appends the selection to the url before navigating to the appropriate editor. This allows the user to freely refresh the browser and modify the url without navigating away from their intended editor. It also doesn't cause the design page to switch between the AdaptiveDialog and the OnBeginDialog editors.

Task Item

Closes #3770
Closes #3911

@coveralls
Copy link

coveralls commented Aug 27, 2020

Coverage Status

Coverage increased (+0.06%) to 56.722% when pulling 259e6e9 on tdurnford:fix/redirect into a04cf9a on microsoft:main.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 56.597% when pulling f42073a on tdurnford:fix/redirect into b9ab3cb on microsoft:main.

@a-b-r-o-w-n a-b-r-o-w-n self-assigned this Aug 27, 2020
@cwhitten cwhitten merged commit 0a1958e into microsoft:main Aug 27, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* fix: Fix dialog redirect/refresh behavior

* small changes

* fix breadcrumb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants