Skip to content

NetlifyCMS Incident Affected Systems doesnt allow whitespace #241

@szilvasidave

Description

@szilvasidave

Describe the bug
When creating an incident where the name of the affected system(s) contains a whitespace or comma, NetlifyCMS' list widget doesnt allow the user to enter these two characters

Reproduction steps
Steps to reproduce the behavior:

  1. Create a system component that has a space or comma in it (e.g. "example.com website")
  2. Create an incident and try to type in the system component's exact name

Expected behavior
Spaces and commas should be allowed within a system component name

Additional context
Partial-Workaround:

  1. Type the text first then add the spaces - example.comwebsite -> example.com website

Possible solution:

  1. Replace static/admin/config.yml lines 62-65 with:
    - { label: "Affected systems (use exact name, separated by commas) 🧐", name: "affected", widget: "list", required: false, summary: "{{fields.individualaffected}}", field: { label: "Affected System", name: "individualaffected", widget: "string" }}
    (sorry, I'm new at contributing, not sure how to directly reference the code in the file)

  2. Use a select widget instead of list and populate select widget options with system components defined in repo-root/config.yml

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions