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

fix: region and variable naming update #1304

Merged
merged 11 commits into from
Jun 7, 2022
Merged

fix: region and variable naming update #1304

merged 11 commits into from
Jun 7, 2022

Conversation

ColinBuyck
Copy link
Collaborator

@ColinBuyck ColinBuyck commented Jun 2, 2022

Issue

This issue involved changing 'Downtown' to 'Greater Downtown', and removing 'Midtown' from the site. Since the naming and region options were directly linked with the search params, I decided to make these adjustments in the variable names and backend files so that it could maintain the approach to search and filtering it had before.

This can be tested in three main areas. On the Detroit public site, verify that the region cards on the home page do not show "Midtown" and show "Greater Downtown". Then, navigate to the list of rentals and open the filtering drawer. In the dropdown for region you should see the two adjustments mentioned above.

Lastly, navigate to the partner's portal and begin creating a new listing. From there, you should see the updated region information in the dropdown.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have assigned reviewers
  • I have run yarn generate:client and/or created a migration if I made backend changes that require them
  • I have exported any new pieces added to ui-components
  • My commit message(s) is/are polished, and any breaking changes are indicated in the message and are well-described
  • Commits made across packages purposefully have the same commit message/version change, else are separated into different commits

Reviewer Notes:

Steps to review a PR:

  • Read and understand the issue
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Also review the acceptance criteria on the Netlify deploy preview (noting that these do not yet include any backend changes made in the PR)
  • Either explicitly ask a clarifying question, request changes, or approve the PR if there are small remaining changes but the PR is otherwise good to go

On Merge:

If you have one commit and message, squash. If you need each message to be applied, rebase and merge.

@netlify
Copy link

netlify bot commented Jun 2, 2022

Deploy Preview for detroit-partners-dev ready!

Name Link
🔨 Latest commit 6efa15e
🔍 Latest deploy log https://app.netlify.com/sites/detroit-partners-dev/deploys/629f8c23e7282b0009b8d196
😎 Deploy Preview https://deploy-preview-1304--detroit-partners-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 site settings.

@netlify
Copy link

netlify bot commented Jun 2, 2022

Deploy Preview for detroit-public-dev ready!

Name Link
🔨 Latest commit 6efa15e
🔍 Latest deploy log https://app.netlify.com/sites/detroit-public-dev/deploys/629f8c23a8b9ae00083d7eeb
😎 Deploy Preview https://deploy-preview-1304--detroit-public-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 site settings.

@emilyjablonski
Copy link
Collaborator

@ColinBuyck Sorry I think I just gave you merge conflicts here 😅

@ColinBuyck
Copy link
Collaborator Author

ColinBuyck commented Jun 3, 2022

@emilyjablonski They should be resolved now! Only thing I am still wondering is about the backend changes made to reflect the new wording. I figured it would be helpful to ensure consistency across the app rather than have conditionals to change 'Greater Downtown' to 'Downtown' for values, but unsure if there would be unintended consequences.

Copy link
Collaborator

@emilyjablonski emilyjablonski left a comment

Choose a reason for hiding this comment

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

Need an update to the migration file - lmk if you have any questions!

@@ -21,9 +21,9 @@ export class addPropertyRegion1649062179928 implements MigrationInterface {
{ name: "Farwell area", region: Region.Eastside },
{ name: "Gratiot Town/Kettering area", region: Region.Eastside },
{ name: "Gratiot/7 Mile area", region: Region.Eastside },
{ name: "Greater Corktown area", region: Region.Downtown },
Copy link
Collaborator

@emilyjablonski emilyjablonski Jun 6, 2022

Choose a reason for hiding this comment

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

Making an update to an existing migration is a flow we can't use. It will work locally on a db:reseed because this runs every single migration from the first, but once this gets to dev/production where we have an existing db, all the migration files are not run, just any new ones. You can test this locally by reseeding on dev, and then on this branch just running yarn db:migration:run to test what would happen in our environments. I'd suggest keeping the update to the region-enum and then running yarn db:migration:generate -n 'region-rename' and the backend will auto-generate a new migration file for you based on whatever changes were made. Sometimes doing this results in some extra db queries we don't always need, so some things may need to be removed other than altering the enum.

@netlify
Copy link

netlify bot commented Jun 7, 2022

Deploy Preview for detroit-storybook-dev ready!

Name Link
🔨 Latest commit 6efa15e
🔍 Latest deploy log https://app.netlify.com/sites/detroit-storybook-dev/deploys/629f8c23acf0a00008174aae
😎 Deploy Preview https://deploy-preview-1304--detroit-storybook-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 site settings.

Copy link
Collaborator

@seanmalbert seanmalbert left a comment

Choose a reason for hiding this comment

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

looks good!

@seanmalbert seanmalbert merged commit 5d7e2fa into dev Jun 7, 2022
@seanmalbert seanmalbert deleted the 1296/region-update branch June 7, 2022 19:06
seanmalbert pushed a commit that referenced this pull request Jun 23, 2022
* fix: region and variable naming update

* fix: updated related tests

* fix: mantain full set of neighborhoods

* fix: new migration file

* fix: migration for existing Downtown data

* fix: remove region typing from seed

* fix: update script to pass unit tests

* fix: contain all migration fixes to new file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detroit - Update Regions
4 participants