Progress toast for database rename#21510
Conversation
Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a progress notification toast when renaming a database in Object Explorer, addressing the first part of issue #21354 (no visual indicator during rename). The rename operation is now wrapped in vscode.window.withProgress to show a notification while the backend processes the rename.
Changes:
- Wrapped the
objectManagementService.renamecall invscode.window.withProgressto display a progress notification during database rename - Added a new localized string
renamingDatabasewith parameterized message "Renaming database '{0}' to '{1}'..." - Updated localization files (XLIFF and l10n bundle) with the new string
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
extensions/mssql/src/controllers/mainController.ts |
Wraps the rename database call in vscode.window.withProgress to show a notification toast |
extensions/mssql/src/constants/locConstants.ts |
Adds renamingDatabase function for the localized progress message |
extensions/mssql/l10n/bundle.l10n.json |
Adds the l10n bundle entry for the new string |
localization/xliff/vscode-mssql.xlf |
Adds the XLIFF trans-unit for the new localized string |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| <trans-unit id="++CODE++3426e6a23fe6e9ab8ec4d59a46f5e26596e94b9712da61c7a323e0cb0a6ecd25"> | ||
| <source xml:lang="en">Renaming database '{0}' to '{1}'...</source> | ||
| <note>{0} is the current database name | ||
| {1} is the new database name</note> | ||
| </trans-unit> |
There was a problem hiding this comment.
The new trans-unit for "Renaming database '{0}' to '{1}'..." was added to the base vscode-mssql.xlf but is missing from all localized XLIFF files (vscode-mssql.de.xlf, vscode-mssql.es.xlf, vscode-mssql.fr.xlf, vscode-mssql.it.xlf, vscode-mssql.ja.xlf, vscode-mssql.ko.xlf, vscode-mssql.pt-BR.xlf, vscode-mssql.ru.xlf, vscode-mssql.zh-Hans.xlf, vscode-mssql.zh-Hant.xlf). Each localized file should have a corresponding trans-unit added with <target state="new"> and the English source text as a placeholder, following the established convention (e.g., see vscode-mssql.de.xlf line 542 for an example of a state="new" entry).
PR Changes
|
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #21510 +/- ##
==========================================
- Coverage 72.53% 72.52% -0.02%
==========================================
Files 330 330
Lines 98173 98188 +15
Branches 5430 5430
==========================================
Hits 71206 71206
- Misses 26967 26982 +15
🚀 New features to boost your workflow:
|
Description
Fixes #21354
At least the first part by displaying a progress toast while it attempts to rename a database. Full fix would entail prompting the user to switch to single-user mode for the rename to force the issue (only when initial rename errors)
Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines