formatting issue resolved

This commit is contained in:
Sakshi Gupta 2025-09-30 16:10:24 +05:30
parent 0bf9382eeb
commit 8b21afc871
14 changed files with 71 additions and 80 deletions

View File

@ -50,7 +50,9 @@ export const Upload: FunctionComponent<UploadProps> = ({
const title = label + " to upload";
return (
<div>
<span className="renewUploadItemsHeader" style={{ color: "var(--colorNeutralForeground1)" }}>{label}</span>
<span className="renewUploadItemsHeader" style={{ color: "var(--colorNeutralForeground1)" }}>
{label}
</span>
{tooltip && <InfoTooltip>{tooltip}</InfoTooltip>}
<Stack horizontal>
<TextField styles={{ fieldGroup: { width: 300 } }} readOnly value={selectedFilesTitle.toString()} />

View File

@ -80,7 +80,7 @@ export class CollapsibleSectionComponent extends React.Component<CollapsibleSect
iconProps={{ iconName: "Delete" }}
style={{ height: 27, marginRight: "20px" }}
styles={{
rootHovered: {
rootHovered: {
backgroundColor: "transparent",
},
rootPressed: {

View File

@ -1,15 +1,15 @@
import { IPivotItemProps, IPivotProps, Pivot, PivotItem, Stack } from "@fluentui/react";
import {
ComputedPropertiesComponent,
ComputedPropertiesComponentProps,
ComputedPropertiesComponent,
ComputedPropertiesComponentProps,
} from "Explorer/Controls/Settings/SettingsSubComponents/ComputedPropertiesComponent";
import {
ContainerPolicyComponent,
ContainerPolicyComponentProps,
ContainerPolicyComponent,
ContainerPolicyComponentProps,
} from "Explorer/Controls/Settings/SettingsSubComponents/ContainerPolicyComponent";
import {
ThroughputBucketsComponent,
ThroughputBucketsComponentProps,
ThroughputBucketsComponent,
ThroughputBucketsComponentProps,
} from "Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/ThroughputBucketsComponent";
import { useDatabases } from "Explorer/useDatabases";
import { isFabricNative } from "Platform/Fabric/FabricUtil";
@ -34,41 +34,41 @@ import * as AutoPilotUtils from "../../../Utils/AutoPilotUtils";
import { MongoDBCollectionResource, MongoIndex } from "../../../Utils/arm/generatedClients/cosmos/types";
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
import {
PartitionKeyComponent,
PartitionKeyComponentProps,
PartitionKeyComponent,
PartitionKeyComponentProps,
} from "../../Controls/Settings/SettingsSubComponents/PartitionKeyComponent";
import { useCommandBar } from "../../Menus/CommandBar/CommandBarComponentAdapter";
import { SettingsTabV2 } from "../../Tabs/SettingsTabV2";
import "./SettingsComponent.less";
import { mongoIndexingPolicyAADError } from "./SettingsRenderUtils";
import {
ConflictResolutionComponent,
ConflictResolutionComponentProps,
ConflictResolutionComponent,
ConflictResolutionComponentProps,
} from "./SettingsSubComponents/ConflictResolutionComponent";
import {
GlobalSecondaryIndexComponent,
GlobalSecondaryIndexComponentProps,
GlobalSecondaryIndexComponent,
GlobalSecondaryIndexComponentProps,
} from "./SettingsSubComponents/GlobalSecondaryIndexComponent";
import { IndexingPolicyComponent, IndexingPolicyComponentProps } from "./SettingsSubComponents/IndexingPolicyComponent";
import {
MongoIndexingPolicyComponent,
MongoIndexingPolicyComponentProps,
MongoIndexingPolicyComponent,
MongoIndexingPolicyComponentProps,
} from "./SettingsSubComponents/MongoIndexingPolicy/MongoIndexingPolicyComponent";
import { ScaleComponent, ScaleComponentProps } from "./SettingsSubComponents/ScaleComponent";
import { SubSettingsComponent, SubSettingsComponentProps } from "./SettingsSubComponents/SubSettingsComponent";
import {
AddMongoIndexProps,
ChangeFeedPolicyState,
GeospatialConfigType,
MongoIndexTypes,
SettingsV2TabTypes,
TtlType,
getMongoNotification,
getTabTitle,
hasDatabaseSharedThroughput,
isDirty,
parseConflictResolutionMode,
parseConflictResolutionProcedure,
AddMongoIndexProps,
ChangeFeedPolicyState,
GeospatialConfigType,
MongoIndexTypes,
SettingsV2TabTypes,
TtlType,
getMongoNotification,
getTabTitle,
hasDatabaseSharedThroughput,
isDirty,
parseConflictResolutionMode,
parseConflictResolutionProcedure,
} from "./SettingsUtils";
interface SettingsV2TabInfo {

View File

@ -166,8 +166,8 @@ export const separatorStyles: Partial<ISeparatorStyles> = {
};
export const messageBarStyles: Partial<IMessageBarStyles> = {
root: {
marginTop: "5px",
root: {
marginTop: "5px",
backgroundColor: "var(--colorNeutralBackground1)",
selectors: {
"&.ms-MessageBar--severeWarning": {

View File

@ -101,7 +101,7 @@ export class ComputedPropertiesComponent extends React.Component<
monaco.editor.setTheme(newTheme);
}
});
const computedPropertiesEditorModel = this.computedPropertiesEditor.getModel();
computedPropertiesEditorModel.onDidChangeContent(this.onEditorContentChange.bind(this));
this.props.logComputedPropertiesSuccessMessage();

View File

@ -112,7 +112,7 @@ export class IndexingPolicyComponent extends React.Component<
monaco.editor.setTheme(newTheme);
}
});
const indexingPolicyEditorModel = this.indexingPolicyEditor.getModel();
indexingPolicyEditorModel.onDidChangeContent(this.onEditorContentChange.bind(this));
this.props.logIndexingPolicySuccessMessage();
@ -120,7 +120,6 @@ export class IndexingPolicyComponent extends React.Component<
}
}
private onEditorContentChange = (): void => {
const indexingPolicyEditorModel = this.indexingPolicyEditor.getModel();
try {

View File

@ -13,9 +13,9 @@ export const ThemeToggleButton = (): CommandButtonComponentProps => {
});
return unsubscribe;
}, []);
const tooltipText = darkMode ? "Switch to Light Theme" : "Switch to Dark Theme";
return {
iconSrc: darkMode ? SunBlueIcon : MoonBlueIcon,
iconAlt: "Theme Toggle",
@ -26,4 +26,4 @@ export const ThemeToggleButton = (): CommandButtonComponentProps => {
hasPopup: false,
disabled: false,
};
};
};

View File

@ -354,9 +354,9 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
label: { padding: 0, alignItems: "center" },
root: {
selectors: {
':hover .ms-Checkbox-text': { color: "var(--colorNeutralForeground1)" }
}
}
":hover .ms-Checkbox-text": { color: "var(--colorNeutralForeground1)" },
},
},
}}
onChange={(ev: React.FormEvent<HTMLElement>, isChecked: boolean) =>
this.setState({ isSharedThroughputChecked: isChecked })

View File

@ -229,9 +229,9 @@ export const AddDatabasePanel: FunctionComponent<AddDatabasePaneProps> = ({
label: { padding: 0, alignItems: "center" },
root: {
selectors: {
':hover .ms-Checkbox-text': { color: "var(--colorNeutralForeground1)" }
}
}
":hover .ms-Checkbox-text": { color: "var(--colorNeutralForeground1)" },
},
},
}}
label="Provision throughput"
checked={databaseCreateNewShared}

View File

@ -35,11 +35,11 @@ export const AdvancedComponent = (props: AdvancedComponentProps): JSX.Element =>
text: { fontSize: 12, color: "var(--colorNeutralForeground1)" },
checkbox: { width: 12, height: 12 },
label: { padding: 0, alignItems: "center", wordWrap: "break-word", whiteSpace: "break-spaces" },
root: {
selectors: {
':hover .ms-Checkbox-text': { color: "var(--colorNeutralForeground1)" }
}
}
root: {
selectors: {
":hover .ms-Checkbox-text": { color: "var(--colorNeutralForeground1)" },
},
},
}}
onChange={(ev: React.FormEvent<HTMLElement>, isChecked: boolean) => {
useHashV1CheckboxOnChange(isChecked);

View File

@ -94,13 +94,13 @@ export const LoadQueryPane: FunctionComponent = (): JSX.Element => {
value={selectedFileName}
autoFocus
readOnly
styles={{
styles={{
fieldGroup: { width: 300, color: "var(--colorNeutralForeground1)" },
subComponentStyles: {
label: {
root: { color: "var(--colorNeutralForeground1)" }
}
}
root: { color: "var(--colorNeutralForeground1)" },
},
},
}}
/>
<label htmlFor="importQueryInputId" className="customFileUpload">

View File

@ -147,12 +147,12 @@ export const SaveQueryPane: FunctionComponent<SaveQueryPaneProps> = ({
<div className="panelFormWrapper" style={{ flexGrow: 1 }}>
<div className="panelMainContent">
{!isSaveQueryEnabled() ? (
<Text
variant="small"
styles={{
root: {
color: 'var(--colorNeutralForeground1)',
}
<Text
variant="small"
styles={{
root: {
color: "var(--colorNeutralForeground1)",
},
}}
>
{setupSaveQueriesText}

View File

@ -162,9 +162,9 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
globalAccountName: userContext.databaseAccount?.name,
})
? (loadState({
componentName: AppStateComponentNames.SelectedRegionalEndpoint,
globalAccountName: userContext.databaseAccount?.name,
}) as string)
componentName: AppStateComponentNames.SelectedRegionalEndpoint,
globalAccountName: userContext.databaseAccount?.name,
}) as string)
: undefined,
);
const [retryAttempts, setRetryAttempts] = useState<number>(
@ -1025,9 +1025,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
onChange={() => setContainerPaginationEnabled(!containerPaginationEnabled)}
label="Enable container pagination"
onRenderLabel={() => (
<span style={{ color: "var(--colorNeutralForeground1)" }}>
Enable container pagination
</span>
<span style={{ color: "var(--colorNeutralForeground1)" }}>Enable container pagination</span>
)}
/>
</div>
@ -1054,9 +1052,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
checked={crossPartitionQueryEnabled}
onChange={() => setCrossPartitionQueryEnabled(!crossPartitionQueryEnabled)}
onRenderLabel={() => (
<span style={{ color: "var(--colorNeutralForeground1)" }}>
Enable cross-partition query
</span>
<span style={{ color: "var(--colorNeutralForeground1)" }}>Enable cross-partition query</span>
)}
/>
</div>
@ -1090,9 +1086,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
checked={queryControlEnabled}
onChange={() => setQueryControlEnabled(!queryControlEnabled)}
onRenderLabel={() => (
<span style={{ color: "var(--colorNeutralForeground1)" }}>
Enable query control
</span>
<span style={{ color: "var(--colorNeutralForeground1)" }}>Enable query control</span>
)}
/>
</div>
@ -1129,8 +1123,8 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
label="Max degree of parallelism"
styles={{
label: {
color: "var(--colorNeutralForeground1)"
}
color: "var(--colorNeutralForeground1)",
},
}}
/>
</div>
@ -1202,9 +1196,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
checked={copilotSampleDBEnabled}
onChange={handleSampleDatabaseChange}
onRenderLabel={() => (
<span style={{ color: "var(--colorNeutralForeground1)" }}>
Enable sample database
</span>
<span style={{ color: "var(--colorNeutralForeground1)" }}>Enable sample database</span>
)}
/>
</div>

View File

@ -156,14 +156,12 @@ const Root: React.FC = () => {
// Use React state to track isDarkMode and subscribe to changes
const [isDarkMode, setIsDarkMode] = React.useState(useThemeStore.getState().isDarkMode);
const currentTheme = isDarkMode ? webDarkTheme : webLightTheme;
// Subscribe to theme changes
React.useEffect(() => {
return useThemeStore.subscribe(
(state) => {
setIsDarkMode(state.isDarkMode);
}
);
return useThemeStore.subscribe((state) => {
setIsDarkMode(state.isDarkMode);
});
}, []);
useEffect(() => {