-
Notifications
You must be signed in to change notification settings - Fork 3
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
Metrics don't appear on production (but fine in storybook) #376
Comments
Thanks Chad. Can you give me an example of steps to reproduce? Or a report you have I can test in production? When you say “the id” is an integer in production, do you mean the sketchid? Is there some behavior of seaetch you can tell me a little more about? Thanks I’m curious why I or others haven’t hit this. I don’t think I’ve changed this helper code in some time. |
Do you have a fix you made in a project repo you can point me at that addresses it? |
Yes the sketchId. I highlighted the section of code where I'm seeing this. It should be reproducable with any new report that uses the create:report command and specifies a datasource, so all my geoprocessing functions ended up with it. I solved the problem by just specifying [id.toString()] as seen in this function. |
@underbluewaters the core issue here seems to be that SeaSketch is sending an integer sketchId, and the framework assumes they will always be a string (sketch and collection level). export type SketchProperties = Record<string, any> & {
/** Unique sketch ID */
id: string; I also note that the underlying I'm not sure whether:
As for why this error has not shown up previously. Because the template just switched over to using the sketch properties passed by SeaSketch via iframe message. It didn't before because the |
I would guess that SeaSketch legacy used to send strings for sketchID also |
I think I will just go ahead coerce it to a string and if something else gets implemented or agreed upon, then it can removed at some point. |
Should be resolved in 7.0 |
It seems that the templates copied in v7 when running
create:report
contain a bug that only shows up in production.metricsWithSketchId
expects a single stringified id or an array of strings, but it appears the id is an integer. This isn't a problem when working locally and my test cases all appeared correct in storybook, but then when I went to use the reports after deployment all my results tables were empty where I had used metrics.The text was updated successfully, but these errors were encountered: