Organizing OE context menu according to specs#21502
Conversation
There was a problem hiding this comment.
Pull request overview
Updates MSSQL Object Explorer context menus (Server, Database, Table) to better match new UX designs by refining command labels and reorganizing menu structure/grouping, including introducing a new SQL Projects submenu for sql-database-projects actions.
Changes:
- Updated many Object Explorer command labels (ellipsis usage, clearer wording, “GitHub Copilot …” naming) via XLIFF +
package.nls.json. - Re-grouped/re-ordered MSSQL Object Explorer context menu items; adjusted table scripting entries (moved
Select Top 1000out of the script submenu for tables). - Added a new
SQL Projectssubmenu insql-database-projectsand moved “Create/Update Project from Database” actions into it.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| localization/xliff/vscode-mssql.xlf | Updates/renames multiple MSSQL command/menu strings to match the new context menu design language. |
| localization/xliff/sql-database-projects.xlf | Adjusts capitalization (“from”) and adds new localized key for the SQL Projects submenu label. |
| extensions/sql-database-projects/package.nls.json | Updates visible labels and adds sqlDatabaseProjects.objectExplorerSubmenu string. |
| extensions/sql-database-projects/package.json | Introduces sqlDatabaseProjects.objectExplorerSubmenu and routes existing commands into the submenu. |
| extensions/mssql/package.nls.json | Updates visible command labels (ellipsis, wording, Copilot naming, etc.). |
| extensions/mssql/package.json | Reorganizes Object Explorer context menu grouping and scripting entries; expands Copilot entries to table nodes. |
💡 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.
| "command": "mssql.restoreDatabase", | ||
| "when": "view == objectExplorer && viewItem =~ /\\btype=(Database)\\b/ || viewItem =~ /\\bsubType=(Database|DockerContainerDatabase)\\b/", | ||
| "group": "2_MSSQL_serverDbActions@9" | ||
| "group": "4_MSSQL_databaseMaintenance@3" |
There was a problem hiding this comment.
The when clause mixes && and || without parentheses, so view == objectExplorer won't apply to the subType branch. Parenthesize the OR expression so this menu item only shows in Object Explorer for Database/DockerContainerDatabase nodes.
| "command": "mssql.flatFileImport", | ||
| "when": "view == objectExplorer && viewItem =~ /\\btype=(Database)\\b/ || viewItem =~ /\\bsubType=(Database|DockerContainerDatabase)\\b/", | ||
| "group": "2_MSSQL_serverDbActions@9" | ||
| "group": "4_MSSQL_databaseMaintenance@4" |
There was a problem hiding this comment.
Same precedence issue here: view == objectExplorer only applies to the first regex because && binds tighter than ||. Add parentheses around the type/subType checks so this command doesn't appear in non-Object Explorer contexts when subType matches.
|
@croblesm I made some minor modifications from the internal designs:
Other question:
|
PR Changes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21502 +/- ##
=======================================
Coverage 72.54% 72.54%
=======================================
Files 330 330
Lines 98165 98165
Branches 5452 5452
=======================================
Hits 71216 71216
Misses 26949 26949 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…e/DockerContainerDatabase nodes (#21504) * Initial plan * Fix when clause operator precedence for Database/DockerContainerDatabase nodes Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 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.
|
Hi @Benjin, I have a few comments:
|
Description
Updates the Server, Database, and Table context menus to align with designs
Server Instance:
Database:

Table:

Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines