Skip to content

feat: preselect jurisdiction#5582

Merged
emilyjablonski merged 17 commits into
mainfrom
preselect-jurisdiction
Nov 25, 2025
Merged

feat: preselect jurisdiction#5582
emilyjablonski merged 17 commits into
mainfrom
preselect-jurisdiction

Conversation

@emilyjablonski

@emilyjablonski emilyjablonski commented Nov 17, 2025

Copy link
Copy Markdown
Collaborator

This PR addresses #2142 #3182

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

Requires pre-selecting a jurisdiction in a dialog before being able to visit the add listing page if you have access to multiple jurisdictions.

How Can This Be Tested/Reviewed?

  • A user with access to multiple jurisdictions should be prompted by the modal before being able to visit the add listing page
  • A user with access to one jurisdiction should not be prompted by the modal
  • A user should not be able to visit listings/add directly - it must have a jurisdiction id parameter, and should redirect to the home page

Jurisdiction selection dialog:
Screenshot 2025-11-24 at 10 44 19 AM


A new read-only section was added at the top of the edit page that mirrors a section that already exists at the top of the view page - "Listing data". The jurisdiction does not appear at all if a user only has access to one jurisdiction.
One jurisdiction:
Screenshot 2025-11-17 at 10 58 16 PM
Multiple jurisdictions:
Screenshot 2025-11-17 at 10 58 37 PM

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@netlify

netlify Bot commented Nov 17, 2025

Copy link
Copy Markdown

Deploy Preview for bloom-angelopolis canceled.

Name Link
🔨 Latest commit 0cc6a3a
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/6925d66ada499d000807759c

@netlify

netlify Bot commented Nov 17, 2025

Copy link
Copy Markdown

Deploy Preview for bloom-flagly canceled.

Name Link
🔨 Latest commit 0cc6a3a
🔍 Latest deploy log https://app.netlify.com/projects/bloom-flagly/deploys/6925d66a657387000714233d

@netlify

netlify Bot commented Nov 17, 2025

Copy link
Copy Markdown

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 0cc6a3a
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/6925d66a1f7f4d0008b3b5cd
😎 Deploy Preview https://deploy-preview-5582--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 18, 2025

Copy link
Copy Markdown

Deploy Preview for bloom-lakeview ready!

Name Link
🔨 Latest commit 0076262
🔍 Latest deploy log https://app.netlify.com/projects/bloom-lakeview/deploys/6925cc3d5f24480008eabfe1
😎 Deploy Preview https://deploy-preview-5582--bloom-lakeview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 18, 2025

Copy link
Copy Markdown

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit 0076262
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/6925cc3d59d41e000830ada8
😎 Deploy Preview https://deploy-preview-5582--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 18, 2025

Copy link
Copy Markdown

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit 0076262
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/6925cc3d82f6230008dd1985
😎 Deploy Preview https://deploy-preview-5582--bloom-public-seeds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@emilyjablonski emilyjablonski marked this pull request as ready for review November 18, 2025 06:43

@ludtkemorgan ludtkemorgan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Love this change! And I hope that we can go forward with this as it will save us a lot of headaches. Especially around some of the feature flags we have setup for Detroit.

I do think we need to talk to the Doorway team before we could proceed with this though. Their setup is to have 1 jurisdiction per county in the system but every jurisdiction has essentially the same settings. So for example if we turn on a feature flag for one jurisdiction we will be turning it on for all of them. It is less important in that setup to pre-select the jurisdiction and I know on a couple of occasions they have switched the jurisdiction after creating it. Either because they accidentally selected the wrong county or they wanted to create it before the new county existed. That second case shouldn't happen again unless they expand to more counties which I don't anticipate them doing. We'll just want to touch base with them to see if that limitation would cause any issues.

Comment thread sites/partners/src/pages/index.tsx Outdated

@mcgarrye mcgarrye left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Love this so much. Was not able to review all of the code changes but did test the functionality locally and it looks great!
My wonder for the future would be roll out. This cannot be feature flagged as it is cross jurisdictional. Would we just roll it out all at once or would we need an env var?

@emilyjablonski

Copy link
Copy Markdown
Collaborator Author

Okidokie this is ready for review! Has been run past Sarah, Kathy for Doorway, and Em. We would just roll this out everywhere and not feature flag as that could get gnarly. And the modal now has copy that the jurisdiction cannot be changed later.

@emilyjablonski emilyjablonski added the 2 reviews needed Requires 2 more review before ready to merge label Nov 24, 2025

@YazeedLoonat YazeedLoonat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@YazeedLoonat YazeedLoonat added 1 review needed Requires 1 more review before ready to merge and removed 2 reviews needed Requires 2 more review before ready to merge labels Nov 24, 2025

@ludtkemorgan ludtkemorgan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Just minor comments/questions

Comment thread sites/partners/src/pages/listings/[id]/edit.tsx Outdated
Comment thread sites/partners/src/pages/index.tsx Outdated
Comment thread sites/partners/src/pages/index.tsx
@ludtkemorgan ludtkemorgan added ready to merge Should be applied when a PR has been reviewed and approved and removed 1 review needed Requires 1 more review before ready to merge labels Nov 24, 2025
@ludtkemorgan

ludtkemorgan commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

@emilyjablonski I forgot to add one more comment. There is a scenario that I don't know how we should handle but I don't know how much weight we should put on it:

  1. Go to the add listing page. Notice the jurisdiction id
  2. Change the id in the URL
  3. The page loads and you are able to enter everything in the fields. Notice the Intro section doesn't mention anything about the jurisdiction even if you have access to more than one jurisdiction.
  4. Try to submit, this is when the failure happens and there is no recovery from this.

I don't anticipate this happening, but there is a small chance that somebody might accidentally edit the url and not realize it. The same issue happens if you have a jurisdiction id in the url that is for a jurisdiction you don't have access to. This one I'm even less concerned by.

One option is to throw up a warning or send them to the listings page if the jurisdiction does not load

@emilyjablonski

Copy link
Copy Markdown
Collaborator Author

@ludtkemorgan Made the updates, and added a check in case the jurisdiction doesn't exist in the user's profile, that will redirect back to the home page to mirror the check if the query doesn't exist

@emilyjablonski emilyjablonski merged commit f05249d into main Nov 25, 2025
34 checks passed
@emilyjablonski emilyjablonski deleted the preselect-jurisdiction branch November 25, 2025 16:35
ludtkemorgan pushed a commit to metrotranscom/doorway that referenced this pull request Dec 1, 2025
ludtkemorgan pushed a commit to metrotranscom/doorway that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Should be applied when a PR has been reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants