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: add home type feature to backend and partners #4484

Merged
merged 9 commits into from
Dec 4, 2024
Merged

Conversation

ludtkemorgan
Copy link
Collaborator

@ludtkemorgan ludtkemorgan commented Nov 20, 2024

This PR addresses #4432, #4431

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

Description

Adds the "Home Type" select option to the listing create/edit page as well as connecting HomeType to the listing create endpoint, edit endpoint, and the CSV export.

This is also the first feature using the new feature flag table so some extra logic to utilize it has been added

NOTES:

  • I did not get approval from product/design on the location of this field in Partners. The Detroit location is slightly different because it is within the "Unit Group" section which doesn't exist in core. I will get confirmation on the location before merging of this PR.

How Can This Be Tested/Reviewed?

  • Reseed the database with staging data. This will add the new feature flag to the "Bloomington" jurisdiction
  • Go to partner site and create a new listing
  • Select Bloomington Jurisdiction and add a home type to the listing
  • Save listing and the home type should appear on the listing
  • Edit listing and change the home type. After save it should appear
  • Export the Listing CSV and the "Home Type" column should be there with the new listing's home type in the appropriate location

Other things you can test:

  • Verify the Home Type field doesn't appear on the UI if you have selected a different jurisdiction
  • If no jurisdiction has the home type feature flag turned on the CSV export should not have that column

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

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 1d0179b
🔍 Latest deploy log https://app.netlify.com/sites/partners-bloom-dev/deploys/674e6742ae38470008fcd774
😎 Deploy Preview https://deploy-preview-4484--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 site configuration.

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit 1d0179b
🔍 Latest deploy log https://app.netlify.com/sites/bloom-exygy-dev/deploys/674e6742b4efca00081cc388
😎 Deploy Preview https://deploy-preview-4484--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 site configuration.

@ludtkemorgan ludtkemorgan added the on hold Temporarily paused work label Nov 20, 2024
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@ludtkemorgan ludtkemorgan changed the title fix: add hometype to listing create/update fix: add home type feature to backend and partners Nov 26, 2024
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@ludtkemorgan ludtkemorgan marked this pull request as ready for review November 26, 2024 23:20
@ludtkemorgan ludtkemorgan added 2 reviews needed Requires 2 more review before ready to merge and removed on hold Temporarily paused work labels Nov 26, 2024
Copy link
Collaborator

@YazeedLoonat YazeedLoonat 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! 1 small nit

api/src/services/listing-csv-export.service.ts Outdated Show resolved Hide resolved
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.

Haven't peeked at the code yet, but a few functionality notes!

I think I would expect that between the detail and edit view, that the fields are in the same order - it looks like the new field is in each view above and then below the neighbor fields.
Screenshot 2024-12-02 at 1 31 31 PM
Screenshot 2024-12-02 at 1 31 41 PM

And then when I select a value and save it, it shows as saved on the detail page, but if I reopen the edit page, it doesn't populate with the value.

@emilyjablonski emilyjablonski added needs changes The author must make changes and then re-request review before merging 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 Dec 2, 2024
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@ludtkemorgan
Copy link
Collaborator Author

@emilyjablonski Thanks for the review. Looks like I accidentally introduced the issue where the home type doesn't persist when editing with the useEffect. This has been fixed and you should be able to see the selected home type now.

I'll need to reach out to design about where to place the home type field as it doesn't really make a lot of sense in either of the spots. For now I updated the field to be in the same place for both edit and detail view

image
image

@ludtkemorgan ludtkemorgan removed the needs changes The author must make changes and then re-request review before merging label Dec 3, 2024
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.

LGTM!

@emilyjablonski emilyjablonski 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 Dec 4, 2024
@ludtkemorgan
Copy link
Collaborator Author

I got confirmation from Em that the placement of the field is fine. We can revisit it if any non-detroit jurisdiction ever wants it

@ludtkemorgan ludtkemorgan merged commit 0e3d9c8 into main Dec 4, 2024
20 checks passed
@ludtkemorgan ludtkemorgan deleted the 4432/hometype branch December 4, 2024 14:58
ludtkemorgan added a commit to housingbayarea/bloom that referenced this pull request Jan 14, 2025
* fix: add hometype to listing create/update

* fix: add home type to csv

* fix: update jwt to retrieve feature flags

* fix: partner changes

* fix: have partner be behind feature flag

* fix: backend test fix

* fix: remove comment

* fix: address comments

* fix: review comments
ludtkemorgan added a commit to housingbayarea/bloom that referenced this pull request Jan 15, 2025
… (#830)

* fix: add hometype to listing create/update

* fix: add home type to csv

* fix: update jwt to retrieve feature flags

* fix: partner changes

* fix: have partner be behind feature flag

* fix: backend test fix

* fix: remove comment

* fix: address comments

* fix: review comments
ludtkemorgan added a commit to metrotranscom/doorway that referenced this pull request Jan 21, 2025
* fix: add hometype to listing create/update

* fix: add home type to csv

* fix: update jwt to retrieve feature flags

* fix: partner changes

* fix: have partner be behind feature flag

* fix: backend test fix

* fix: remove comment

* fix: address comments

* fix: review comments
ludtkemorgan added a commit to metrotranscom/doorway that referenced this pull request Feb 10, 2025
* fix: add hometype to listing create/update

* fix: add home type to csv

* fix: update jwt to retrieve feature flags

* fix: partner changes

* fix: have partner be behind feature flag

* fix: backend test fix

* fix: remove comment

* fix: address comments

* fix: review comments
ludtkemorgan added a commit to metrotranscom/doorway that referenced this pull request Feb 10, 2025
* fix: add hometype to listing create/update

* fix: add home type to csv

* fix: update jwt to retrieve feature flags

* fix: partner changes

* fix: have partner be behind feature flag

* fix: backend test fix

* fix: remove comment

* fix: address comments

* fix: review comments
ludtkemorgan added a commit to metrotranscom/doorway that referenced this pull request Feb 13, 2025
* fix: add hometype to listing create/update

* fix: add home type to csv

* fix: update jwt to retrieve feature flags

* fix: partner changes

* fix: have partner be behind feature flag

* fix: backend test fix

* fix: remove comment

* fix: address comments

* fix: review comments
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