-
Notifications
You must be signed in to change notification settings - Fork 13
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
expand orgId enrichement to other content types, and/or replace with enrichment w/ ownerUser? #543
Comments
I forgot about #414, so looks like we need at least the user's name in addition to the org id, so sounds like we should update the enrichment to set It appears that we are fetching this for all content. I guess it should be included by default in |
Plan:
NOTE: that the current app code for fetching the owner user is here: That code not only fetches the user, but enriches the user object and makes a few additional requests for org info, etc. TBD how much of that needs to be done w/in |
Enrichment StreamliningSingle entry fn
For composition, we should have a single input and return type for all the enrichment functions
Each enrichment should handle merging in any errors so we have no processing "at the end" If there is more complex logic re: when an enrichment should be run, do that inside the enrichment vs outside... then all the logic is in one place Each enrichment fn has this signature:
Declarative Composition: Things to capture:
Then we look up based on the type, merge common w/ any type specific stuff, and return a composition
|
Discussion thoughts...
const enrichmentMap = {
common: {
simple: [
// if these are strings, we have to map into a set of functions
// but we could also import all the fns and just list them, so
enrichDates,
],
complete: [
enrichDates,
ownerUser
]
}
types: {
hubSiteApplication: {
simple: [...],
complete: [ domainEntries ]
},
mapServiceLayer: {
complete: [iterateLayer]
}
}
} ugly jsbin w/ rough prototype of things -> https://jsbin.com/kipafum/1/edit?html,js,console,output |
The current system allows users to pass in an arbitrary set of enrichments to (or |
Hub.js currently only fetches the orgId for a content for Hub-created web maps (we were being conservative in order to avoid making this xhr when we didn't need it).
However, now I've learned that the Hub app's content views send
contentOrgId
w/ telemetry. The app fetches theownerUser
for all content types and we get the id fromcontent.ownerUser.org.id
.See: https://github.com/ArcGIS/opendata-ui/pull/9667#issuecomment-858841298 for more info.
Determine if hub app needs the whole
ownerUser
, or just theorgId
and move that logic intofetchEnrichments
.cc @rweber-esri @juliannemarik
The text was updated successfully, but these errors were encountered: