Repository navigation
SCAL-338387: Add AppEmbed liveboardOverrides keyed by Liveboard ID - #725
jishnupavithran007 wants to merge 1 commit into
Conversation
AppEmbed can open any number of Liveboards, but the single embedParams.liveboardOverride has no Liveboard ID, so ThoughtSpot applies it to whichever Liveboard loads. ThoughtSpot now reads embedParams.liveboardOverrides, a map keyed by Liveboard ID, and picks the entry for the Liveboard being loaded. - Add the LiveboardOverrides type and buildLiveboardOverridesAppInitData. The builder drops Liveboards with no data source entries and never sends an empty map, which ThoughtSpot would read as no override for any Liveboard. - Add liveboardOverrides to AppViewConfig and send it in the APP_INIT embedParams. - LiveboardEmbed keeps sending the single liveboardOverride and also sends it keyed by liveboardId (or pinboardId). Older ThoughtSpot versions use the single form; newer ones use the map, so the override no longer applies to a Liveboard the embed navigates to. - Export LiveboardOverrides from the main and React entry points.
There was a problem hiding this comment.
Code Review
This pull request introduces support for applying multiple Liveboard overrides (filters and parameters) keyed by Liveboard GUID in embedded applications. It adds the LiveboardOverrides type and liveboardOverrides configuration option to AppViewConfig and LiveboardEmbedAppInitData, along with helper utilities to process and clean these overrides (dropping empty entries) before sending them in APP_INIT. Additionally, it updates the LiveboardEmbed to send the single liveboardOverride keyed by its ID to restrict the override to that specific Liveboard in newer ThoughtSpot versions. Comprehensive unit tests have been added to verify these behaviors. No review comments were provided, and no issues or style guide violations were found in the code changes, so there is no additional feedback to provide.
commit: |
AppEmbed can open any number of Liveboards, but the single embedParams.liveboardOverride has no Liveboard ID, so ThoughtSpot applies it to whichever Liveboard loads. ThoughtSpot now reads embedParams.liveboardOverrides, a map keyed by Liveboard ID, and picks the entry for the Liveboard being loaded.