You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Create a system component that has a space or comma in it (e.g. "example.com website")
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:
Type the text first then add the spaces - example.comwebsite -> example.com website
Possible solution:
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)
Use a select widget instead of list and populate select widget options with system components defined in repo-root/config.yml
The text was updated successfully, but these errors were encountered:
This seems more like a netlifycms quirk with the spaces themselves but yes we could change the default config
can you expand on and explain why you want to change lines 62-65 with your first proposed solution? What would your solution do in that case?
as for the second idea – not sure how easy it is to populate the options with the components but that would be a nicer implementation obviously (for not having to remember all the components)
With the proposed first option we change the behavior of the list widget.
Default behavior is in use today in the config.yml which means a single text field is shown where comma separated entries can be added.
With the field attribute specified to be a string, the list behavior changes, so that multiple text fields can be added - and even rearranged - , therefore overcoming the whitespace issue.
Source: NetlifyCMS List Widget UI
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:
Expected behavior
Spaces and commas should be allowed within a system component name
Additional context
Partial-Workaround:
Possible solution:
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)
Use a select widget instead of list and populate select widget options with system components defined in repo-root/config.yml
The text was updated successfully, but these errors were encountered: