yuichirio_ha
yuichirio_ha
TFDThoughtSpot For Developers
Created by Thao on 1/24/2025 in #help
Embedding multiple Vizs/Liveboards on the same page
export function LiveboardsPage() {
const embedRef1 = useEmbedRef<typeof LiveboardEmbed>();
const embedRef2 = useEmbedRef<typeof LiveboardEmbed>();

const { liveboardIdOne, embedConfig } = useAppConfig();
const [activeTab, setActiveTab] = useState<"liveboard1" | "liveboard2">(
"liveboard1"
);

return (
<div className="MyLiveboardContainer">
<div className="tab-bar">
<button
className={`tab ${activeTab === "liveboard1" ? "active" : ""}`}
onClick={() => setActiveTab("liveboard1")}
>
Liveboard 1
</button>
<button
className={`tab ${activeTab === "liveboard2" ? "active" : ""}`}
onClick={() => setActiveTab("liveboard2")}
>
Liveboard 2
</button>
</div>

{/* Keep both liveboards mounted, but toggle visibility */}
<HostEventBar
embedRef={activeTab === "liveboard1" ? embedRef1 : embedRef2}
/>
<div className="liveboard-container">
<div
className={`liveboard-wrapper ${
activeTab === "liveboard1" ? "visible" : "hidden"
}`}
>
<LiveboardEmbed
liveboardId={liveboardIdOne || LB_ONE}
frameParams={{ height: "100vh" }}
ref={embedRef1}
/>
</div>
<div
className={`liveboard-wrapper ${
activeTab === "liveboard2" ? "visible" : "hidden"
}`}
>
<LiveboardEmbed
liveboardId={LB_ONE}
frameParams={{ height: "100vh" }}
ref={embedRef2}
/>
</div>
</div>
</div>
);
}
export function LiveboardsPage() {
const embedRef1 = useEmbedRef<typeof LiveboardEmbed>();
const embedRef2 = useEmbedRef<typeof LiveboardEmbed>();

const { liveboardIdOne, embedConfig } = useAppConfig();
const [activeTab, setActiveTab] = useState<"liveboard1" | "liveboard2">(
"liveboard1"
);

return (
<div className="MyLiveboardContainer">
<div className="tab-bar">
<button
className={`tab ${activeTab === "liveboard1" ? "active" : ""}`}
onClick={() => setActiveTab("liveboard1")}
>
Liveboard 1
</button>
<button
className={`tab ${activeTab === "liveboard2" ? "active" : ""}`}
onClick={() => setActiveTab("liveboard2")}
>
Liveboard 2
</button>
</div>

{/* Keep both liveboards mounted, but toggle visibility */}
<HostEventBar
embedRef={activeTab === "liveboard1" ? embedRef1 : embedRef2}
/>
<div className="liveboard-container">
<div
className={`liveboard-wrapper ${
activeTab === "liveboard1" ? "visible" : "hidden"
}`}
>
<LiveboardEmbed
liveboardId={liveboardIdOne || LB_ONE}
frameParams={{ height: "100vh" }}
ref={embedRef1}
/>
</div>
<div
className={`liveboard-wrapper ${
activeTab === "liveboard2" ? "visible" : "hidden"
}`}
>
<LiveboardEmbed
liveboardId={LB_ONE}
frameParams={{ height: "100vh" }}
ref={embedRef2}
/>
</div>
</div>
</div>
);
}
11 replies
TFDThoughtSpot For Developers
Created by Thao on 1/24/2025 in #help
Embedding multiple Vizs/Liveboards on the same page
Hey @Thao , I can provide you the sandbox to checkout and compare your environment. You can do something like below and that should work out. You can do something like this : https://codesandbox.io/p/sandbox/two-liveboards-test-r7t7q9?file=%2Fsrc%2Fcomponents%2Fembed%2Fliveboard.tsx%3A12%2C39 Test it on here. 1. Enter the credentials click on init 2. wait for : Init login success Popup message. 3. Navigate to liveboard in the sandbox. 4. check by toggling the liveboards. they should have loaded and you can quickly toggle between the views. Hit the limit: 2000 characters breaking in another message. Thanks.
11 replies
TFDThoughtSpot For Developers
Created by ferg.rose on 1/30/2025 in #dev-help
ferg.rose - Hi all - with the full app embed, i...
Yes @shikharTS , Currently the behaviour is : We can show -> top nav + left nav -> only top nav -> both hidden But can't do -> only side nav. Thanks.
5 replies
TFDThoughtSpot For Developers
Created by Lucjan on 1/28/2025 in #dev-help
Lucjan - Hi Team,I am currently working on if...
Hey @Lucjan orgSwitcherHidden Boolean. Hides the Orgs drop-down in the full application embedded view. Youc an use this : https://developers.thoughtspot.com/docs/embed-without-sdk Listed under : Feature flags and query parameters to customize the embedded view.
5 replies
TFDThoughtSpot For Developers
Created by rumana-hf on 12/12/2024 in #dev-help
Hey there, I'm using the Visual Embed
Hi @rumana-hf , I would suggest EmbedEvent.Error to handle those, You can try the errors and check the same. We provide better ways as you check in the playground also the error banner is shown in the same way. https://developers.thoughtspot.com/docs/Class_AppEmbed#_on
14 replies
TFDThoughtSpot For Developers
Created by Shubham on 12/6/2024 in #dev-help
Hi Team,
hey @Shubham , First one -> we can do visibleTabs, I suppose that's what you using to show the current tab only at each instance of embed. Also we have to pass the runtimeFilters to each instance of embed. They will act separately. If they are on same page, you might consider updating them at the same time with their refs. Thanks.
4 replies
TFDThoughtSpot For Developers
Created by lokesh on 12/6/2024 in #dev-help
LB Title
Hi @lokesh , It loooks all good. Can you check if proper title is available. Also sdk version and cluster version? you facing this in first time? or like new ? Also once check the iframe url by doing inspect and check if it contains the param. Or you can paste the url here. Thanks.
7 replies
TFDThoughtSpot For Developers
Created by Suvash on 12/4/2024 in #dev-help
Homepage Spotter details access.
Yeah, happy to help. 🙃
3 replies
TFDThoughtSpot For Developers
Created by Suvash on 12/3/2024 in #dev-help
Sage Default Source selection for homepage
typo 😅 .
6 replies
TFDThoughtSpot For Developers
Created by Suvash on 12/4/2024 in #dev-help
Homepage Spotter details access.
Hey @Suvash , So, you somehow want to get the query typed by the user? It might be possible to catch this stuff through embedEvents -> https://developers.thoughtspot.com/docs/Enumeration_EmbedEvent#_sageworksheetupdated So, with use of some of these events to check what data is emitted we could achieve what you want to get. SageEmbedQuery -> this one you can use to get the query, but it will emit on query change, so you can get finalized query on GO or something. Check the events and that should help to get you the query and datasource with some related event. Thanks.
3 replies
TFDThoughtSpot For Developers
Created by Suvash on 12/4/2024 in #dev-help
ICON Customization
Hi @Suvash , You can refer to this, I think it should cover your doubts. Also you need to add csp settings when you use font, icons. Thanks. https://developers.thoughtspot.com/docs/customize-icons
2 replies
TFDThoughtSpot For Developers
Created by Simon on 11/28/2024 in #dev-help
Hi. If someone could advise, that would
Yes, if you are passing them in the component then those will be applied for all users. But other way is just based on user in your app itself 😦 based on the user logging in the user-group you have to put different array of hidden/disabled actions . -> This is not a good way I suppose. Or hide using CSS. https://developers.thoughtspot.com/docs/Interface_customCssInterface#_rules_unstable And if you want to hide with hiddenActions, you have to hide all the actions in the menu to hide the three dots without CSS. Thanks.
15 replies
TFDThoughtSpot For Developers
Created by Suvash on 12/3/2024 in #dev-help
Sage Default Source selection for homepage
Currently there is no way to select something by default in embed. also, in embed when you select the dataSource, it is kept in embed itself, it won't be reflected from the one set on the cluster homepage and vice-versa. Thanks
6 replies
TFDThoughtSpot For Developers
Created by Ivana Kaufmanova on 11/28/2024 in #dev-help
Hello,
Hi @Ivana Kaufmanova , You can provide the permissions to make it visible to certain users. If you explicitly want users to authenticate users by themselves into thoughtspot. Otherwise : based on the token used from the sdk the users would be able to see the liveboard in embed. Authentication inside your app => based on their privilages inside your web app init the thoughtspot sdk with the specific token and username for that user in THoughtspot if general use dummy user.
With above they wouldn't need to log in or sign in. You can just create some dummy user if you don't care which user is logging in.
2 replies
TFDThoughtSpot For Developers
Created by Regan on 10/29/2024 in #dev-help
Ive also managed to copy and execute the
Hi @Regan , you can paste the snippet when you back. Also if the requests are too similar it might send the cached response, can you try with no-cache in header. thought this shouldn't be happening if specified type.
2 replies
TFDThoughtSpot For Developers
Created by Suvash on 10/9/2024 in #dev-help
Log Errors
Yeah, the first info call generally fails. which is expected flow. And that logs error in console. We keep the error logs, in case some other failures are seen. Otherwise you can just disable the error logs. https://developers.thoughtspot.com/docs/Interface_EmbedConfig#_loglevel We can set up log level as you want. Thanks. Also the error you sent doesn't seems to be from sdk so, should be fine.
4 replies
TFDThoughtSpot For Developers
Created by Priyadarshi on 10/8/2024 in #dev-help
Mobile Native Apps
Hi @Priyadarshi , We are hoping to provide mobile related demos out. but would take time. I will confirm with the team and let you know. Thanks.
1 replies
TFDThoughtSpot For Developers
Created by Suvash on 10/9/2024 in #dev-help
Log Errors
Hi @Suvash , The first info call is supposed to fail when working with sdk and these console log errors won't be a problem. But can you show the last error you getting in the console, that was not supposed to be there. And might be related to some other code. And your code snipeet looks all good for the init part. And also init is not an async though it wouldn't be a problem. Thanks.
4 replies