Fix: Dropdown for Title Type will not be shown active#1053
Merged
McNamara84 merged 9 commits intomainfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a UI bug in the Resource Information “Titles” repeater where the cloned “Title Type” <select> could remain disabled after cloning (e.g., when the original was temporarily disabled during AJAX loading), and adds a Jest test suite to prevent regressions.
Changes:
- Force-enable the cloned “Title Type” dropdown after cloning a title row.
- Add a new Jest test file covering add/remove row behavior, dropdown visibility/options, and max-title limits.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
js/eventhandlers/formgroups/resourceinformation-title.js |
Ensures cloned title-type <select> is enabled after cloning. |
tests/js/resourceinformation-title.test.js |
Adds unit/integration-style DOM tests for dynamic title-row behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the handling and testing of the "Title Type" select dropdown in the resource information form. The main change ensures that the dropdown is only enabled when valid (non-placeholder) options are available, preventing form submission issues when no options are present. Comprehensive tests have been added to verify this behavior and related functionality.
Enhancements to select dropdown behavior:
Automated testing improvements:
resourceinformation-title.test.jsto cover the following scenarios: enabling/disabling the select based on available options, correct cloning of the dropdown, visibility, option filtering, pre-selection, input clearing, add/remove button logic, and event handling for resetting the form.Notes for Reviewer
None.
Checklist
Known Issues
None.