File tree Expand file tree Collapse file tree 3 files changed +30
-20
lines changed
compass-data-modeling/src/components
compass-e2e-tests/helpers Expand file tree Collapse file tree 3 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,12 @@ const ExportDiagramModal = ({
8383 < Radio
8484 checked = { exportFormat === 'diagram' }
8585 value = "diagram"
86- aria-label = "Diagram File"
86+ aria-label = "MDM File"
8787 onClick = { ( ) => onSelectFormat ( 'diagram' ) }
8888 size = "small"
8989 description = "Importable into Compass and Data Explorer so teammates can collaborate."
9090 >
91- Diagram File
91+ MDM File
9292 </ Radio >
9393 </ div >
9494 < div className = { radioItemStyles } >
Original file line number Diff line number Diff line change 33 Button ,
44 type ButtonProps ,
55 FileSelector ,
6+ Tooltip ,
67} from '@mongodb-js/compass-components' ;
78
89type ImportDiagramButtonProps = Omit < ButtonProps , 'onClick' > & {
@@ -14,22 +15,31 @@ export const ImportDiagramButton = ({
1415 ...buttonProps
1516} : ImportDiagramButtonProps ) => {
1617 return (
17- < FileSelector
18- id = "import-diagram-file-input"
19- data-testid = "import-diagram-file-input"
20- multiple = { false }
21- accept = ".mdm"
22- onSelect = { ( files ) => {
23- if ( files . length === 0 ) {
24- return ;
25- }
26- onImportDiagram ( files [ 0 ] ) ;
27- } }
28- trigger = { ( { onClick } ) => (
29- < Button { ...buttonProps } onClick = { onClick } >
30- Import diagram
31- </ Button >
32- ) }
33- />
18+ < Tooltip
19+ trigger = {
20+ < span >
21+ < FileSelector
22+ id = "import-diagram-file-input"
23+ data-testid = "import-diagram-file-input"
24+ multiple = { false }
25+ accept = ".mdm"
26+ onSelect = { ( files ) => {
27+ if ( files . length === 0 ) {
28+ return ;
29+ }
30+ onImportDiagram ( files [ 0 ] ) ;
31+ } }
32+ trigger = { ( { onClick } ) => (
33+ < Button { ...buttonProps } onClick = { onClick } >
34+ Import diagram
35+ </ Button >
36+ ) }
37+ />
38+ </ span >
39+ }
40+ >
41+ Only MDM files exported from Compass or Atlas Data Explorer can be
42+ imported.
43+ </ Tooltip >
3444 ) ;
3545} ;
Original file line number Diff line number Diff line change @@ -1460,7 +1460,7 @@ export const DataModelExportButton = 'button[aria-label="Export"]';
14601460export const DataModelExportModal = '[data-testid="export-diagram-modal"]' ;
14611461export const DataModelExportPngOption = `${ DataModelExportModal } input[aria-label="PNG"]` ;
14621462export const DataModelExportJsonOption = `${ DataModelExportModal } input[aria-label="JSON"]` ;
1463- export const DataModelExportDiagramOption = `${ DataModelExportModal } input[aria-label="Diagram File"]` ;
1463+ export const DataModelExportDiagramOption = `${ DataModelExportModal } input[aria-label="MDM File"]` ;
14641464export const DataModelExportModalConfirmButton =
14651465 '[data-testid="export-button"]' ;
14661466export const DataModelsListItem = ( diagramName ?: string ) => {
You can’t perform that action at this time.
0 commit comments