Skip to content

fix(vscode): pre-select current dialect in the dialect picker#3198

Open
LanceYing2004 wants to merge 1 commit intoAutomattic:masterfrom
LanceYing2004:fix/vscode-dialect-picker
Open

fix(vscode): pre-select current dialect in the dialect picker#3198
LanceYing2004 wants to merge 1 commit intoAutomattic:masterfrom
LanceYing2004:fix/vscode-dialect-picker

Conversation

@LanceYing2004
Copy link
Copy Markdown

Screen.Recording.2026-04-17.at.17.31.35.mov

…(#2667)

Issues

Previously, clicking the dialect indicator in the status bar would always show the picker with "American" selected by default, even when the active document was already using another dialect such as British or Canadian. This made the UI inconsistent with the actual document state.

Description

This PR fixes the VS Code dialect picker so that it opens with the current document dialect highlighted, instead of always starting with US/American.

  • added a helper to read the current dialect from the active document configuration
  • replaced the simple quick pick call with a QuickPick instance so the current dialect can be preselected/highlighted when the menu opens

Demo

Video demo has been attached.

How Has This Been Tested?

I tested this change manually in the VS Code Extension Development Host.

I specifically verified:

  • {Austrilian, British, Canadian, Indian} is highlighted when the active document dialect is {Austrilian, British, Canadian, Indian}
  • Changing the dialect still works as expected
  • Canceling the picker leaves the current dialect unchanged

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have considered splitting this into smaller pull requests.

@LanceYing2004 LanceYing2004 changed the title fix(vscode): The dialect picker that pops up in VS Code when clicking the indicator in the status bar always starts with "US" selected #2667 fix(vscode): pre-select current dialect in the dialect picker Apr 17, 2026
@hippietrail
Copy link
Copy Markdown
Collaborator

See also: #3181

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.

2 participants