Skip to content

Add curated and alphabetical code-language ordering #32

Closed

Description

@BinaryOutlook

Stage 3 — Layout and writing preferences

Synopsis

Make language-list ordering predictable with a handcrafted default, alphabetical alternatives, and match relevance during search.

End goal

Users can choose a useful stable browsing order without personal-usage tracking or an external popularity service.

Start after

Start implementation only after every prerequisite is merged into main or has a maintainer-accepted technical freeze recorded in its linked issue. A freeze must identify the exact source/prototype commit and settled contracts; an open draft PR alone is insufficient. For an investigation prerequisite, acceptance must identify the approved design/report revision and prototype commit if one exists.

Fetch current origin/main before branching. If using a freeze, record an integration base containing all required prerequisite changes and link the freeze decisions in the PR. Validate the combined result again after the final prerequisite changes are integrated. The recorded freeze governs any agreed early start while a prerequisite issue remains open.

Agreed scope

  • Default browsing order pins Plain text first and Markdown second, followed by a maintained curated common-language list.
  • A–Z and Z–A browse modes use readable display names with a deterministic tie-breaker; default-only pinning must not silently defeat an explicitly alphabetical order.
  • While a search query is present, rank matching suggestions by query relevance, using the selected browsing order as a stable tie-breaker; nonmatching pinned items should not crowd out results.
  • Explain that the default is curated, not a measured popularity ranking. Do not add telemetry or personal usage history.

Acceptance criteria

  • Default, A–Z, and Z–A choices persist and produce deterministic complete lists in both hosts.
  • Plain text/Markdown placement follows the agreed default behavior and query results respect matching/relevance.
  • Aliases map to the intended canonical suggestion without duplicate entries or loss of existing custom identifiers.
  • Ordering or searching does not modify document content; only an intentional language change does.

Verification

  • Cover curated order, alphabetical reversal, equal-relevance ties, alias matches, no-query/query transitions, and persistence.
  • Check the documented names/order in the supported UI languages without translating literal source language identifiers.
  • Update settings catalogs, runtime translations, and language-picker documentation.

Source pointers

  • src/webview/editor.js
  • src/editorProvider.ts
  • src/shared/settings-provider.ts
  • electron/src/settings-manager.ts
  • package.json
  • src/i18n/locales

Delivery contract

Implement the shared editor behavior in both VS Code and Electron. View-only settings/actions must preserve Markdown, selection/editing context, clean state, and undo history. For new or changed settings, keep host wiring, manifest descriptions, all supported translations, and documentation consistent. Preserve existing identifiers and defaults except for the deliberate changes specified above.

Work from the repository root using the Node version in .node-version and the maintained instructions in CONTRIBUTING.md, docs/building.md, and docs/testing/README.md; export changes also follow docs/export-verification.md. Run full compilation after webview JavaScript/CSS, shared-module, or translation changes, plus checks that exercise the changed behavior. Rebuild and reinstall for installed-extension evidence. Report failures/skips honestly; follow required CI and review gates. Update affected documentation and review any committed Markdown in source and rendered form.

Link the PR or investigation to this issue. Keep remediation on the same focused work item where practical. Completion requires the stated evidence and accepted outcome; opening a draft PR does not complete the issue. No deadline or assignee is imposed by this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions