Skip to content

Commit d968feb

Browse files
committed
OpenConceptLab/ocl_issues#2190 | Closing dialog on map | fixing score on top header | max width of target
1 parent 3a9e61a commit d968feb

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/components/concepts/ConceptHeader.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const ConceptHeader = ({concept, repo, onClose, repoURL, onEdit, nested, loading
6969
onMap &&
7070
<MapButton
7171
simple
72-
onClick={(event, applied, mapType) => onMap(event, concept, !applied, mapType)}
72+
onClick={(event, applied, mapType) => onMap(event, concept, !applied, mapType, true)}
7373
isMapped={isSelectedForMap(concept)}
7474
sx={{marginLeft: '8px'}}
7575
/>

src/components/map-projects/MapProject.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ const MapProject = () => {
776776
setSearchStr('')
777777
}
778778

779-
const onMap = (event, concept, unmap=false, mapType='SAME-AS') => {
779+
const onMap = (event, concept, unmap=false, mapType='SAME-AS', closeConcept=false) => {
780780
event.preventDefault()
781781
event.stopPropagation()
782782
_onMap(concept, unmap)
@@ -792,6 +792,8 @@ const MapProject = () => {
792792
setTimeout(() => highlightTexts([concept], null, false), 100)
793793
}
794794
updateMatchTypeCounts(null, prev)
795+
if(closeConcept)
796+
setShowItem(false)
795797
return prev
796798
})
797799
return false
@@ -954,7 +956,10 @@ const MapProject = () => {
954956

955957
const isConfigureInSplitView = configure && file?.name
956958
const columnsForTable = getColumnsForTable()
957-
const targetConcept = mapSelected[rowIndex] ? getConcept(mapSelected[rowIndex]) : false
959+
let targetConcept = mapSelected[rowIndex] ? getConcept(mapSelected[rowIndex]) : false
960+
const targetConceptFromCandidate = find(otherMatchedConcepts[rowIndex]?.results, {url: targetConcept?.url})
961+
if(targetConceptFromCandidate)
962+
targetConcept.search_meta = targetConceptFromCandidate.search_meta
958963

959964
return (
960965
<div className='col-xs-12 padding-0' style={{borderRadius: '10px', width: 'calc(100vw - 32px)'}}>

src/components/map-projects/MappingDecisionResult.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const MappingDecisionResult = ({targetConcept, row, rowIndex, mapTypes, allMapTy
1313
return (
1414
<div className='col-xs-12 padding-0' style={{display: 'flex', margin: '8px 0'}}>
1515
<Typography component='div' sx={{display: 'inline-block', color: 'surface.dark', fontWeight: 600, marginRight: '24px', fontSize: '14px'}}>Mapping</Typography>
16-
<div>
16+
<div style={{maxWidth: '40%'}}>
1717
<Typography component='span' sx={{color: 'rgba(0, 0, 0, 0.6)', fontSize: '12px'}}>Source Code</Typography>
1818
<div className='col-xs-12 padding-0'>
1919
<ListItemText
@@ -41,7 +41,7 @@ const MappingDecisionResult = ({targetConcept, row, rowIndex, mapTypes, allMapTy
4141
<Typography component='div' sx={{color: 'rgba(0, 0, 0, 0.6)', fontSize: '12px'}}>Relationship</Typography>
4242
<MapButton options={allMapTypes} selected={mapTypes[rowIndex]} onClick={(event, applied, mapType) => onMap(event, targetConcept, !applied, mapType)} isMapped sx={{marginTop: '6px'}} />
4343
</div>
44-
<div style={{marginLeft: '24px'}}>
44+
<div style={{marginLeft: '24px', maxWidth: '40%'}}>
4545
<Typography component='span' sx={{color: 'rgba(0, 0, 0, 0.6)', fontSize: '12px'}}>Target Code</Typography>
4646
<div className='col-xs-12 padding-0'>
4747
<ListItemText

0 commit comments

Comments
 (0)