-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add optgroup headers to search field selects
Closes #191. Although this might seem like a pretty simple change, it required a decent amount of restructuring to get the code + tests to play nicely. To elaborate a bit: - Refactored populateSelect() to support taking in an object of options, where keys correspond to optgroup labels and values correspond to a list of child option values/names - Added tests of this new populateSelect() behavior to test_dom_utils - This necessitated updating getChildValuesFromSelect() and assertSelected() to handle optgroups properly. This was kind of a pain, but it's working ok now. - Broke off some now-redundant code within populateSelect() to a helper function (addOptionsToParentElement()). - Stopped storing featureFields as a property of RRVDisplay (since it's only used once) - Also, moved "Feature ID" out of featureMetadataFields. This makes life a bit more convenient for us. (necessitated changing up the feature text DOM tests a bit, as well as changing up featureRowListToText() a bit to add in "Feature ID" to a copy of featureMetadataFields) I think that's it. Might add another test or two for the "empty" corner-case of populateSelect(), but this should be fine.
- Loading branch information
Showing
13 changed files
with
573 additions
and
226 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.