streetscape.gl
streetscape.gl copied to clipboard
StreamSettingsPanel: Issues with Dynamic Stream Metadata
Hi,
I'm trying to use the dynamic stream metadata feature introduced in PR 359.
However, if setting DYNAMIC_STREAM_METADATA to true in setXVIZConfig(), StreamSettingsPanel never updates to show any available streams, even though they are correctly displayed in LogViewer (it correctly shows static streams if DYNAMIC_STREAM_METADATA is false). Are there any other configuration or code changes necessary?
Thank You!
Ok, I did some debugging.
I found that if DYNAMIC_STREAM_METADATA is true, in componentWillReceiveProps the first if gets triggered a second time with the updated dynamic metadata and sets values=null. However, streamSettings does not change, resulting in the second if to be skipped and values to stay null, which in turn causes the render() method of the component to do nothing. https://github.com/uber/streetscape.gl/blob/9820c40efe7753a2e16cd72885eb8e876de942e0/modules/core/src/components/stream-settings-panel.js#L163-L174
https://github.com/uber/streetscape.gl/blob/9820c40efe7753a2e16cd72885eb8e876de942e0/modules/core/src/components/stream-settings-panel.js#L187-L196
I think in the original PR this logic was changed and it would thus work, however for some reason this change was then reverted back:
https://github.com/uber/streetscape.gl/pull/359#discussion_r301361366