SCAL-311824 enabled liveboard download format flags by default in embed#528
SCAL-311824 enabled liveboard download format flags by default in embed#528fathima-nooha wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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.
| isThisPeriodInDateFiltersEnabled, | ||
| enableHomepageAnnouncement = false, | ||
| isContinuousLiveboardPDFEnabled = false, | ||
| isContinuousLiveboardPDFEnabled = true, |
There was a problem hiding this comment.
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.
| isContinuousLiveboardPDFEnabled = true, | |
| isContinuousLiveboardPDFEnabled = false, |
References
- The
isContinuousLiveboardPDFEnabledparameter should be explicitly defaulted tofalse, as an exception to the general guideline of omitting falsy booleans, to ensure the feature is disabled for TSE.
| spotterChatConfig, | ||
| isThisPeriodInDateFiltersEnabled, | ||
| isContinuousLiveboardPDFEnabled = false, | ||
| isContinuousLiveboardPDFEnabled = true, |
There was a problem hiding this comment.
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.
| isContinuousLiveboardPDFEnabled = true, | |
| isContinuousLiveboardPDFEnabled = false, |
References
- The
isContinuousLiveboardPDFEnabledparameter should be explicitly defaulted tofalse, as an exception to the general guideline of omitting falsy booleans, to ensure the feature is disabled for TSE.
| isLiveboardXLSXCSVDownloadEnabled = true, | ||
| isGranularXLSXCSVSchedulesEnabled = true, |
There was a problem hiding this comment.
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.
| isLiveboardXLSXCSVDownloadEnabled = true, | |
| isGranularXLSXCSVSchedulesEnabled = true, | |
| isLiveboardXLSXCSVDownloadEnabled, | |
| isGranularXLSXCSVSchedulesEnabled, |
References
- Do not use
= falseas a default in destructuring. Leave the value asundefinedwhen not set, and only add the param to the request when the caller explicitly provides a value. (link)
| isLiveboardXLSXCSVDownloadEnabled = true, | ||
| isGranularXLSXCSVSchedulesEnabled = true, |
There was a problem hiding this comment.
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.
| isLiveboardXLSXCSVDownloadEnabled = true, | |
| isGranularXLSXCSVSchedulesEnabled = true, | |
| isLiveboardXLSXCSVDownloadEnabled, | |
| isGranularXLSXCSVSchedulesEnabled, |
References
- Do not use
= falseas a default in destructuring. Leave the value asundefinedwhen not set, and only add the param to the request when the caller explicitly provides a value. (link)
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.