-
Notifications
You must be signed in to change notification settings - Fork 1
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
1337/homepage coming soon #1370
Conversation
✅ Deploy Preview for detroit-public-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-storybook-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-partners-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Colin & I paired, and the next step is to reach out to Jesse for some unresolved questions about some pieces of the UX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
))} | ||
</HorizontalScrollSection> | ||
{comingSoonListings?.items?.length > 0 && ( | ||
<div className={styles["section-container"]}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love the shared class!
sites/public/pages/index.tsx
Outdated
@@ -75,12 +74,23 @@ export default function Home({ latestListings }) { | |||
href={`/listings/filtered?page=1${encodeToFrontendFilterString({ | |||
region: props.region[1], | |||
})}`} | |||
style={{ backgroundImage: `url(${regionImageUrls.get(props.region[1])})` }} | |||
// style={{ backgroundImage: `url(${regionImageUrls.get(props.region[1])})` }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A great UX improvement for the homepage 👋 🪗
Issue
Closes #1337
Description
This PR adds the 'Coming Soon' section to Detroit's public homepage. This section is designed to show three listings that are marked as coming soon and having the closest opening date appear first. It also includes a 'See All Coming Soon' button that takes the user to the filtered page. This button is visible even when there are 3 or less listings marked as Coming Soon to encourage the user to go to the listings page and potentially explore other filters.
Update: This PR also refactors the Regions section to no longer use the Horizontal Scroll component and rather follow a similar pattern that the Coming Soon section does. NOTE: in order to have the region images scale dynamically while remaining the same relative size, I used the aspect-ratio which is a newer css property. From my testing and their documentation, it is supported on every browser expect for Internet Explorer. On the off chance that a user has an outdated browser that doesn't support this property, the only difference is that the region images would be slightly taller overall and could show gently different heights in certain mid-sized screen sizes. These differences would be difficult to notice and the homepage remains presentable either way.
How Can This Be Tested/Reviewed?
This can be tested and reviewed by going to the Detroit Public homepage viewing the section in different screen dimensions. Then click the See All Coming Soon button and verify that you land on the listings page with the Coming Soon filter set to true. Additionally, go the partner's side and vary the amount of public listings marked as Coming Soon and their publishing dates to see the affect on the home page.
Checklist:
yarn generate:client
and/or created a migration if I made backend changes that require themReviewer Notes:
Steps to review a PR:
On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.