feat(Drivejs): remove AutoDrive parameter#641
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoved the deprecated AutoDrive parameter by simplifying the JS start logic to always call drive(index) and marking the C# AutoDrive property as obsolete while stripping it from the invocation payload. Class diagram for updated DriverJs component (removal of AutoDrive)classDiagram
class DriverJs {
+int? Index
+Task Start(int? index = 0)
-bool AutoDrive [Obsolete]
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This PR deprecates the AutoDrive parameter in the DriverJs component and removes its usage. The parameter is marked as obsolete instead of being removed entirely to maintain backward compatibility. Additionally, the project now supports both Visual Studio 17.0 (version 9.0.5) and Visual Studio 18.0 (version 10.0.0-rc.2.1.0) with conditional versioning.
- Deprecated the
AutoDriveparameter with an[Obsolete]attribute - Removed conditional auto-drive logic in JavaScript, making
drive()always execute - Added Visual Studio version-based conditional compilation and versioning
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| DriverJs.razor.cs | Marked AutoDrive parameter as obsolete with [Obsolete] and [ExcludeFromCodeCoverage] attributes; removed it from the config object sent to JavaScript |
| DriverJs.razor.js | Removed autoDrive destructuring and conditional check, now always calls driverObj.drive(index) |
| BootstrapBlazor.DriverJs.csproj | Added Visual Studio version-based conditional compilation with separate versioning for VS 17.0 and VS 18.0; removed unconditional Version property |
Comments suppressed due to low confidence (1)
src/components/BootstrapBlazor.DriverJs/Components/DriverJs.razor.js:29
- Avoid automated semicolon insertion (92% of all statements in the enclosing function have an explicit semicolon).
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| <PropertyGroup> | ||
| <Version>9.0.3</Version> | ||
| <RootNamespace>BootstrapBlazor.Components</RootNamespace> |
There was a problem hiding this comment.
The Version property has been removed from the unconditional <PropertyGroup> and only defined conditionally. If VisualStudioVersion is not '17.0' or '18.0', no version will be set, which could cause build issues. Consider adding a fallback version in the unconditional PropertyGroup or handle other VisualStudioVersion values.
| <RootNamespace>BootstrapBlazor.Components</RootNamespace> | |
| <RootNamespace>BootstrapBlazor.Components</RootNamespace> | |
| <Version>10.0.0-rc.2.1.0</Version> |
|
|
||
| <ItemGroup> | ||
| <ItemGroup Condition="'$(VisualStudioVersion)' == '17.0'"> | ||
| <PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" /> |
There was a problem hiding this comment.
The BootstrapBlazor package reference for Visual Studio 17.0 uses a variable $(BBVersion), while the Visual Studio 18.0 version uses a hardcoded value. This inconsistency makes maintenance harder. Consider either using $(BBVersion) for both versions or hardcoding both for consistency.
| <PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" /> | |
| <PackageReference Include="BootstrapBlazor" Version="10.0.0-rc.2.1.0" /> |
Link issues
fixes #640
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Remove the deprecated AutoDrive parameter from the DriverJs component, streamline the JavaScript start logic to always drive by index, and mark the C# AutoDrive property as obsolete.
Enhancements:
Chores: