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: visual editor lg template don't show #1707

Merged
merged 5 commits into from
Dec 6, 2019

Conversation

zhixzhan
Copy link
Contributor

@zhixzhan zhixzhan commented Dec 5, 2019

Description

In #1700 , visual editor lg templates were not shown because of the getLgTemplate api in ShellApi was broken. This PR fixes this issue by adding a mapper inside 'getLgTemplate' for converting the LgTemplate object with prototype to a plain object.

According to the The structured clone algorithm, Function objects cannot be duplicated accross windows; attempting to do so will throw a DATA_CLONE_ERR exception.

fixes this by get lg templates from shellData.

Task Item

Fix #1700

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have functionally tested my change

Screenshots

Please include screenshots or gifs if your PR include UX changes.

@zhixzhan
Copy link
Contributor Author

zhixzhan commented Dec 6, 2019

@yeze322 I removed getLgTemplates method from shellApi, then get templates from existed shellData, can you take a look, what if i missed something ?

@yeze322
Copy link
Contributor

yeze322 commented Dec 6, 2019

@yeze322 I removed getLgTemplates method from shellApi, then get templates from existed shellData, can you take a look, what if i missed something ?

Looks good to me. ShellData in visual editor is already outdated, it's a good change.

@a-b-r-o-w-n a-b-r-o-w-n merged commit 797900e into microsoft:master Dec 6, 2019
@zhixzhan zhixzhan deleted the visual-fix branch December 9, 2019 02:00
@a-b-r-o-w-n a-b-r-o-w-n mentioned this pull request Dec 11, 2019
@a-b-r-o-w-n a-b-r-o-w-n mentioned this pull request Dec 11, 2019
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.

4 participants