-
Couldn't load subscription status.
- Fork 542
Publish Dialog - Advanced deployment options #20346
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
base: sai/vscodePublishDialog_3ServerConnection
Are you sure you want to change the base?
Publish Dialog - Advanced deployment options #20346
Conversation
…odePublishDialog_4AdvancedOption
…odePublishDialog_4AdvancedOption
…odePublishDialog_4AdvancedOption
…odePublishDialog_4AdvancedOption
…odePublishDialog_4AdvancedOption
…odePublishDialog_4AdvancedOption
…ons and few tests
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.
Pull Request Overview
This PR adds an "Advanced Deployment Options" drawer to the Publish Project dialog, allowing users to configure deployment options through a UI instead of manually editing XML profiles. The implementation includes support for loading, modifying, and saving deployment options with the publish profile.
Key changes:
- New advanced deployment options drawer component with search and categorized options (General, Ignore, Exclude Object Types)
- State management for deployment options including a new
updateDeploymentOptionsreducer - Integration with DacFx service to load and save deployment options from/to publish profiles
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/publishProjectWebViewController.test.ts | Added tests for updateDeploymentOptions reducer, profile loading with deployment options, and option grouping |
| src/sharedInterfaces/publishDialog.ts | Added defaultDeploymentOptions to state and updateDeploymentOptions to reducers/provider interface |
| src/reactviews/pages/PublishProject/publishProjectStateProvider.tsx | Implemented updateDeploymentOptions action in state provider |
| src/reactviews/pages/PublishProject/publishProject.tsx | Added Advanced button and drawer integration to the main dialog |
| src/reactviews/pages/PublishProject/components/advancedDeploymentOptionsDrawer.tsx | New component implementing the advanced options drawer with search, categorization, and local change tracking |
| src/reactviews/common/locConstants.ts | Added localized strings for advanced options UI |
| src/publishProject/publishProjectWebViewController.ts | Implemented updateDeploymentOptions reducer and improved profile loading with deployment options support |
| src/constants/locConstants.ts | Added backend localized string constants |
| localization/xliff/vscode-mssql.xlf | Added translation units for new strings |
| localization/l10n/bundle.l10n.json | Added English translations for new strings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (value && !excludedTypes.includes(optionName)) { | ||
| excludedTypes.push(optionName); | ||
| } else if (!value && excludedTypes.includes(optionName)) { | ||
| excludedTypes.splice(excludedTypes.indexOf(optionName), 1); |
Copilot
AI
Oct 29, 2025
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.
The code compares optionName (lowercase key from objectTypesDictionary) with items in excludedTypes array (which contains display names like 'Users', 'Logins') using a case-sensitive comparison. This is inconsistent with the loading logic at line 146 which uses case-insensitive comparison. The comparison should be case-insensitive and compare against the display name from objectTypesDictionary, not the key. Update to: const displayName = updatedOptions.objectTypesDictionary[optionName]; if (value && !excludedTypes.some(t => t.toLowerCase() === displayName.toLowerCase())) { excludedTypes.push(displayName); } else if (!value) { const index = excludedTypes.findIndex(t => t.toLowerCase() === displayName.toLowerCase()); if (index !== -1) excludedTypes.splice(index, 1); }
| if (value && !excludedTypes.includes(optionName)) { | |
| excludedTypes.push(optionName); | |
| } else if (!value && excludedTypes.includes(optionName)) { | |
| excludedTypes.splice(excludedTypes.indexOf(optionName), 1); | |
| const displayName = updatedOptions.objectTypesDictionary[optionName]; | |
| if (value && !excludedTypes.some(t => t.toLowerCase() === displayName.toLowerCase())) { | |
| excludedTypes.push(displayName); | |
| } else if (!value) { | |
| const index = excludedTypes.findIndex(t => t.toLowerCase() === displayName.toLowerCase()); | |
| if (index !== -1) excludedTypes.splice(index, 1); |
| } | ||
|
|
||
| return groups; | ||
| }, [state.deploymentOptions, localChanges, loc, getCurrentValue]); |
Copilot
AI
Oct 29, 2025
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.
The useMemo dependency array includes getCurrentValue which is a function defined within the component (line 79). This function is recreated on every render, causing the memo to recompute unnecessarily. Either move getCurrentValue inside the useMemo, or memoize it with useCallback.
| return groups; | ||
| }, [state.deploymentOptions, localChanges, loc, getCurrentValue]); | ||
|
|
||
| // Options change handler, inserts and removed the changed option in localChanges |
Copilot
AI
Oct 29, 2025
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.
Corrected spelling of 'removed' to 'removes' for grammatical correctness in the comment.
| // Options change handler, inserts and removed the changed option in localChanges | |
| // Options change handler, inserts and removes the changed option in localChanges |
…odePublishDialog_4AdvancedOption
Pull Request Template – vscode-mssql
Description
This PR introduces support for updating deployment options within the Publish Project workflow:
Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines