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

Sections: shared component. Scroll implemented #465

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 19 additions & 1 deletion app/layout/scenarios/edit/analysis/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,29 @@ import Pill from 'layout/pill';
import AdjustPanningUnits from 'layout/scenarios/edit/analysis/adjust-planning-units';
import CostSurface from 'layout/scenarios/edit/analysis/cost-surface';
import GapAnalysis from 'layout/scenarios/edit/analysis/gap-analysis';
import Sections from 'layout/scenarios/edit/analysis/sections';
import Run from 'layout/scenarios/edit/run';
import Sections from 'layout/sections';

import Button from 'components/button';
import Modal from 'components/modal';

const SECTIONS = [
{
id: 'gap-analysis',
name: 'Gap analysis',
description: 'A gap analysis calculates how much of each feature is under the existing protected area network and then summarises the representation as a percentage',
},
{
id: 'cost-surface',
name: 'Cost surface',
description: 'Costs reflect any variety of socioeconomic factors, which if minimized, might help the conservation plan be implemented more effectively and reduce conflicts with other uses.',
},
{
id: 'adjust-planning-units',
name: 'Adjust planning units (optional)',
description: 'The status of a planning unit determines whether it is included in every solution (i.e. locked in) or excluded (i.e. locked out). The default status is neither included or excluded but determined during the Marxan analysis.',
},
];
export interface ScenariosSidebarEditAnalysisProps {

}
Expand Down Expand Up @@ -115,6 +132,7 @@ export const ScenariosSidebarEditAnalysis: React.FC<ScenariosSidebarEditAnalysis
{!section && (
<Sections
key="sections"
sections={SECTIONS}
onChangeSection={onChangeSection}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ export const ScenariosCostSurface: React.FC<ScenariosCostSurfaceProps> = ({
</header>

<div className="relative flex flex-col flex-grow w-full min-h-0 mt-1 overflow-hidden text-sm">
<div className="pt-2">
<p className="pt-2">By default all projects have an equal area cost surface which means that planning units with the same area have the same cost</p>

<div className="pt-5">
<h4 className="mb-2">1. Download the current cost surface</h4>
<Button
theme="primary-alt"
Expand Down
50 changes: 0 additions & 50 deletions app/layout/scenarios/edit/analysis/sections/component.tsx

This file was deleted.

29 changes: 24 additions & 5 deletions app/layout/scenarios/show/analysis/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,25 @@ import Pill from 'layout/pill';
import AdjustPanningUnitsShow from 'layout/scenarios/show/analysis/adjust-planning-units';
import CostSurface from 'layout/scenarios/show/analysis/cost-surface';
import GapAnalysis from 'layout/scenarios/show/analysis/gap-analysis';
import Sections from 'layout/scenarios/show/analysis/sections';
import Sections from 'layout/sections';

const SECTIONS = [
{
id: 'gap-analysis',
name: 'Gap analysis',
description: 'A gap analysis calculates how much of each feature is under the existing protected area network and then summarises the representation as a percentage',
},
{
id: 'cost-surface',
name: 'Cost surface',
description: 'Costs reflect any variety of socioeconomic factors, which if minimized, might help the conservation plan be implemented more effectively and reduce conflicts with other uses.',
},
{
id: 'adjust-planning-units',
name: 'Adjust planning units (optional)',
description: 'The status of a planning unit determines whether it is included in every solution (i.e. locked in) or excluded (i.e. locked out). The default status is neither included or excluded but determined during the Marxan analysis.',
},
];

export interface ScenariosSidebarShowAnalysisProps {
}
Expand Down Expand Up @@ -107,10 +125,11 @@ export const ScenariosSidebarShowAnalysis: React.FC<ScenariosSidebarShowAnalysis
</header>

{!section && (
<Sections
key="sections"
onChangeSection={onChangeSection}
/>
<Sections
key="sections"
sections={SECTIONS}
onChangeSection={onChangeSection}
/>
)}

{section === 'gap-analysis' && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export const ScenariosCostSurface: React.FC<ScenariosCostSurfaceProps> = ({
</header>

<div className="relative flex flex-col flex-grow w-full min-h-0 mt-1 overflow-hidden text-sm">
<div className="pt-2">
<p className="pt-2">By default all projects have an equal area cost surface which means that planning units with the same area have the same cost</p>

<div className="pt-5">
<h4 className="mb-2">Download the current cost surface</h4>
<Button
theme="primary-alt"
Expand Down
50 changes: 0 additions & 50 deletions app/layout/scenarios/show/analysis/sections/component.tsx

This file was deleted.

1 change: 0 additions & 1 deletion app/layout/scenarios/show/analysis/sections/index.ts

This file was deleted.

70 changes: 0 additions & 70 deletions app/layout/scenarios/show/analysis/sections/item/component.tsx

This file was deleted.

1 change: 0 additions & 1 deletion app/layout/scenarios/show/analysis/sections/item/index.ts

This file was deleted.

Loading