terriajs
terriajs copied to clipboard
Config traits
What this PR does
Fixes #
Update TerriaJS config parameters to use traits system. Some of the parameters are renamed
-
showWelcomeMessage
andwelcomeMessageVideo
are now parameters on objectwelcomeMessage
asshow
andvideo
-
helpContent
is nowhelpItems
-
helpContentTerms
are nowhelpTerms
(they are not strictly related tohelpContent
) -
feedbackPreamble
andfeedbackMinLength
are now parameters on objectfeedback
aspreamble
andminLength
-
brandBarElements
,brandBarSmallElements
,displayOneBrand
are now parameters on objectbrandBar
aselements
,smallElements
,displayOneBrand
-
googleUrlShortenerKey
is deprecated long time ago but still left as a config parameter -
disclaimer
is not used anywhere so I added it to deprecated list -
globalDisclaimer
is also not used anywhere - not sure if IT should be marked as deprecated as it is set from TerriaMap?
TODO
- [x] Check if some conditions depend only on the existence of specific
configParameter
in case when it is notprimitiveTrait
,objectTrait
will always be defined and that condition should be updated - [x] Convert deprecated options to the new ones - edit: added basic conversion, as I don't see that we really need anything on model level for now
- [ ] Documentation should generate automatically (as for catalog items) - Best to do this as a separate PR
- [ ] Introduce required option for trait system (at least for configuration if not doable for generic) - Probably best to do this as a separate PR (maybe target this one at first if this is not merged before)
p.s. this was much easier than initially expected
Checklist
- ~[ ] There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)~ - All existing test pass
- [x] I've updated relevant documentation in
doc/
. - [x] I've updated CHANGES.md with what I changed.
This is ready for review, added a basic conversion so no breaking changes are introduced in patch or minor version.
did another pass over this, also tried loading prod map-configs from https://github.com/TerriaJS/saas-catalogs-public, and no issue is raised to the user so I am pretty much confident that this can go without having to update the configs right away