microsoft / microsoft/vscode-cmake-tools

Feature request: better UI to handle combinatorial explosion of variants

Open
#2,344 3 comments 5 reactions 0 assignees View on GitHub
enhancement Feature: UI Feature: variants
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

I'm a fan of the [variants](https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/variants.md) feature, but in one of my projects, its use is starting to get unwieldy, since the number of available variants suffers from combinatorial explosion.

In this project, I currently have 9 different options I'd like to control using the variants feature -- indeed, there were additional options that I've considering adding at some point, but had to weight that against the increase in variant count, and eventually decided not to add them. While many of these options are binary choices, some have a larger number of choices, compounding the problem. Concretely, using all 9 options works out to almost 5,000 possible variants, and scrolling through them to find the desired one is quite time-consuming.

Recently I cut this down to the 5 most used options, but it still works out to almost 300 possible variants, which is easier to scroll through (but still not ideal) and forces me to run CMake manually when I need to use the other options. Sorting options from least to most commonly modified in the YAML file last helps a bit, so that often the choice is in the first few screenfuls, but is not a proper solution to the problem.

The root of the issue, in my opinion, is the UI choice of a scrollable list containing the cartesian product of all variants. I'd like to propose a different design that handles combinatorial explosion much better: when the user tries to select a variant, a dialog pops up containing combo boxes for each available option -- this works well with the current paradigm of a number of choices per option. Later, this could be extended to use check boxes for binary choice options, and even text fields for open-ended options.

I understand that, for some users, the existing UI works fine and they may dislike the proposed one. Thus, I suggest that the choice of UI should be a setting, and the existing UI might be the default choice to avoid disrupting current workflows.

Contributor guide

Open the contributing guide

Research direction

Start by reading docs/variants.md to understand the existing variants model and selection workflow. The issue names no implementation files or tests, so trace the current variants UI from its selection entry point. Done would require a selectable alternative that avoids listing every combination, with the existing UI preserved as a configurable choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
developer-experience, frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.