Requires an N:M mapping. A rare case of 1:2.

This mapping has 1 all-to-all group: every node on one side corresponds to every node on the other, and none is deleted or inserted. Each member carries an all N:M badge; selecting one highlights all of its counterparts, in the tree and in the code view alike.

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–19 unchanged (19 lines)
20import { useSelector } from 'react-redux';
21import { t } from '@apache-superset/core';
22import {
23 SupersetClient,
24 getClientErrorObject,
25 SupersetError,
26} from '@superset-ui/core';
27import { styled, useTheme, css, Alert } from '@apache-superset/core/ui';
28
29import {
30 Icons,
31 Button,
32 Checkbox,
…lines 33–169 unchanged (137 lines)
170 }),
171 ),
172 owners: datasource.owners.map(
173 (o: Record<string, number>) => o.value || o.id,
174 ),
175 };
176 // Handle catalog based on database's allow_multi_catalog setting
177 // If multi-catalog is disabled, don't include catalog in payload
178 // The backend will use the default catalog
179 // If multi-catalog is enabled, include the selected catalog
180 if (datasource.database?.allow_multi_catalog) {
181 payload.catalog = datasource.catalog;
182 }
…lines 183–352 unchanged (170 lines)
353 }
354 tooltip={
355 currentDatasource.is_managed_externally
356 ? t(
357 "This dataset is managed externally, and can't be edited in Superset",
358 )
359 : ''
360 }
361 >
362 {t('Save')}
363 </Button>
364 </>
365 }
…lines 366–392 unchanged (27 lines)

After

…lines 1–19 unchanged (19 lines)
20import { useSelector } from 'react-redux';
21import { t } from '@apache-superset/core';
22import {
23 SupersetClient,
24 getClientErrorObject,
25 SupersetError,
26 isFeatureEnabled,
27 FeatureFlag,
28} from '@superset-ui/core';
29import { styled, useTheme, css, Alert } from '@apache-superset/core/ui';
30
31import {
32 Icons,
33 Button,
…lines 34–171 unchanged (138 lines)
172 }),
173 ),
174 owners: datasource.owners.map(
175 (o: Record<string, number>) => o.value || o.id,
176 ),
177 };
178 // Add folders if DATASET_FOLDERS feature is enabled
179 if (isFeatureEnabled(FeatureFlag.DatasetFolders) && datasource.folders) {
180 payload.folders = datasource.folders;
181 }
182 // Handle catalog based on database's allow_multi_catalog setting
183 // If multi-catalog is disabled, don't include catalog in payload
184 // The backend will use the default catalog
185 // If multi-catalog is enabled, include the selected catalog
186 if (datasource.database?.allow_multi_catalog) {
187 payload.catalog = datasource.catalog;
…lines 188–358 unchanged (171 lines)
359 }
360 tooltip={
361 currentDatasource.is_managed_externally
362 ? t(
363 "This dataset is managed externally, and can't be edited in Superset",
364 )
365 : errors.length > 0
366 ? errors.join('\n')
367 : ''
368 }
369 >
370 {t('Save')}
371 </Button>
372 </>
373 }
…lines 374–400 unchanged (27 lines)

Before

program
comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
import_statement (+23 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "useSelector"
} "}"
from "from"
string
' "'"
string_fragment "react-redux"
' "'"
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "t"
} "}"
from "from"
string
' "'"
string_fragment "@apache-superset/core"
' "'"
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "SupersetClient"
, ","
import_specifier
identifier "getClientErrorObject"
, ","
import_specifier
identifier "SupersetError"
, ","
} "}"
from "from"
string
' "'"
string_fragment "@superset-ui/core"
' "'"
; ";"
import_statement (+23 nodes collapsed)
import_statement (+27 nodes collapsed)
import_statement
import "import"
import_clause
identifier "withToasts"
from "from"
string
' "'"
string_fragment "src/components/MessageToasts/withToasts"
' "'"
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "ErrorMessageWithStackTrace"
} "}"
from "from"
string
' "'"
string_fragment "src/components"
' "'"
; ";"
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "DatasetObject"
} "}"
from "from"
string
' "'"
string_fragment "src/features/datasets/types"
' "'"
; ";"
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "DatasourceModalProps"
} "}"
from "from"
string
' "'"
string_fragment "../types"
' "'"
; ";"
lexical_declaration (+27 nodes collapsed)
lexical_declaration (+38 nodes collapsed)
function_declaration (+112 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "DatasourceModal"
type_annotation
: ":"
generic_type
type_identifier "FunctionComponent"
type_arguments
< "<"
type_identifier "DatasourceModalProps"
> ">"
= "="
arrow_function
formal_parameters
( "("
required_parameter
object_pattern
{ "{"
shorthand_property_identifier_pattern "addSuccessToast"
, ","
shorthand_property_identifier_pattern "datasource"
, ","
shorthand_property_identifier_pattern "onDatasourceSave"
, ","
shorthand_property_identifier_pattern "onHide"
, ","
shorthand_property_identifier_pattern "show"
, ","
} "}"
) ")"
=> "=>"
statement_block
{ "{"
lexical_declaration
const "const"
variable_declarator
identifier "theme"
= "="
call_expression
identifier "useTheme"
arguments
( "("
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "currentDatasource"
, ","
identifier "setCurrentDatasource"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
identifier "datasource"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "syncColumns"
, ","
identifier "setSyncColumns"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+52 nodes collapsed)
lexical_declaration (+27 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "isSaving"
, ","
identifier "setIsSaving"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+22 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "modal"
, ","
identifier "contextHolder"
] "]"
= "="
call_expression
member_expression
identifier "Modal"
. "."
property_identifier "useModal"
arguments
( "("
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "confirmModalOpen"
, ","
identifier "setConfirmModalOpen"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "buildPayload"
= "="
arrow_function
formal_parameters
( "("
required_parameter
identifier "datasource"
type_annotation
: ":"
generic_type
type_identifier "Record"
type_arguments
< "<"
predefined_type
string "string"
, ","
predefined_type
any "any"
> ">"
) ")"
=> "=>"
statement_block
{ "{"
lexical_declaration (+623 nodes collapsed)
comment "// Handle catalog based on database's allow_multi_catalog se"...
comment "// If multi-catalog is disabled, don't include catalog in pa"...
comment "// The backend will use the default catalog"
comment "// If multi-catalog is enabled, include the selected catalog"
if_statement (+28 nodes collapsed)
return_statement
return "return"
identifier "payload"
; ";"
} "}"
; ";"
lexical_declaration (+371 nodes collapsed)
lexical_declaration (+118 nodes collapsed)
lexical_declaration (+308 nodes collapsed)
expression_statement (+54 nodes collapsed)
lexical_declaration (+22 nodes collapsed)
lexical_declaration (+22 nodes collapsed)
lexical_declaration (+26 nodes collapsed)
return_statement
return "return"
parenthesized_expression
( "("
jsx_element
jsx_opening_element
< "<"
identifier "StyledDatasourceModal"
jsx_attribute
property_identifier "show"
= "="
jsx_expression
{ "{"
identifier "show"
} "}"
jsx_attribute
property_identifier "onHide"
= "="
jsx_expression
{ "{"
identifier "onHide"
} "}"
jsx_attribute (+87 nodes collapsed)
jsx_attribute
property_identifier "maskClosable"
= "="
jsx_expression
{ "{"
unary_expression
! "!"
identifier "isEditing"
} "}"
jsx_attribute
property_identifier "footer"
= "="
jsx_expression
{ "{"
jsx_element
jsx_opening_element
< "<"
> ">"
jsx_element (+49 nodes collapsed)
jsx_element
jsx_opening_element
< "<"
identifier "Button"
jsx_attribute
property_identifier "buttonSize"
= "="
string
" "\""
string_fragment "small"
" "\""
jsx_attribute
property_identifier "buttonStyle"
= "="
string
" "\""
string_fragment "primary"
" "\""
jsx_attribute
property_identifier "data-test"
= "="
string
" "\""
string_fragment "datasource-modal-save"
" "\""
jsx_attribute
property_identifier "onClick"
= "="
jsx_expression
{ "{"
identifier "onClickSave"
} "}"
jsx_attribute (+22 nodes collapsed)
jsx_attribute
property_identifier "tooltip"
= "="
jsx_expression
{ "{"
ternary_expression
member_expression
identifier "currentDatasource"
. "."
property_identifier "is_managed_externally"
? "?"
call_expression
identifier "t"
arguments
( "("
string
" "\""
string_fragment "This dataset is managed externally, and can't be edited in S"...
" "\""
, ","
) ")"
: ":" all 1:2
string
' "'"
' "'"
} "}"
> ">"
jsx_expression
{ "{"
call_expression
identifier "t"
arguments
( "("
string
' "'"
string_fragment "Save"
' "'"
) ")"
} "}"
jsx_closing_element
</ "</"
identifier "Button"
> ">"
jsx_closing_element
</ "</"
> ">"
} "}"
jsx_attribute
property_identifier "responsive"
> ">"
jsx_self_closing_element (+41 nodes collapsed)
jsx_expression
{ "{"
identifier "contextHolder"
} "}"
jsx_element (+75 nodes collapsed)
jsx_closing_element
</ "</"
identifier "StyledDatasourceModal"
> ">"
) ")"
; ";"
} "}"
; ";"
export_statement
export "export"
default "default"
call_expression
identifier "withToasts"
arguments
( "("
identifier "DatasourceModal"
) ")"
; ";"

After

program
comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
import_statement (+23 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "useSelector"
} "}"
from "from"
string
' "'"
string_fragment "react-redux"
' "'"
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "t"
} "}"
from "from"
string
' "'"
string_fragment "@apache-superset/core"
' "'"
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "SupersetClient"
, ","
import_specifier
identifier "getClientErrorObject"
, ","
import_specifier
identifier "SupersetError"
, ","
import_specifier
identifier "isFeatureEnabled"
, ","
import_specifier
identifier "FeatureFlag"
, ","
} "}"
from "from"
string
' "'"
string_fragment "@superset-ui/core"
' "'"
; ";"
import_statement (+23 nodes collapsed)
import_statement (+27 nodes collapsed)
import_statement
import "import"
import_clause
identifier "withToasts"
from "from"
string
' "'"
string_fragment "src/components/MessageToasts/withToasts"
' "'"
; ";"
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "ErrorMessageWithStackTrace"
} "}"
from "from"
string
' "'"
string_fragment "src/components"
' "'"
; ";"
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "DatasetObject"
} "}"
from "from"
string
' "'"
string_fragment "src/features/datasets/types"
' "'"
; ";"
import_statement
import "import"
type "type"
import_clause
named_imports
{ "{"
import_specifier
identifier "DatasourceModalProps"
} "}"
from "from"
string
' "'"
string_fragment "../types"
' "'"
; ";"
lexical_declaration (+27 nodes collapsed)
lexical_declaration (+38 nodes collapsed)
function_declaration (+112 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
identifier "DatasourceModal"
type_annotation
: ":"
generic_type
type_identifier "FunctionComponent"
type_arguments
< "<"
type_identifier "DatasourceModalProps"
> ">"
= "="
arrow_function
formal_parameters
( "("
required_parameter
object_pattern
{ "{"
shorthand_property_identifier_pattern "addSuccessToast"
, ","
shorthand_property_identifier_pattern "datasource"
, ","
shorthand_property_identifier_pattern "onDatasourceSave"
, ","
shorthand_property_identifier_pattern "onHide"
, ","
shorthand_property_identifier_pattern "show"
, ","
} "}"
) ")"
=> "=>"
statement_block
{ "{"
lexical_declaration
const "const"
variable_declarator
identifier "theme"
= "="
call_expression
identifier "useTheme"
arguments
( "("
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "currentDatasource"
, ","
identifier "setCurrentDatasource"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
identifier "datasource"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "syncColumns"
, ","
identifier "setSyncColumns"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+52 nodes collapsed)
lexical_declaration (+27 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "isSaving"
, ","
identifier "setIsSaving"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration (+22 nodes collapsed)
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "modal"
, ","
identifier "contextHolder"
] "]"
= "="
call_expression
member_expression
identifier "Modal"
. "."
property_identifier "useModal"
arguments
( "("
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
array_pattern
[ "["
identifier "confirmModalOpen"
, ","
identifier "setConfirmModalOpen"
] "]"
= "="
call_expression
identifier "useState"
arguments
( "("
false "false"
) ")"
; ";"
lexical_declaration
const "const"
variable_declarator
identifier "buildPayload"
= "="
arrow_function
formal_parameters
( "("
required_parameter
identifier "datasource"
type_annotation
: ":"
generic_type
type_identifier "Record"
type_arguments
< "<"
predefined_type
string "string"
, ","
predefined_type
any "any"
> ">"
) ")"
=> "=>"
statement_block
{ "{"
lexical_declaration (+623 nodes collapsed)
comment "// Add folders if DATASET_FOLDERS feature is enabled"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
call_expression
identifier "isFeatureEnabled"
arguments
( "("
member_expression
identifier "FeatureFlag"
. "."
property_identifier "DatasetFolders"
) ")"
&& "&&"
member_expression
identifier "datasource"
. "."
property_identifier "folders"
) ")"
statement_block
{ "{"
expression_statement
assignment_expression
member_expression
identifier "payload"
. "."
property_identifier "folders"
= "="
member_expression
identifier "datasource"
. "."
property_identifier "folders"
; ";"
} "}"
comment "// Handle catalog based on database's allow_multi_catalog se"...
comment "// If multi-catalog is disabled, don't include catalog in pa"...
comment "// The backend will use the default catalog"
comment "// If multi-catalog is enabled, include the selected catalog"
if_statement (+28 nodes collapsed)
return_statement
return "return"
identifier "payload"
; ";"
} "}"
; ";"
lexical_declaration (+371 nodes collapsed)
lexical_declaration (+118 nodes collapsed)
lexical_declaration (+308 nodes collapsed)
expression_statement (+54 nodes collapsed)
lexical_declaration (+22 nodes collapsed)
lexical_declaration (+22 nodes collapsed)
lexical_declaration (+26 nodes collapsed)
return_statement
return "return"
parenthesized_expression
( "("
jsx_element
jsx_opening_element
< "<"
identifier "StyledDatasourceModal"
jsx_attribute
property_identifier "show"
= "="
jsx_expression
{ "{"
identifier "show"
} "}"
jsx_attribute
property_identifier "onHide"
= "="
jsx_expression
{ "{"
identifier "onHide"
} "}"
jsx_attribute (+87 nodes collapsed)
jsx_attribute
property_identifier "maskClosable"
= "="
jsx_expression
{ "{"
unary_expression
! "!"
identifier "isEditing"
} "}"
jsx_attribute
property_identifier "footer"
= "="
jsx_expression
{ "{"
jsx_element
jsx_opening_element
< "<"
> ">"
jsx_element (+49 nodes collapsed)
jsx_element
jsx_opening_element
< "<"
identifier "Button"
jsx_attribute
property_identifier "buttonSize"
= "="
string
" "\""
string_fragment "small"
" "\""
jsx_attribute
property_identifier "buttonStyle"
= "="
string
" "\""
string_fragment "primary"
" "\""
jsx_attribute
property_identifier "data-test"
= "="
string
" "\""
string_fragment "datasource-modal-save"
" "\""
jsx_attribute
property_identifier "onClick"
= "="
jsx_expression
{ "{"
identifier "onClickSave"
} "}"
jsx_attribute (+22 nodes collapsed)
jsx_attribute
property_identifier "tooltip"
= "="
jsx_expression
{ "{"
ternary_expression
member_expression
identifier "currentDatasource"
. "."
property_identifier "is_managed_externally"
? "?"
call_expression
identifier "t"
arguments
( "("
string
" "\""
string_fragment "This dataset is managed externally, and can't be edited in S"...
" "\""
, ","
) ")"
: ":" all 1:2
ternary_expression
binary_expression
member_expression
identifier "errors"
. "."
property_identifier "length"
> ">"
number "0"
? "?"
call_expression
member_expression
identifier "errors"
. "."
property_identifier "join"
arguments
( "("
string
' "'"
escape_sequence "\\n"
' "'"
) ")"
: ":" all 1:2
string
' "'"
' "'"
} "}"
> ">"
jsx_expression
{ "{"
call_expression
identifier "t"
arguments
( "("
string
' "'"
string_fragment "Save"
' "'"
) ")"
} "}"
jsx_closing_element
</ "</"
identifier "Button"
> ">"
jsx_closing_element
</ "</"
> ">"
} "}"
jsx_attribute
property_identifier "responsive"
> ">"
jsx_self_closing_element (+41 nodes collapsed)
jsx_expression
{ "{"
identifier "contextHolder"
} "}"
jsx_element (+75 nodes collapsed)
jsx_closing_element
</ "</"
identifier "StyledDatasourceModal"
> ">"
) ")"
; ";"
} "}"
; ";"
export_statement
export "export"
default "default"
call_expression
identifier "withToasts"
arguments
( "("
identifier "DatasourceModal"
) ")"
; ";"