Skip to content

Organizing OE context menu according to specs#21502

Merged
Benjin merged 7 commits into
mainfrom
dev/benjin/contextMenu
Mar 7, 2026
Merged

Organizing OE context menu according to specs#21502
Benjin merged 7 commits into
mainfrom
dev/benjin/contextMenu

Conversation

@Benjin
Copy link
Copy Markdown
Contributor

@Benjin Benjin commented Mar 6, 2026

Description

Updates the Server, Database, and Table context menus to align with designs

Server Instance:

image

Database:
image

Table:
image

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

Copilot AI review requested due to automatic review settings March 6, 2026 21:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 1000 out of the script submenu for tables).
  • Added a new SQL Projects submenu in sql-database-projects and 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.

Comment thread extensions/mssql/package.json Outdated
Comment on lines 633 to +635
"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"
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot implement this fix

Comment on lines 643 to +645
"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"
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot implement this fix

Comment thread localization/xliff/vscode-mssql.xlf
Comment thread localization/xliff/sql-database-projects.xlf
@Benjin
Copy link
Copy Markdown
Contributor Author

Benjin commented Mar 6, 2026

@croblesm I made some minor modifications from the internal designs:

  • object search and profiler were grouped for Servers but separated for Databases -> now grouped both places for predictability
  • Removed backup from the Server menu because that dialog currently requires the database as input.

Other question:

  • Table menu has "Schema Designer", "New Query", and "Open in Copilot", even though none of those take a table as input. I left them, but maybe they should be removed?

@Benjin Benjin changed the title Dev/benjin/context menu Organizing OE context menu according to specs Mar 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 6403 KB 6402 KB ⚪ -1 KB ( 0% )
sql-database-projects VSIX 7060 KB 7025 KB ⚪ -35 KB ( 0% )
data-workspace VSIX 535 KB 535 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.54%. Comparing base (ce2d985) to head (62b7182).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

@Benjin I've opened a new pull request, #21504, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

@Benjin I've opened a new pull request, #21505, to work on those changes. Once the pull request is ready, I'll request review from you.

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread extensions/mssql/package.json
@Benjin Benjin mentioned this pull request Mar 6, 2026
5 tasks
@Benjin Benjin added this to the March 2026 Release milestone Mar 6, 2026
allancascante
allancascante previously approved these changes Mar 6, 2026
@croblesm
Copy link
Copy Markdown
Contributor

croblesm commented Mar 7, 2026

Hi @Benjin, I have a few comments:

Instance level

  • Backup database option is missing
  • DACPAC is going GA this release, so the Preview tag is no longer needed
  • Let's use "Stop SQL Container" instead of "Stop container"
  • Let's use "Delete SQL Container" instead of "Delete container"
  • Let's use "SQL Database Projects" instead of "SQL Projects"
  • Can you share the available options for SQL Projects

Database level

  • The"Launch Query Profiler (Preview)" option is coming from the new capability @allancascante added to Query Profiler that allows users to trigger a new Query Profiler session in the scope of the selected database. Is that correct?
  • DACPAC is going GA this release, so the Preview tag is no longer needed
  • Can you share the available options for Generate Script
  • Let's use "SQL Database Projects" instead of "SQL Projects"
  • Can you share the available options for SQL Projects

@Benjin Benjin merged commit 784d862 into main Mar 7, 2026
3 checks passed
@Benjin Benjin deleted the dev/benjin/contextMenu branch March 7, 2026 02:39
@Benjin Benjin linked an issue Mar 12, 2026 that may be closed by this pull request
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: bring Select Top 1000 back to the top level menu

7 participants