diff --git a/packages/compass-schema/src/components/compass-schema.tsx b/packages/compass-schema/src/components/compass-schema.tsx index b8f930b8e8d..b2a742d5107 100644 --- a/packages/compass-schema/src/components/compass-schema.tsx +++ b/packages/compass-schema/src/components/compass-schema.tsx @@ -446,7 +446,7 @@ export default connect( }), { onStartAnalysis: startAnalysis, - onStopAnalysis: stopAnalysis, + onStopAnalysis: () => stopAnalysis(), onExportSchemaClicked: openExportSchema, } )(Schema); diff --git a/packages/compass-schema/src/components/export-schema-legacy-banner.tsx b/packages/compass-schema/src/components/export-schema-legacy-banner.tsx index f46e3ed3779..71415ac892b 100644 --- a/packages/compass-schema/src/components/export-schema-legacy-banner.tsx +++ b/packages/compass-schema/src/components/export-schema-legacy-banner.tsx @@ -13,7 +13,7 @@ import { import type { RootState, SchemaThunkDispatch } from '../stores/store'; import { - confirmedLegacySchemaShare, + confirmedExportLegacySchemaToClipboard, switchToSchemaExport, SchemaExportActions, stopShowingLegacyBanner, @@ -539,7 +539,7 @@ export default connect( }), (dispatch: SchemaThunkDispatch) => ({ onClose: () => dispatch({ type: SchemaExportActions.closeLegacyBanner }), - onLegacyShare: () => dispatch(confirmedLegacySchemaShare()), + onLegacyShare: () => dispatch(confirmedExportLegacySchemaToClipboard()), onSwitchToSchemaExport: () => dispatch(switchToSchemaExport()), stopShowingLegacyBanner: (choice: 'legacy' | 'export') => dispatch(stopShowingLegacyBanner(choice)), diff --git a/packages/compass-schema/src/components/export-schema-modal.tsx b/packages/compass-schema/src/components/export-schema-modal.tsx index 1148a0e8435..08768eea7fb 100644 --- a/packages/compass-schema/src/components/export-schema-modal.tsx +++ b/packages/compass-schema/src/components/export-schema-modal.tsx @@ -21,6 +21,7 @@ import { cancelExportSchema, changeExportSchemaFormat, closeExportSchema, + trackSchemaExported, type SchemaFormat, type ExportStatus, } from '../stores/schema-export-reducer'; @@ -75,6 +76,7 @@ const ExportSchemaModal: React.FunctionComponent<{ onCancelSchemaExport: () => void; onChangeSchemaExportFormat: (format: SchemaFormat) => Promise; onClose: () => void; + onExportedSchemaCopied: () => void; }> = ({ errorMessage, exportStatus, @@ -84,6 +86,7 @@ const ExportSchemaModal: React.FunctionComponent<{ onCancelSchemaExport, onChangeSchemaExportFormat, onClose, + onExportedSchemaCopied, }) => { const onFormatOptionSelected = useCallback( (event: ChangeEvent) => { @@ -143,6 +146,7 @@ const ExportSchemaModal: React.FunctionComponent<{ language="json" className={codeStyles} copyable={true} + onCopy={onExportedSchemaCopied} > {exportedSchema ?? 'Empty'} @@ -163,7 +167,7 @@ const ExportSchemaModal: React.FunctionComponent<{