chore: Remove Navigation Settings in AI apps (#40312)
## Description Hide the Navigation settings in AI datasources ## Summary by CodeRabbit - **New Features** - The Navigation settings tab is now automatically hidden when the AI agent flow feature is enabled. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
5294bacf21
commit
a94c75b868
|
|
@ -34,6 +34,7 @@ import AnalyticsUtil from "ee/utils/AnalyticsUtil";
|
||||||
import { Divider } from "@appsmith/ads";
|
import { Divider } from "@appsmith/ads";
|
||||||
import { ImportAppSettings } from "./components/ImportAppSettings";
|
import { ImportAppSettings } from "./components/ImportAppSettings";
|
||||||
import { getIsAnvilLayout } from "layoutSystems/anvil/integrations/selectors";
|
import { getIsAnvilLayout } from "layoutSystems/anvil/integrations/selectors";
|
||||||
|
import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors";
|
||||||
|
|
||||||
export enum AppSettingsTabs {
|
export enum AppSettingsTabs {
|
||||||
General,
|
General,
|
||||||
|
|
@ -125,7 +126,7 @@ function AppSettings() {
|
||||||
};
|
};
|
||||||
}, [selectedTab]);
|
}, [selectedTab]);
|
||||||
|
|
||||||
const SectionHeadersConfig: SectionHeaderProps[] = [
|
let SectionHeadersConfig: SectionHeaderProps[] = [
|
||||||
{
|
{
|
||||||
id: "t--general-settings-header",
|
id: "t--general-settings-header",
|
||||||
icon: "settings-v3",
|
icon: "settings-v3",
|
||||||
|
|
@ -193,6 +194,14 @@ function AppSettings() {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const isAiAgentFlowEnabled = useSelector(getIsAiAgentFlowEnabled);
|
||||||
|
|
||||||
|
if (isAiAgentFlowEnabled) {
|
||||||
|
SectionHeadersConfig = SectionHeadersConfig.filter(
|
||||||
|
(config) => config.id !== "t--navigation-settings-header",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 50 px height of the sectionHeader item
|
// 50 px height of the sectionHeader item
|
||||||
// 41px height of pages title
|
// 41px height of pages title
|
||||||
// 1px + 20px divider + spacing
|
// 1px + 20px divider + spacing
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user