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

feat: send BOPS enhanced constraints data and update PlanningConstraint breadcrumb shape #1827

Merged
merged 7 commits into from
Jun 30, 2023

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Jun 22, 2023

Relies on theopensystemslab/planx-core#46

Planning constraints breadcrumb data before:

  • fn: [...intersectingPassportValues]
  • _nots: { fn: [...nonIntersectingPassportValues] }
  • digitalLandRequest: https://planning.data.gov.uk... - never used afaik, just available as reference

After:

  • fn: [...intersectingPassportValues]
  • _nots: { fn: [...nonIntersectingPassportValues] }
    • I think we should be able to get rid of this, but it's heavily entwined in upcomingCardIds() still and I was about to easily lose an afternoon untangling. So I'll pick it up in another PR as it's no longer used to format what we send to BOPS (see planx-core change), but only referenced internally for automations
  • _constraints: [{...gisResponse}, {...roadsResponse}]
    • This is the new record of everything checked plus it's metadata and urls to re-fetch via the source or planx APIs. This does not know about what the PlanningConstraint component's prop.fn was set to, but I don't think that matters for BOPS or other end consumers?

Testing with BOPS:

  • I'll generate and share a test payload with BOPS devs that:
  • We'll wait to for feedback and if approved, retire old contraints format for the new proposed one

Internal testing:

@github-actions
Copy link

github-actions bot commented Jun 22, 2023

Removed vultr server and associated DNS entries

@github-actions
Copy link

github-actions bot commented Jun 22, 2023

Lighthouse

buckinhamshire/FOIYNPP testing/canary
performance 0.24 - 0.25 = -0.01 0.38 - 0.33 = 0.05
accessibility 1 - 1 = 0.00 1 - 1 = 0.00
best-practices 0.92 - 1 = -0.08 0.83 - 0.83 = 0.00
seo 0.88 - 0.89 = -0.01 0.89 - 0.92 = -0.03
pwa 0.7 - 0.7 = 0.00 0.7 - 0.7 = 0.00

@jessicamcinchak
Copy link
Member Author

@jessicamcinchak jessicamcinchak marked this pull request as ready for review June 22, 2023 12:51
@jessicamcinchak jessicamcinchak requested a review from a team June 22, 2023 12:51
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small question!

(useStore(
(state) => state.computePassport().data?._address
) as SiteAddress) || {};
const showGraphError = !x && !y && !longitude && !latitude;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We show the graph error if all of these are missing - should it be if any of them are missing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair question - I think you're right that || makes more sense than && here even though these fields are all required on our minimum address type. Either case should still only happen when: 1) planning constraints isn't positioned after find property, or 2) there's been an error in OS source data 👌

@jessicamcinchak jessicamcinchak merged commit 5d2f964 into main Jun 30, 2023
11 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/proposed-constraints-for-bops branch June 30, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants