Skip to content

Commit

Permalink
better layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed May 31, 2024
1 parent 024537b commit d0bb72d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const baseSchema: PlanningConstraintsBaseSchema = {
active: true,
neg: "is not, or is not within, a Listed Building",
pos: "is, or is within, a Listed Building",
"digital-land-datasets": ["listed-building-outline"], // LPAs publish polygons, HE publishes points
"digital-land-datasets": ["listed-building", "listed-building-outline"], // HE published points, LPAs publish polygons
category: "Heritage and conservation",
},
locallyListed: {
Expand Down
26 changes: 20 additions & 6 deletions editor.planx.uk/src/@planx/components/PlanningConstraints/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ function ConstraintListItem({ children, ...props }: ConstraintListItemProps) {
{props.value
? `${
props.metadata?.plural || "Entities"
} that intersect with your site:`
} that intersect with your property:`
: `We did not find any ${
props.metadata?.plural?.toLowerCase() || "entities"
} that apply to your site.`}
} that apply to your property.`}
</Typography>
{props.value && (
<List>
Expand All @@ -213,6 +213,20 @@ function ConstraintListItem({ children, ...props }: ConstraintListItemProps) {
))}
</List>
)}
{props.metadata?.plural !== "Classified roads" && (
<Typography variant="body2" my={2}>
{`See ${props.metadata?.plural?.toLowerCase()} ${
props.value ? `at this property` : ``
} on the `}
<Link
href={`https://www.planning.data.gov.uk/map/?dataset=${props.metadata?.dataset}#${latitude},${longitude},17.5z`}
target="_blank"
>
Planning Data map
</Link>
{` (opens in a new tab).`}
</Typography>
)}
{props.metadata?.text && props.metadata.text !== emptyContent && (
<Typography variant="body2" component="div">
<HelpButton
Expand All @@ -233,15 +247,15 @@ function ConstraintListItem({ children, ...props }: ConstraintListItemProps) {
)}
<MoreInfo open={open} handleClose={() => setOpen(false)}>
<MoreInfoSection title="Source">
<Typography variant="body2" mb={2}>
{props.key === "road.classified" ? (
<Typography variant="body2">
{props.metadata?.plural === "Classified roads" ? (
`Ordnance Survey MasterMap Highways`
) : (
<Link
href={`https://www.planning.data.gov.uk/map/?dataset=${props.metadata?.dataset}#${latitude},${longitude},17.5z`}
href={`https://www.planning.data.gov.uk/`}
target="_blank"
>
Planning Data map
Planning Data
</Link>
)}
</Typography>
Expand Down

0 comments on commit d0bb72d

Please sign in to comment.