Skip to content

SCAL-311824 enabled liveboard download format flags by default in embed#528

Open
fathima-nooha wants to merge 2 commits into
mainfrom
SCAL-311824
Open

SCAL-311824 enabled liveboard download format flags by default in embed#528
fathima-nooha wants to merge 2 commits into
mainfrom
SCAL-311824

Conversation

@fathima-nooha
Copy link
Copy Markdown
Collaborator

Enabling flags for PnC (Pick and Choose) and WYSIWYG(What you see is what you get) by default for embed.

Both these can only be enabled together due to their impact on embed actions.

@fathima-nooha fathima-nooha requested a review from a team as a code owner May 13, 2026 01:29
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the default values for several boolean flags (isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, and isContinuousLiveboardPDFEnabled) from false to true within the AppEmbed and LiveboardEmbed classes. Review feedback highlights that isContinuousLiveboardPDFEnabled must remain explicitly defaulted to false to ensure the feature is disabled for TSE deployments. Furthermore, the reviewer pointed out a violation of the Repository Style Guide (Rule 12), recommending that boolean parameters like isLiveboardXLSXCSVDownloadEnabled and isGranularXLSXCSVSchedulesEnabled should not have default values in destructuring to avoid unnecessary URL bloat.

Comment thread src/embed/app.ts
isThisPeriodInDateFiltersEnabled,
enableHomepageAnnouncement = false,
isContinuousLiveboardPDFEnabled = false,
isContinuousLiveboardPDFEnabled = true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Setting isContinuousLiveboardPDFEnabled to true by default contradicts the specific General Rule which requires this parameter to be explicitly defaulted to false. This exception is in place to ensure the feature remains disabled for TSE, overriding the general guideline of omitting falsy booleans.

Suggested change
isContinuousLiveboardPDFEnabled = true,
isContinuousLiveboardPDFEnabled = false,
References
  1. The isContinuousLiveboardPDFEnabled parameter should be explicitly defaulted to false, as an exception to the general guideline of omitting falsy booleans, to ensure the feature is disabled for TSE.

Comment thread src/embed/liveboard.ts
spotterChatConfig,
isThisPeriodInDateFiltersEnabled,
isContinuousLiveboardPDFEnabled = false,
isContinuousLiveboardPDFEnabled = true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Setting isContinuousLiveboardPDFEnabled to true violates the specific General Rule for this parameter. It must be explicitly defaulted to false to ensure the feature is disabled for TSE deployments.

Suggested change
isContinuousLiveboardPDFEnabled = true,
isContinuousLiveboardPDFEnabled = false,
References
  1. The isContinuousLiveboardPDFEnabled parameter should be explicitly defaulted to false, as an exception to the general guideline of omitting falsy booleans, to ensure the feature is disabled for TSE.

Comment thread src/embed/app.ts
Comment on lines +916 to +917
isLiveboardXLSXCSVDownloadEnabled = true,
isGranularXLSXCSVSchedulesEnabled = true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the Repository Style Guide (Rule 12), boolean parameters should not use default values in destructuring. They should be left as undefined when not set to avoid unnecessary URL bloat, as ThoughtSpot treats omitted parameters as falsy. If these features are intended to be enabled by default for all embed users, consider handling this on the server side so the SDK can omit the parameters when not explicitly provided by the user.

Suggested change
isLiveboardXLSXCSVDownloadEnabled = true,
isGranularXLSXCSVSchedulesEnabled = true,
isLiveboardXLSXCSVDownloadEnabled,
isGranularXLSXCSVSchedulesEnabled,
References
  1. Do not use = false as a default in destructuring. Leave the value as undefined when not set, and only add the param to the request when the caller explicitly provides a value. (link)

Comment thread src/embed/liveboard.ts
Comment on lines +634 to +635
isLiveboardXLSXCSVDownloadEnabled = true,
isGranularXLSXCSVSchedulesEnabled = true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of default values in destructuring for boolean parameters violates Rule 12 of the Repository Style Guide. Parameters should be left as undefined when not set to minimize the query string size. If enabling these by default is required, it is preferred to update the default behavior on the ThoughtSpot server side.

Suggested change
isLiveboardXLSXCSVDownloadEnabled = true,
isGranularXLSXCSVSchedulesEnabled = true,
isLiveboardXLSXCSVDownloadEnabled,
isGranularXLSXCSVSchedulesEnabled,
References
  1. Do not use = false as a default in destructuring. Leave the value as undefined when not set, and only add the param to the request when the caller explicitly provides a value. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant