Change Popup Result component to only render title (id of stac item) as default field
Add setting in config.json to allow for user defined properties to specify if additional metadata fields should be set in Popup Result
NOTE: This PR improves upon configuration but still couples the metadata fields to some known properties needed for demo UI projects. There is a followup ticket created by project team to refactor this in more detail and introduce things like field name aliases and better handle presentation of edge cases with varying data types and human readable formatting needs.
To Test:
automated tests pass 🍏 npm run test
Test config set
add POPUP_DISPLAY_FIELDS setting to local config.json to match needs and formatting found in config.example.json
load app
click search and zoom until scenes are showing on map
click footprints
confirm popup results show
scroll in list and confirm popup results display as
strings as strings
numbers as strings
bools as text strings
array values as comma separated strings
eo:cloud_cover is handled uniquely with a truncate to two decimal places and a concatenated %
change between collections and confirm metadata gets updated to match config settings
Test config partially set
stop app
remove one of the collection values from POPUP_DISPLAY_FIELDS but leave the others
load app
select collection from search dropdown in top left of search/filters bar that you removed from the POPUP_DISPLAY_FIELDS config settings
click search and zoom until scenes are showing on map
click footprints
confirm popup results show
confirm only title field is showing for this collection
change to another collection that still exists in POPUP_DISPLAY_FIELDS config settings
click search and zoom until scenes are showing on map
click footprints
confirm popup results show
confirm metadata still gets updated to match config settings
Test no config
stop app
remove POPUP_DISPLAY_FIELDS setting from local config.json
load app
click search and zoom until scenes are showing on map
click footprints
confirm popup results show
confirm only title field is showing for this collection
change to another collection
confirm only title field is still only field showing
PR Checklist:
[X] I have added my changes to the CHANGELOGor a CHANGELOG entry is not required.
Related Issue(s):
Proposed Changes:
config.json
to allow for user defined properties to specify if additional metadata fields should be set in Popup ResultTo Test:
automated tests pass 🍏
npm run test
Test config set
POPUP_DISPLAY_FIELDS
setting to localconfig.json
to match needs and formatting found inconfig.example.json
eo:cloud_cover
is handled uniquely with a truncate to two decimal places and a concatenated%
Test config partially set
POPUP_DISPLAY_FIELDS
but leave the othersPOPUP_DISPLAY_FIELDS
config settingsPOPUP_DISPLAY_FIELDS
config settingsTest no config
POPUP_DISPLAY_FIELDS
setting from localconfig.json
PR Checklist: