Conversation
pinzart90
commented
Dec 4, 2023
pinzart90
commented
Dec 4, 2023
| this.documentationBrowser.DpiChanged -= DocumentationBrowser_DpiChanged; | ||
|
|
||
| if (this.documentationBrowser.CoreWebView2 != null) | ||
| if (this.documentationBrowser != null) |
Contributor
Author
There was a problem hiding this comment.
code here was just moved under a null check
pinzart90
commented
Dec 4, 2023
pinzart90
commented
Dec 4, 2023
pinzart90
commented
Dec 4, 2023
src/DocumentationBrowserViewExtension/DocumentationBrowserViewExtension.cs
Show resolved
Hide resolved
pinzart90
commented
Dec 4, 2023
pinzart90
commented
Dec 4, 2023
| string msg = "Browser Loaded"; | ||
| LogToDynamoConsole(msg); | ||
|
|
||
| InitializeAsync(); |
Contributor
Author
There was a problem hiding this comment.
We initialize webview2 only after it is loaded as part of the visual tree (Browser_Loaded)
pinzart90
commented
Dec 4, 2023
pinzart90
commented
Dec 4, 2023
| } | ||
|
|
||
| public class NotificationCenterController | ||
| public class NotificationCenterController : IDisposable |
Merged
mjkkirschner
reviewed
Dec 4, 2023
src/DocumentationBrowserViewExtension/DocumentationBrowserView.xaml.cs
Outdated
Show resolved
Hide resolved
mjkkirschner
reviewed
Dec 4, 2023
mjkkirschner
reviewed
Dec 4, 2023
mjkkirschner
reviewed
Dec 4, 2023
mjkkirschner
approved these changes
Dec 4, 2023
aparajit-pratap
approved these changes
Dec 4, 2023
* update * update * Update DocumentationBrowserView.xaml.cs * update * Update DocumentationBrowserView.xaml.cs * update * update --------- Co-authored-by: pinzart <[email protected]>
Contributor
Author
|
OK, waiting for the final checks then I will merge |
| viewExtension.HandleRequestOpenDocumentationLink(externalEvent); | ||
| DispatcherUtil.DoEventsLoop(); | ||
|
|
||
| Assert.AreEqual(AsyncMethodState.NotStarted, viewExtension.BrowserView.initState); |
Contributor
There was a problem hiding this comment.
Why is it not started here? Won't webview2 initialization be complete by this point?
Contributor
Author
There was a problem hiding this comment.
using an externalLink will not startup webview2.
That is what the test is verifying
aparajit-pratap
approved these changes
Dec 6, 2023
This reverts commit cfaceb2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the many issues during testing (and not only):
EnsureCoreWebView2Asyncuntil the control is visible.Pretty good description here.
I tried to move most of the webview2 initialization calls in the Loaded callback (basically after the webview2 control is added to the visual layout). DocumentationBrowser's webview2 has not been refactored in such a way because it is used in slightly more complicated workflows.
An example of buggy behavior:
This might cause crashes, memory leaks etc.