-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc AREMI fixes #5187
Misc AREMI fixes #5187
Conversation
// Alises is a map from `key` (which exists in propertyData.properties) to some `aliasKey` which needs to resolve to `key` | ||
// and Yes, this is awful, but not that much worse than what was done in V7 | ||
let aliases = []; | ||
if (TableMixin.isMixedInto(this.props.catalogItem)) { | ||
aliases = this.props.catalogItem.columns | ||
.filter(col => col.name && col.title && col.name !== col.title) | ||
.map(col => [col.name, col.title]); | ||
} | ||
aliases.forEach(aliasMap => { | ||
propertyData[aliasMap[0]] = propertyData[aliasMap[1]]; | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should aliasMap[1]
keys be removed from propertyData
? And is it possible or likely that an aliasMap[0]
could also be an aliasMap[1]
later in aliases
and hence the key will be overwritten in propertyData
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need both in propertyData
- as some feature templates use column name and others use column title (even if both are defined).
Overwriting aliases is definitely possible, but it seems unlikely someone would name a column.title
after a different column.name
. I have added this so at least we aren't overriding properties which are defined:
propertyData[aliasMap[0]] = propertyData[aliasMap[0]] ?? propertyData[aliasMap[1]];
I have also shallow cloned propertyData
so we aren't messing with feature.propertes|currentProperties|...
Misc AREMI fixes
CkanCatalogGroup.groupBy = "none"
membersTableMixin
region mapping feature props and make Long/Lat features use column titles (if it exists) to match v7 behaviour.FeatureInfoSection.jsx
. In v7 - we used to add this to eachFeature
-properties._terria_columnAliases = tableStructure.getColumnAliases()
- which I think is worse...CkanItemReference
wms_layer
propertyArcGisMapServerCatalogGroup
to usesublayerIds
.wordBreak="break-all"
fromBox
surroundingDataPreview
Description
and other elements that didn't reverse thisChecklist