SCAL-314423 - Remove 5 Liveboard flags from SDK opt-in defaults (GA)#539
Open
fathima-nooha wants to merge 3 commits into
Open
SCAL-314423 - Remove 5 Liveboard flags from SDK opt-in defaults (GA)#539fathima-nooha wants to merge 3 commits into
fathima-nooha wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the AppEmbed and LiveboardEmbed classes to optimize URL parameter handling for boolean flags. By removing default false values and implementing isUndefined checks, the SDK now avoids sending unnecessary parameters to ThoughtSpot, adhering to the repository's style guide. The review feedback correctly identifies a redundant double-negation (!!) in app.ts that should be removed for better consistency and clarity.
The implicit-default assertion no longer matches the GA'd behavior where the param is omitted from the URL when not set by the caller. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes five Liveboard feature flags out of "opt-in" state by removing their hardcoded false defaults in AppEmbed and LiveboardEmbed. The SDK now only appends each flag to the iframe URL when the host app explicitly sets it, letting the backend's GA defaults take over otherwise.
Flags affected:
isLiveboardMasterpiecesEnabled
isLiveboardCompactHeaderEnabled
isEnhancedFilterInteractivityEnabled
hideIrrelevantChipsInLiveboardTabs
coverAndFilterOptionInPDF
Reasoning
These flags were previously gated by the SDK at false, which meant every embed silently overrode the server's setting — even after the server-side feature was rolled out generally.
The fix in both src/embed/app.ts and src/embed/liveboard.ts is the same shape — drop the = false destructuring default and wrap the params[...] = ... assignment in if (!isUndefined(flag)).
This makes the SDK's behavior "pass through what the caller said; otherwise stay silent," which is the correct contract for a GA'd flag.
Existing callers that explicitly passed true or false are unaffected — the param is still forwarded with their value.
Only the implicit-false callers (i.e. anyone who never set the flag) see a behavior change, and that change is the whole point: they now get the GA default from the server.