Conversation
| //@ts-ignore | ||
| helpItems |
There was a problem hiding this comment.
was getting type error
|
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 |
| type: HelpItemTraits, | ||
| name: "Help content items", | ||
| description: "The content to be displayed in the help panel.", | ||
| idProperty: "index" |
There was a problem hiding this comment.
Just dropping a comment here for a future full review: I think this should be:
| idProperty: "index" | |
| idProperty: "itemName", |
though I haven't thought through the consequences of either idProperty choices.
There was a problem hiding this comment.
I think itemName is good - then makes it easy to remove specific default help items
| steps?: StepItemTraits[]; | ||
| } | ||
|
|
||
| export class HelpItemTraits extends ModelTraits { |
There was a problem hiding this comment.
Relating to https://github.com/TerriaJS/terriajs/pull/5918/files#r894124712. If using itemName as an id you could add:
static isRemoval(helpItem: HelpItemTraits) {
// This condition looks sensible
return helpItem.markdownText === null && helpItem.trainerItems === null;
}And then you could have default helpItems in terriajs that get overriden/removed in TerriaMap config using the strata system, I think. I have to play around with this branch sometime. And default help items in terriajs means translation support!
What this PR does
Fixes #
TerriaMap PR: TerriaJS/TerriaMap#557
Update TerriaJS config parameters to use traits system. Some of the parameters are renamed
showWelcomeMessageandwelcomeMessageVideoare now parameters on objectwelcomeMessageasshowandvideohelpContentis nowhelpItemshelpContentTermsare nowhelpTerms(they are not strictly related tohelpContent)feedbackPreambleandfeedbackMinLengthare now parameters on objectfeedbackaspreambleandminLengthbrandBarElements,brandBarSmallElements,displayOneBrandare now parameters on objectbrandBaraselements,smallElements,displayOneBrandgoogleUrlShortenerKeyis deprecated long time ago but still left as a config parameterdisclaimeris not used anywhere so I added it to deprecated listglobalDisclaimeris also not used anywhere - not sure if IT should be marked as deprecated as it is set from TerriaMap?TODO
configParameterin case when it is notprimitiveTrait,objectTraitwill always be defined and that condition should be updatedp.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 passdoc/.