chore: update embed snippet tab (#40246)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- The option to toggle the navigation bar is now only visible when a
specific AI Agent feature is disabled.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Pawan Kumar 2025-04-15 13:20:17 +05:30 committed by GitHub
parent 32db30a447
commit dc516f3432
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,7 @@ import { PrivateEmbedSettings } from "ee/pages/Applications/PrivateEmbedSettings
import { getCurrentApplication } from "ee/selectors/applicationSelectors"; import { getCurrentApplication } from "ee/selectors/applicationSelectors";
import { useIsCloudBillingEnabled } from "hooks"; import { useIsCloudBillingEnabled } from "hooks";
import { ChromeExtensionBanner } from "ee/pages/Applications/ChromeExtensionBanner"; import { ChromeExtensionBanner } from "ee/pages/Applications/ChromeExtensionBanner";
import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors";
export const StyledPropertyHelpLabel = styled(PropertyHelpLabel)` export const StyledPropertyHelpLabel = styled(PropertyHelpLabel)`
.bp3-popover-content > div { .bp3-popover-content > div {
@ -57,6 +58,7 @@ export function ShareModal() {
selectedMethod, selectedMethod,
); );
const isCloudBillingEnabled = useIsCloudBillingEnabled(); const isCloudBillingEnabled = useIsCloudBillingEnabled();
const isAiAgentFlowEnabled = useSelector(getIsAiAgentFlowEnabled);
return ( return (
<div className="flex flex-col gap-6"> <div className="flex flex-col gap-6">
@ -90,18 +92,20 @@ export function ShareModal() {
</div> </div>
)} )}
<Switch {Boolean(isAiAgentFlowEnabled) === false && (
data-testid={"show-navigation-bar-toggle"} <Switch
defaultSelected={embedSnippet.currentEmbedSetting?.showNavigationBar} data-testid={"show-navigation-bar-toggle"}
onChange={() => defaultSelected={embedSnippet.currentEmbedSetting?.showNavigationBar}
embedSnippet.onChange({ onChange={() =>
showNavigationBar: embedSnippet.onChange({
!embedSnippet.currentEmbedSetting.showNavigationBar, showNavigationBar:
}) !embedSnippet.currentEmbedSetting.showNavigationBar,
} })
> }
{createMessage(IN_APP_EMBED_SETTING.showNavigationBar)} >
</Switch> {createMessage(IN_APP_EMBED_SETTING.showNavigationBar)}
</Switch>
)}
{!isPublicApp && ( {!isPublicApp && (
<PrivateEmbedSettings <PrivateEmbedSettings