);
+}`,
+ parserOptions: { ecmaVersion: 2021, ecmaFeatures: { jsx: true } },
+ errors: [
+ "Don't use a dynamic css() call in the render method, this creates a new class name every time component updates and is not performant. Static styles can be defined with css outside of render, dynamic should be passed through the style prop.",
+ ],
+ },
+ {
+ code: "function Pineapple() { return (
pineapples
); }",
+ parserOptions: { ecmaVersion: 2021, ecmaFeatures: { jsx: true } },
+
+ errors: [
+ "Don't use a dynamic css() call in the render method, this creates a new class name every time component updates and is not performant. Static styles can be defined with css outside of render, dynamic should be passed through the style prop.",
+ ],
+ },
+ ],
+});
diff --git a/configs/eslint-plugin-compass/rules/unique-mongodb-log-id.test.js b/configs/eslint-plugin-compass/rules/unique-mongodb-log-id.test.js
index 2f83e995686..4b8b5d368cf 100644
--- a/configs/eslint-plugin-compass/rules/unique-mongodb-log-id.test.js
+++ b/configs/eslint-plugin-compass/rules/unique-mongodb-log-id.test.js
@@ -17,7 +17,7 @@ const testOptions = {
],
};
-ruleTester.run('no-leafygreen-outside-compass-components', rule, {
+ruleTester.run('unique-mongodb-log-id', rule, {
valid: [
{
code: 'mongoLogId(10);',
diff --git a/packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/sort/sort.tsx b/packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/sort/sort.tsx
index 2de6aeedbe0..9868995a02c 100644
--- a/packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/sort/sort.tsx
+++ b/packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/sort/sort.tsx
@@ -6,7 +6,7 @@ import {
css,
ListEditor,
} from '@mongodb-js/compass-components';
-import React, { useMemo, useState } from 'react';
+import React, { useState } from 'react';
import {
SORT_DIRECTION_OPTIONS,
getNextId,
@@ -47,6 +47,10 @@ const sortDirectionStyles = css({
width: '150px',
});
+const comboboxStyles = css({
+ minWidth: '200px',
+});
+
const mapSortFormDataToStageValue = (
formData: SortFieldState[]
): Record => {
@@ -159,14 +163,6 @@ export const SortForm = ({ fields, onChange }: WizardComponentProps) => {
onSetFormData(newData);
};
- const comboboxClassName = useMemo(() => {
- return css({
- width: `calc(${String(
- Math.max(...fields.map(({ name }) => name.length), 10)
- )}ch)`,
- });
- }, [fields]);
-
return (
- {enableCreatingNewConnections && (
+ {!activeConnectionIds.length && enableCreatingNewConnections ? (
<>
To get started, connect to an existing server or
+ {fakerSchemaGenerationStatus === 'error' && (
+
+
+ LLM Request failed. Please confirm again.
+
+
+ )}
+ >
+ ) : (
+ // Not reachable since schema analysis must be finished before the modal can be opened
+ We are analyzing your collection.
+ )}
+
+ );
+};
+
+const mapStateToProps = (state: CollectionState) => {
+ const schemaAnalysis = state.schemaAnalysis;
+ const fakerSchemaGenerationStatus = state.fakerSchemaGeneration.status;
+
+ return {
+ schemaAnalysis,
+ fakerSchemaGenerationStatus,
+ };
+};
+
+const ConnectedRawSchemaConfirmationScreen = connect(
+ mapStateToProps,
+ {}
+)(RawSchemaConfirmationScreen);
+
+export default ConnectedRawSchemaConfirmationScreen;
diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/raw-schema-confirmation.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/raw-schema-confirmation.tsx
deleted file mode 100644
index 6848d5b8c97..00000000000
--- a/packages/compass-collection/src/components/mock-data-generator-modal/raw-schema-confirmation.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import React from 'react';
-import { connect } from 'react-redux';
-
-import { Code, Body, Subtitle } from '@mongodb-js/compass-components';
-
-import type { CollectionState } from '../../modules/collection-tab';
-import type { FieldInfo } from '../../schema-analysis-types';
-
-interface RawSchemaConfirmationProps {
- schemaContent: Record | null;
- namespace: string;
-}
-
-// Note: Currently a placeholder. The final contents will be addressed by CLOUDP-333852
-const RawSchemaConfirmation = (props: RawSchemaConfirmationProps) => {
- // this will change
- const codeContent = props.schemaContent
- ? JSON.stringify(props.schemaContent, null, 4)
- : 'No schema data available';
-
- return (
-
- {props.namespace}
- Document Schema Identified
-
- We have identified the following schema from your documents. This schema
- will be sent to an LLM for processing.
-
-
- {codeContent}
-
-