Add options for static values to drop-down of boolean/enum fields
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3586917. --> Reported by: [lostcarpark](https://www.drupal.org/user/346773) Related to !9 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>It would be helpful to allow static values for props to be defined without needing to create a "custom text" field in the view.</p> <p>The UI for static values for text fields will need some consideration. However, for fields with limited options, such as booleans and enums, the static options could be added to the field selector drop-down.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ol> <li>For boolean props Add "True" and "False" to the top of the field selector drop-down.</li> <li>For enum fields, add the enum options to the top of the drop-down</li> </ol> <p>If static value selected, store "null" to the field mapping, and the value to a new static property.</p> <p>This should also have test coverage.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>Add a test case that opens the settings with "Boolean card" selected, and verifies that the dropdown for the Boolean field contains "True" and "False" options.</li> <li>Add a test case that opens the settings with "Enum card" selected, and verifies that the dropdown for the Boolean field contains "lawful", "neutral", and "chaotic" options.</li> <li>Add prop type specific handlers to add options to drop-down for specific types.</li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue