Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/project-time-travel #2329

Merged
merged 34 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e6895c1
feat: dummy data + utility for time travel feature
mohitb35 Dec 6, 2024
59eb993
temp: enables time travel in archive page with hardcoded esri data
mohitb35 Dec 10, 2024
6a7c463
chore: installs @maplibre/maplibre-gl-compare
mohitb35 Dec 10, 2024
2128657
temp: adds TimeTravel functionality (wip version)
mohitb35 Dec 10, 2024
570cfc7
feat: integrate tabs to toggle between available map modes
mohitb35 Dec 16, 2024
53c33b7
refactor: move icons and TimeTravelDropdown from temp directory
mohitb35 Dec 17, 2024
b6dd818
feat: adds source/year selection for TimeTravel
mohitb35 Dec 17, 2024
89bc536
Merge branch 'develop' into feature/project-time-travel
mohitb35 Jan 2, 2025
5206872
refactor: cleanup imports for icons
mohitb35 Jan 2, 2025
f36ccf7
feat: optimize TimeTravel mounting and display logic
mohitb35 Jan 2, 2025
4350519
refactor: remove unused state and parameters from SingleProjectView a…
mohitb35 Jan 2, 2025
664fc10
Merge branch 'develop' into feature/project-time-travel
mohitb35 Jan 6, 2025
6361355
feat: allows zoom controls to be visible above time travel
mohitb35 Jan 6, 2025
50c7d45
feat: pass selectedTab prop to SingleProjectView for conditional rend…
mohitb35 Jan 6, 2025
af2731b
Merge branch 'develop' into feature/project-time-travel
mohitb35 Jan 20, 2025
49d4d98
fix: update incorrect icon imports
mohitb35 Jan 20, 2025
553d5fb
feat: fetches and caches esri wayback data for project time travel co…
mohitb35 Jan 21, 2025
7437985
feat: update logic to display satellite toggle
mohitb35 Jan 21, 2025
55512c1
feat: add intervention dropdown visibility logic for project details …
mohitb35 Jan 21, 2025
c77426d
fix: makes time travel dropdown text translatable
mohitb35 Jan 22, 2025
115aab6
fix: adjusts styles for time travel dropdown
mohitb35 Jan 22, 2025
6ab716c
fix: moves swiper position to 75% from top
mohitb35 Jan 22, 2025
026c844
feat: loads time travel tab/component if data sources available
mohitb35 Jan 23, 2025
57b1872
fix: prevent time travel view from showing on mobile devices
mohitb35 Jan 23, 2025
d5bd72f
fix: update Map import to `MaplibreMap` for consistency
mohitb35 Jan 23, 2025
05af2c7
fix: add type annotation for SOURCE_LABELS in TimeTravelDropdown
mohitb35 Jan 23, 2025
816df46
refactor: breaks up loadLayers function in TimeTravel component
mohitb35 Jan 23, 2025
b3a25dd
refactor: extract map initialization logic into a separate function
mohitb35 Jan 23, 2025
8843cc3
fix: validate project point geometry before fetching time travel data
mohitb35 Jan 27, 2025
84f1c83
feat: improve accessibility in TimeTravelDropdown
mohitb35 Jan 27, 2025
4581874
chore: mark changes related to old time travel feature for future rem…
mohitb35 Jan 27, 2025
ce33663
Merge branch 'develop' into feature/project-time-travel
mohitb35 Jan 28, 2025
de2cab6
Merge branch 'develop' into feature/project-time-travel
mohitb35 Jan 30, 2025
a47a2f0
chore: increase cache duration for project time travel data to 30 days
mohitb35 Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: pass selectedTab prop to SingleProjectView for conditional rend…
…ering

- plant locations not shown if selected tab is not field data
mohitb35 committed Jan 6, 2025
commit 50c7d457527887a4bc51eece4f57971fc7fd6b7c
6 changes: 4 additions & 2 deletions src/features/projectsV2/ProjectsMap/SingleProjectView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { MapRef } from '../../common/types/projectv2';
import type { SelectedTab } from './ProjectMapTabs';

import { useEffect, useMemo } from 'react';
import { useRouter } from 'next/router';
@@ -14,9 +15,10 @@ import ProjectLocation from './microComponents/ProjectLocation';

interface Props {
mapRef: MapRef;
selectedTab: SelectedTab | null;
}

const SingleProjectView = ({ mapRef }: Props) => {
const SingleProjectView = ({ mapRef, selectedTab }: Props) => {
const { singleProject, selectedSite, selectedPlantLocation, plantLocations } =
useProjects();
if (singleProject === null) return null;
@@ -114,7 +116,7 @@ const SingleProjectView = ({ mapRef }: Props) => {
</>
)}

<PlantLocations />
{selectedTab === 'field' && <PlantLocations />}
</>
);
};
1 change: 1 addition & 0 deletions src/features/projectsV2/ProjectsMap/index.tsx
Original file line number Diff line number Diff line change
@@ -206,6 +206,7 @@ function ProjectsMap(props: ProjectsMapProps) {

const singleProjectViewProps = {
mapRef,
selectedTab,
};
const multipleProjectsViewProps = {
mapRef,
Loading