streetscape.gl icon indicating copy to clipboard operation
streetscape.gl copied to clipboard

StreamSettingsPanel: Issues with Dynamic Stream Metadata

Open enricoschroeder opened this issue 5 years ago • 2 comments

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!

enricoschroeder avatar Jan 15 '20 08:01 enricoschroeder

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

enricoschroeder avatar Jan 15 '20 09:01 enricoschroeder

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

enricoschroeder avatar Jan 15 '20 09:01 enricoschroeder