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: optionally hide preferences from listing page #1280

Merged
merged 3 commits into from
May 28, 2021

Conversation

emilyjablonski
Copy link
Collaborator

@emilyjablonski emilyjablonski commented May 28, 2021

Pull Request Template

Issue

No issue, came out of Coliseum QA

Description

Coliseum has requested that the OHA and HOPWA preferences not show on the Listing page, even though they'll show in the preferences section of the application. So, yet another optional flag :/ Meep moop. Hoping we can wrap up all these changes into a new section more relevant to how these "preferences" actually work soon.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Prototype/POC (not to merge)
  • This change is a refactor/address technical debt
  • This change requires a documentation update
  • This change requires a SQL Script

How Can This Be Tested/Reviewed?

Import Coliseum, look at the listing page's preferences section, you should only see Live/Work.

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 updated the changelog to include a description of my changes

@netlify
Copy link

netlify bot commented May 28, 2021

✔️ Deploy Preview for clever-edison-cd22c1 ready!

🔨 Explore the source changes: 31d02be

🔍 Inspect the deploy log: https://app.netlify.com/sites/clever-edison-cd22c1/deploys/60b114bbd7eee00007ad2b09

😎 Browse the preview: https://deploy-preview-1280--clever-edison-cd22c1.netlify.app

Comment on lines +21 to +24
const filteredPreferences = props.preferences.filter(
(pref) => !pref.formMetadata?.hideFromListing
)
const preferences = filteredPreferences.map((preference: Preference, index: number) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not opposed to not chaining, since it can be harder to read, so just a suggestion:

const preferences = props.preferences
    .filter((preference: Preference) => !preference.formMetadata?.hideFromListing)
    .map((preference: Preference, index: number) => {}

@emilyjablonski emilyjablonski merged commit c7128b5 into master May 28, 2021
@emilyjablonski emilyjablonski deleted the feat/optionally-hide-prefs branch May 28, 2021 16:30
willrlin referenced this pull request in CityOfDetroit/bloom Jun 9, 2021
willrlin referenced this pull request in CityOfDetroit/bloom Jun 9, 2021
YazeedLoonat pushed a commit to YazeedLoonat/bloom that referenced this pull request May 31, 2022
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