-
Notifications
You must be signed in to change notification settings - Fork 281
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
Refactored resource explorer as well as related components #2342
Conversation
Pull Request Test Coverage Report for Build 151793
💛 - Coveralls |
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.
It looks like there is some cleanup that can be done in both JS and .NET. Please see feedback
libraries/botbuilder-dialogs-declarative/src/resources/folderResourceProvider.ts
Outdated
Show resolved
Hide resolved
libraries/botbuilder-dialogs-declarative/src/resources/fileResource.ts
Outdated
Show resolved
Hide resolved
"codelyzer": "^4.1.0", | ||
"mocha": "^6.2.3", | ||
"nyc": "^15.1.0", | ||
"source-map-support": "^0.5.3", | ||
"ts-node": "^4.1.0" | ||
}, | ||
"scripts": { | ||
"test": "tsc && nyc mocha tests/", | ||
"test": "tsc && nyc mocha tests/ --exit", |
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.
Intentional?
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.
Yes, we added some tests to test if resource explorer can monitor folder changes continuously, which may prevent mocha tests exiting as usual. Any better suggestions?
libraries/botbuilder-dialogs-adaptive/src/generators/languageGeneratorManager.ts
Outdated
Show resolved
Hide resolved
IMHO - it is fine to have an abstract base class for providing default implementation shared across derived classes. However, I don't think this has to mean removing the interfaces. By removing the interface, the other classes become dependent on a specific implementation. Interfaces do a good job of defining the contract in Typescript and get compiled away. There aren't the same tradeoffs between ABCs and interfaces like there are in .NET. |
Fixes #1959
Description
Changed some components from interfaces to abstract class to align with dotnet sdk
Refactored resource explorer to support more resource types besides ".dialog"
Refactored event emitters to expose add/change/remove events on resources
Clean up unused code and unused dependencies in botbuilder-dialogs-declarative
Specific Changes
Resource
: interface -> abstract classResourceProvider
: interface -> abstract classchokidar
instead ofnode-watch
to expose added/changed/removed events on resources for tracking resource changes more preciselyLanguageGeneratorManager
use resource explorer to track LG files changesFileResourceProvider
Testing
Test cases added to test resource changes tracking by resource explorer.