Skip to content

Commit

Permalink
Feedbacks | repo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Nov 12, 2024
1 parent 396e6d4 commit 99cd635
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/components/mappings/ToConceptCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const ToConceptCard = ({ mapping }) => {
}}
/>
</div>

</Paper>
)
}
Expand Down
17 changes: 13 additions & 4 deletions src/components/repos/RepoHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ const RepoHome = () => {
}

React.useEffect(() => {
if(toParentURI(location.pathname) === (repo?.version_url || repo.url)) {
if(location.pathname.includes('/concepts/'))
setTab('concepts')
if(location.pathname.includes('/mappings/'))
setTab('mappings')
}
fetchRepo()
fetchVersions()
}, [location.pathname])
Expand Down Expand Up @@ -116,7 +122,7 @@ const RepoHome = () => {
(repo?.id || loading) &&
<React.Fragment>
<RepoHeader owner={owner} repo={repo} versions={versions} onVersionChange={onVersionChange} onCreateConceptClick={onCreateConceptClick} onCloseConceptForm={() => setConceptForm(false)} />
<div className='padding-0 col-xs-12' style={{width: 'calc(100% - 272px)'}}>
<div className='padding-0 col-xs-12' style={{width: isSplitView ? '100%' : 'calc(100% - 272px)'}}>
<CommonTabs TABS={TABS} value={tab} onChange={onTabChange} />
{
repo?.id && ['concepts', 'mappings'].includes(tab) &&
Expand All @@ -139,9 +145,12 @@ const RepoHome = () => {
<RepoOverview repo={repo} height='calc(100vh - 300px)' />
}
</div>
<Paper component="div" className='col-xs-12' sx={{backgroundColor: 'surface.main', boxShadow: 'none', padding: '16px', borderLeft: 'solid 0.5px', borderTop: 'solid 0.5px', borderColor: 'surface.nv80', width: '272px !important', height: 'calc(100vh - 250px)', borderRadius: '0 0 10px 0'}}>
<RepoSummary repo={repo} summary={repoSummary} />
</Paper>
{
!isSplitView &&
<Paper component="div" className='col-xs-12' sx={{backgroundColor: 'surface.main', boxShadow: 'none', padding: '16px', borderLeft: 'solid 0.5px', borderTop: 'solid 0.5px', borderColor: 'surface.nv80', width: '272px !important', height: 'calc(100vh - 250px)', borderRadius: '0 0 10px 0'}}>
<RepoSummary repo={repo} summary={repoSummary} />
</Paper>
}
</React.Fragment>
}
{
Expand Down
22 changes: 11 additions & 11 deletions src/components/repos/RepoSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ const RepoSummary = ({ repo, summary }) => {
</ListItem>
<ListItem sx={{padding: '4px 0', fontSize: '12px'}}>
<ListItemIcon sx={{minWidth: '20px', marginRight: '8px', justifyContent: 'center'}}>
<ConceptClassIcon fontSize='small' color='secondary' />
<LanguageIcon fontSize='small' color='secondary' style={{fontSize: '1rem'}} />
</ListItemIcon>
<ListItemText
primary={
conceptClasses === false ?
locales === false ?
<SkeletonText /> :
<>{`${conceptClasses?.toLocaleString()} ${t('concept.concept_classes')}`}</>
<>{`${locales?.toLocaleString()} ${t('repo.locales')}`}</>
}
sx={{
'.MuiListItemText-primary': {fontSize: '12px', color: 'secondary.main'}
Expand All @@ -138,13 +138,13 @@ const RepoSummary = ({ repo, summary }) => {
</ListItem>
<ListItem sx={{padding: '4px 0', fontSize: '12px'}}>
<ListItemIcon sx={{minWidth: '20px', marginRight: '8px', justifyContent: 'center'}}>
<ConceptIcon selected fontSize='small' color='secondary' sx={{width: '14px', height: '14px'}} />
<ConceptClassIcon fontSize='small' color='secondary' />
</ListItemIcon>
<ListItemText
primary={
datatypes === false ?
conceptClasses === false ?
<SkeletonText /> :
<>{`${datatypes?.toLocaleString()} ${t('concept.datatypes')}`}</>
<>{`${conceptClasses?.toLocaleString()} ${t('concept.concept_classes')}`}</>
}
sx={{
'.MuiListItemText-primary': {fontSize: '12px', color: 'secondary.main'}
Expand All @@ -157,9 +157,9 @@ const RepoSummary = ({ repo, summary }) => {
</ListItemIcon>
<ListItemText
primary={
nameTypes === false ?
datatypes === false ?
<SkeletonText /> :
<>{`${nameTypes?.toLocaleString()} ${t('concept.name_types')}`}</>
<>{`${datatypes?.toLocaleString()} ${t('concept.datatypes')}`}</>
}
sx={{
'.MuiListItemText-primary': {fontSize: '12px', color: 'secondary.main'}
Expand All @@ -168,13 +168,13 @@ const RepoSummary = ({ repo, summary }) => {
</ListItem>
<ListItem sx={{padding: '4px 0', fontSize: '12px'}}>
<ListItemIcon sx={{minWidth: '20px', marginRight: '8px', justifyContent: 'center'}}>
<LanguageIcon fontSize='small' color='secondary' style={{fontSize: '1rem'}} />
<ConceptIcon selected fontSize='small' color='secondary' sx={{width: '14px', height: '14px'}} />
</ListItemIcon>
<ListItemText
primary={
locales === false ?
nameTypes === false ?
<SkeletonText /> :
<>{`${locales?.toLocaleString()} ${t('repo.locales')}`}</>
<>{`${nameTypes?.toLocaleString()} ${t('concept.name_types')}`}</>
}
sx={{
'.MuiListItemText-primary': {fontSize: '12px', color: 'secondary.main'}
Expand Down

0 comments on commit 99cd635

Please sign in to comment.