-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: more granular Applicant
, Proposal
& Property
types
#40
fix: more granular Applicant
, Proposal
& Property
types
#40
Conversation
Proposal
& Property
typesApplicant
, Proposal
& Property
types
Applicant
, Proposal
& Property
typesApplicant
, Proposal
& Property
types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions, a few comments. Pretty much all can be fixed forward I think if you'd rather 👍
*/ | ||
export interface LondonProperty extends UKProperty { | ||
titleNumber: { | ||
known: 'Yes' | 'No'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is actually probably redundant - it looks like a way that Editors get an optional value for number
.
Could we just have titleNumber?: string
or titleNumber?: { value: string }
to represent this block?
number?: string; | ||
}; | ||
EPC: { | ||
known: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, this could be modelled as -
EPC?: {
value: string;
onlyAppliesToSomeProperties: boolean;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial thinking here was that an optional value
alone loses the distinction between "[I know] The property does not have one" and "No [I don't know if my property has one]" ?
This one is definitely still WIP in the spreadsheet, so going to fix-forward here as needed.
types/schema/data/Proposal.ts
Outdated
@@ -8,12 +9,156 @@ import {DateTime} from '../../utils'; | |||
export interface Proposal { | |||
projectType: ProjectType[]; | |||
description: string; | |||
boundary?: { | |||
site: Record<string, any>; // @todo use GeoJSON from utils here, but ajv tests failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it looks like the plugin doesn't natively support a GeoJSON format which is a shame https://github.com/ajv-validator/ajv-formats
Elsewhere we've used this package to type GeoJSON - https://www.npmjs.com/package/@types/geojson
We could import this and just use this type? It will probably bloat the schema a fair bit but as it's machine-readable only maybe it's not a big issue? (it's would be nice if we could split up the schema files automatically).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, looking at the raw type it's a fair bit simpler than I anticipated - maybe not a bad way to go? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/geojson/index.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tried both of these and got a flurry of build issues, so transferred to an issue instead for now: #41
finish: DateTime; | ||
completion?: DateTime; | ||
}; | ||
retro?: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Just as this is a shorthand key, could we add an @decription
above this line also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't know what it's shorthand for yet, will revisit !
Summary of key changes:
data.applicant
type
interest
ownership
sameAsSiteAddress
as that never applies to an agentdata.property
localAuthorityDistrict
®ion
to outer level rather than inside addresstitleNumber
&EPC
(conditional on region = London)constraints
type (addsPlanningConstraint
enum, but not referencing yet)data.proposal
boundary
with redline infodate
&retro.date
details
catchall (also conditional on region = London, still a lot of questions here but this feels like a decent start)VehicleParking
enumprojectType
enum values with more granularity (i've covered most popular project types, but likely still missing a lot here which will need to eventually be added in-full)Still a few more
?
overall than I'd like, hoping those get tightened up as we work through specific questions here: https://docs.google.com/spreadsheets/d/1sBJ48u_BKg5_i2VjEjGORFxlBJVlXdUyFJpiliZw2-s/edit#gid=0