GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — x-prompt should support an array of defaults for lists · Issue #16104 · angular/angular-cli

x-prompt should support an array of defaults for lists #16104

New issue
Copy link
New issue
Copy link
Closed
#16113
Closed
x-prompt should support an array of defaults for lists#16104
#16113
Copy link
Labels
area: @angular-devkit/corefreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Milestone
Backlog

Description

@d-koppenhagen
d-koppenhagen
opened on Nov 7, 2019
Issue body actions

🚀 Feature request

Command (mark with an x)

- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [x] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

A clear and concise description of the problem or missing capability...

Within angular-cli 9.0.0-rc.0 it's possible to create schematics that will allow to use x-prompts with multi selection like this way:

{
  "$schema": "http://json-schema.org/schema",
  "id": "ngx-semantic-version",
  "title": "ngx-semantic-version Schema",
  "description": "configure commitlint, husky, commitizen and standard-version configuration",
  "type": "object",
  "properties": {
    "packages": {
      "type": "array",
      "description": "select the packages that should to be installed and configured",
      "uniqueItems": true,
      "items": {
        "type": "string"
      },
      "x-prompt": {
        "message": "What packages do you want to be installed and configured?",
        "type": "list",
        "multiselect": true,
        "items": ["commitlint", "commitizen", "husky", "standard-version"]
      }
    },
  },
  "required": ["packages"]
}

As the result of the x-prompt will lead into an array of values instead of a single selected value or input, it should be also supported to configure and array of default values.

Describe the solution you'd like

It should be possible to configure "default": ["foo", "bar"], inside the properties:

{
  "$schema": "http://json-schema.org/schema",
  "id": "ngx-semantic-version",
  "title": "ngx-semantic-version Schema",
  "description": "configure commitlint, husky, commitizen and standard-version configuration",
  "type": "object",
  "properties": {
    "packages": {
      "type": "array",
      "description": "select the packages that should to be installed and configured",
      "uniqueItems": true,
      "items": {
        "type": "string"
      },
      "default": ["commitlint", "commitizen", "husky", "standard-version"],
      "x-prompt": {
        "message": "What packages do you want to be installed and configured?",
        "type": "list",
        "multiselect": true,
        "items": ["commitlint", "commitizen", "husky", "standard-version"]
      }
    },
  },
  "required": ["packages"]
}

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

Activity

  1. alan-agius4
    added
    area: @angular-devkit/schematics
    featureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues
    on Nov 7, 2019
  2. ngbot
    added this to the Backlog milestone on Nov 7, 2019
  3. clydin
    added
    area: @angular-devkit/core
    freq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarely
    severity3: broken
    type: bug/fix
    and removed
    area: @angular-devkit/schematics
    featureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues
    on Nov 8, 2019
  4. clydin
    added a commit that references this issue on Nov 8, 2019

    fix(@angular-devkit/core): allow multiselect list defaults

    This issue will close once commit c3b805b is merged into the 'main' branch.
    c3b805b
  5. d-koppenhagen
    added a commit that references this issue on Nov 10, 2019

    feat: provide packages from x-promt

    3390ff0
  6. mgechev
    closed this as completedin #16113on Nov 12, 2019
  7. mgechev
    added 2 commits that reference this issue on Nov 12, 2019

    fix(@angular-devkit/core): allow multiselect list defaults

    This issue will close once commit 7e7248d is merged into the 'main' branch.
    7e7248d

    fix(@angular-devkit/core): allow multiselect list defaults

    This issue will close once commit a2f58a1 is merged into the 'main' branch.
    a2f58a1
  8. angular-automatic-lock-bot commented on Dec 13, 2019

    @angular-automatic-lock-bot
    angular-automatic-lock-botBot
    on Dec 13, 2019
    More actions

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. angular-automatic-lock-bot
    locked and limited conversation to collaborators on Dec 13, 2019
  10. mostafaibr
    added a commit that references this issue on May 29, 2026

    fix(@angular-devkit/core): allow multiselect list defaults

    This issue will close once commit e9b409e is merged into the 'master' branch.
    e9b409e
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

    area: @angular-devkit/corefreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix

    Type

    No type

    Projects

    No projects

      Milestone

      • BacklogNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.