-
Notifications
You must be signed in to change notification settings - Fork 636
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 dyn and image loading from package docs folders. (and some other things) #14554
Conversation
remove test only code one actual test failure
dyn files still broken.
src/DocumentationBrowserViewExtension/DocumentationBrowserViewExtension.cs
Show resolved
Hide resolved
looking into the test failures, of course they pass locally. |
src/DocumentationBrowserViewExtension/DocumentationBrowserViewExtension.cs
Show resolved
Hide resolved
There are failures on this branch from my latest changes that I need to fix, please do not merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some comments
@@ -264,13 +273,13 @@ private void HandleLocalResource(OpenDocumentationLinkEventArgs e) | |||
this.shouldLoadDefaultContent = false; | |||
} | |||
|
|||
private string GetGraphLinkFromMDLocation(Uri link) | |||
private string GetGraphLinkFromMDLocation(Uri link,bool isOwnedByPackage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for curiosity you already defined the property IsOwnedByPackage then why passing it as a parameter to a method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good eye, and this is very important because unfortunately the singleton nature of the Docs browser model makes it very easy to access data which has not yet been set correctly.
For example before I made this change it was possible for me to reference isOwnedByPackage
before it had even been calculated for the node docs request we were parsing. By using the param as a dependency it's clear to callers that the method will be using it and it should be up to date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth making it a class member in that case?
Tests are passing now, any objections to merging this @pinzart90 @dnenov ? |
test/DynamoCoreWpfTests/ViewExtensions/DocumentationBrowserViewExtensionTests.cs
Show resolved
Hide resolved
//Validates that we have 5 nodes the CurrentWorkspace (after the graph was added) | ||
Assert.AreEqual(ViewModel.Model.CurrentWorkspace.Nodes.Count(), 5); | ||
//Assert.AreEqual(ViewModel.Model.CurrentWorkspace.Nodes.Count(), 5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
|
||
var graphPathValue = docsViewModel.GraphPath; | ||
|
||
var dynFileName = Path.GetFileNameWithoutExtension(docsViewModel.Link.AbsolutePath) + ".dyn"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to add an assertion for dynFileName?
Purpose
WPF DoEevnts
in user code - a dangerous thing to do, I removed that, and used the dispatcher with two separate tasks to fix the timing issue./doc
folders.PackageManagerConflictsUnloadedWithBltInPackage
test - I have no idea how this was passing before, I think the mocked method was getting invoked after the test ended, I was able to see it fail even in 2.18 before the test was marked failure - fixed it.Declarations
Check these if you believe they are true
*.resx
files