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: support copy actions across dilaogs #2198

Merged
merged 2 commits into from
Mar 9, 2020

Conversation

yeze322
Copy link
Contributor

@yeze322 yeze322 commented Mar 9, 2020

Description

Problem:
Users can't copy actions across different dialog files. If they copied some actions and pasted to another dialog file, nothing would happen.

Solution:
This PR fixes that issue by handling errors when the copy lg api invocation failed.

Context:
This bug is related to recent lg file structure changes. Previously, we only have one lg file 'common.lg', but for now, each dialog file has a default lg file, makes our copyLgTemplate api won't work if user wants to copy a template from 'Main.lg' to 'Todo.lg'.

As I discussed with Zhixiang, it's quite complicated to deal with cross-file lg template copying problem because LG template could be nested. In this PR, visual editor only defenses potential LG copy failures to make sure the functionality 'copy selection' always work even no lg content will be copied. Compared to 'nothing will be copied', 'copy actions without lg' sounds an acceptable quick fix.

Task Item

fixes #2199

Screenshots

@yeze322 yeze322 marked this pull request as ready for review March 9, 2020 05:02
@cwhitten cwhitten merged commit 79f9040 into microsoft:master Mar 9, 2020
@cwhitten cwhitten mentioned this pull request Mar 10, 2020
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.

2 participants