feat: #3181219 Add a widget setting to show the entity ID in the tag
Issue: https://www.drupal.org/project/autocomplete_deluxe/issues/3181219
The entity ID stays out of the tag and out of the suggestion list, as it is today. A new widget setting, Show the entity ID, keeps it visible for fields where two entities carry the same label.
- The widget gains the
show_entity_idsetting, off by default, with config schema and a settings summary line. - The element passes it to the JavaScript settings.
- The JavaScript keeps the ID on the tag and shows the value, which already carries the ID, in the suggestion list.
Tested on Drupal 11.4 with two fields on the same form, one with the setting on and one with it off: tags read Test (1) and Alpha (beta) (6) with the setting on and stay clean with it off, the suggestion list follows the same rule, and saving stores the right term IDs and creates no new terms.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
-
Automated unit testing coverage - Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
-
User Guide Documentation - Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
Edited by Rajab Natshah