From fb0006a534c1b77bb752aa8e878387a0ab69e358 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Mon, 2 Nov 2026 11:04:27 +0530 Subject: [PATCH 1/4] OpenConceptLab/ocl_issues#2985 | Project breadcrumb uses OwnerButton and the design system's breadcrumb pieces --- .../map-projects/MapProjectBreadcrumb.jsx | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/src/components/map-projects/MapProjectBreadcrumb.jsx b/src/components/map-projects/MapProjectBreadcrumb.jsx index 532928a..0f09996 100644 --- a/src/components/map-projects/MapProjectBreadcrumb.jsx +++ b/src/components/map-projects/MapProjectBreadcrumb.jsx @@ -1,20 +1,43 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import Link from '@mui/material/Link'; -import ChevronRightIcon from '@mui/icons-material/ChevronRight'; +import Button from '@mui/material/Button'; +import OwnerButton from '../common/OwnerButton'; +import DotSeparator from '../common/DotSeparator'; import { hasTermBrowser, toV3URL } from '../../common/utils'; import { projectCrumbs } from '../../common/breadcrumb'; +const LABEL_SX = { + maxWidth: '125px', + overflow: 'hidden', + textOverflow: 'ellipsis', + fontSize: '14px', + whiteSpace: 'nowrap', +} + const MapProjectBreadcrumb = ({ ownerType, owner }) => { const { t } = useTranslation() if(!ownerType || !owner) return null - const [ownerCrumb, projectsCrumb] = projectCrumbs(`/${ownerType}/${owner}/`, hasTermBrowser(), toV3URL) + const ownerPath = `/${ownerType}/${owner}/` + const [ownerCrumb, projectsCrumb] = projectCrumbs(ownerPath, hasTermBrowser(), toV3URL) return ( - - {ownerCrumb.href ? {owner} : {owner}} - - {t('map_project.mapping_projects')} + + + + ) } From 05c66ef544e78f7dbadc9f7515939c1fa84a3364 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Mon, 2 Nov 2026 11:14:21 +0530 Subject: [PATCH 2/4] OpenConceptLab/ocl_issues#2985 | Owner is plain, tooltip-free text when no TermBrowser is configured --- src/components/map-projects/MapProjectBreadcrumb.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/map-projects/MapProjectBreadcrumb.jsx b/src/components/map-projects/MapProjectBreadcrumb.jsx index 0f09996..0f8a07c 100644 --- a/src/components/map-projects/MapProjectBreadcrumb.jsx +++ b/src/components/map-projects/MapProjectBreadcrumb.jsx @@ -26,9 +26,11 @@ const MapProjectBreadcrumb = ({ ownerType, owner }) => { ownerType={ownerType} owner={owner} ownerURL={ownerCrumb.href ? ownerPath : undefined} + {...(ownerCrumb.href ? {} : {noTooltip: true, component: 'span', disableRipple: true})} sx={{ '.owner-button-label': LABEL_SX, '.MuiButton-startIcon': {fontSize: '18px'}, + ...(ownerCrumb.href ? {} : {cursor: 'default'}), }} /> From 451afa45c0c1ac11bf69b57078f5103706705c4f Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Mon, 2 Nov 2026 11:19:59 +0530 Subject: [PATCH 3/4] OpenConceptLab/ocl_issues#2985 | Owner without a TermBrowser is plain text, not a button --- .../map-projects/MapProjectBreadcrumb.jsx | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/components/map-projects/MapProjectBreadcrumb.jsx b/src/components/map-projects/MapProjectBreadcrumb.jsx index 0f8a07c..2bdc8ce 100644 --- a/src/components/map-projects/MapProjectBreadcrumb.jsx +++ b/src/components/map-projects/MapProjectBreadcrumb.jsx @@ -2,6 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import Button from '@mui/material/Button'; import OwnerButton from '../common/OwnerButton'; +import OwnerIcon from '../common/OwnerIcon'; import DotSeparator from '../common/DotSeparator'; import { hasTermBrowser, toV3URL } from '../../common/utils'; import { projectCrumbs } from '../../common/breadcrumb'; @@ -22,17 +23,22 @@ const MapProjectBreadcrumb = ({ ownerType, owner }) => { const [ownerCrumb, projectsCrumb] = projectCrumbs(ownerPath, hasTermBrowser(), toV3URL) return ( - + { + ownerCrumb.href ? + : + + + {owner} + + }