From 66ed8a62c139db9fc3c09d591a239f6a8d97bc7b Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Thu, 25 Jan 2024 14:11:30 +0545 Subject: [PATCH 1/4] Remove `Footer` & `Organization Banner` in `Live Monitoring` - Related to #6219 --- frontend/src/components/footer/index.js | 1 + frontend/src/views/projectLiveMonitoring.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/frontend/src/components/footer/index.js b/frontend/src/components/footer/index.js index b38155e802..e0da9ddb06 100644 --- a/frontend/src/components/footer/index.js +++ b/frontend/src/components/footer/index.js @@ -38,6 +38,7 @@ export function Footer() { 'projects/:id/tasks', 'projects/:id/map', 'projects/:id/validate', + 'projects/:id/live', 'manage/organisations/new/', 'manage/teams/new', 'manage/campaigns/new', diff --git a/frontend/src/views/projectLiveMonitoring.js b/frontend/src/views/projectLiveMonitoring.js index e0e7d588c8..a111c299c5 100644 --- a/frontend/src/views/projectLiveMonitoring.js +++ b/frontend/src/views/projectLiveMonitoring.js @@ -10,6 +10,7 @@ import { UnderpassValidationStats, } from '@hotosm/underpass-ui'; import { Link } from 'react-router-dom'; +import { useDispatch } from 'react-redux'; import { ProjectVisibilityBox } from '../components/projectDetail/visibilityBox'; import { ProjectStatusBox } from '../components/projectDetail/statusBox'; @@ -89,6 +90,7 @@ const mappingTypesFeatureTypes = { export function ProjectLiveMonitoring() { const { id } = useParams(); + const dispatch = useDispatch(); const [coords, setCoords] = useState([0, 0]); const [activeFeature, setActiveFeature] = useState(null); const [tags, setTags] = useState('building'); @@ -170,6 +172,14 @@ export function ProjectLiveMonitoring() { } }, [project]); + // set organization bar visibility to false + useEffect(() => { + dispatch({ type: 'SET_VISIBILITY', isVisible: false }); + return () => { + dispatch({ type: 'SET_VISIBILITY', isVisible: true }); + }; + }, [dispatch]); + const hottheme = HOTTheme(); const defaultMapStyle = { From c1a294f0ee1ace2a6f7db1fd410862a4951f2d35 Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Thu, 25 Jan 2024 14:12:30 +0545 Subject: [PATCH 2/4] Adjust `Live Monitoring` view to fit screen view - Related to #6219 --- frontend/src/views/projectLiveMonitoring.css | 4 ++-- frontend/src/views/projectLiveMonitoring.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/projectLiveMonitoring.css b/frontend/src/views/projectLiveMonitoring.css index 1767519aab..96a48c9add 100644 --- a/frontend/src/views/projectLiveMonitoring.css +++ b/frontend/src/views/projectLiveMonitoring.css @@ -1,7 +1,7 @@ -@import "@hotosm/underpass-ui/dist/index.css"; +@import '@hotosm/underpass-ui/dist/index.css'; .maplibregl-map { - height: 100vh; + height: calc(100vh - 6.05rem); } .top { diff --git a/frontend/src/views/projectLiveMonitoring.js b/frontend/src/views/projectLiveMonitoring.js index a111c299c5..d76a91d4fb 100644 --- a/frontend/src/views/projectLiveMonitoring.js +++ b/frontend/src/views/projectLiveMonitoring.js @@ -226,7 +226,7 @@ export function ProjectLiveMonitoring() { ready={!error && !loading} className="pr3" > -
+
@@ -365,7 +365,7 @@ export function ProjectLiveMonitoring() { style={{ display: 'flex', flexFlow: 'column', - height: '100px', + maxHeight: 'calc(100vh - 26rem)', flex: '1 1 auto', }} tags={tags} From 9c5e4f151642e2f608999a07975e2f14cbca9a0d Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Mon, 29 Jan 2024 15:32:15 +0545 Subject: [PATCH 3/4] Fix `Live Monitoring` design issues - Related to #6219 --- frontend/src/views/projectLiveMonitoring.css | 22 ++++++++++++++++++-- frontend/src/views/projectLiveMonitoring.js | 18 +++++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/frontend/src/views/projectLiveMonitoring.css b/frontend/src/views/projectLiveMonitoring.css index 96a48c9add..d5d8915313 100644 --- a/frontend/src/views/projectLiveMonitoring.css +++ b/frontend/src/views/projectLiveMonitoring.css @@ -6,8 +6,8 @@ .top { position: absolute; - top: 150px; - left: 20px; + top: 0.625rem; + left: 0.625rem; z-index: 999; } @@ -17,3 +17,21 @@ svg.pl2 { width: 19px !important; margin-left: 0px; } + +.react-select__control { + border-radius: 0.25rem !important; + min-height: 36px !important; + width: 15.8rem; +} + +.react-select__menu { + width: 15.8rem !important; +} + +.title-text { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} diff --git a/frontend/src/views/projectLiveMonitoring.js b/frontend/src/views/projectLiveMonitoring.js index d76a91d4fb..188ef00a4e 100644 --- a/frontend/src/views/projectLiveMonitoring.js +++ b/frontend/src/views/projectLiveMonitoring.js @@ -227,16 +227,17 @@ export function ProjectLiveMonitoring() { className="pr3" >
-
-
+
+