Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Display featured jobs on Jobs page, above search results #985

Merged
merged 9 commits into from
Jul 13, 2018

Conversation

jjhampton
Copy link
Member

@jjhampton jjhampton commented Jun 2, 2018

Description of changes

Displays 'Featured Jobs' section above Ziprecruiter job search section on /jobs page.

Screenshot w/ mock data:
selection_057

Issue Resolved

MVP requirements for #982

Note - do not merge this yet, as we still need content - the actual 'featured' jobs which will be highlighted at the top of the page. The front-end code is ready for review, I'm currently pulling in data from the static featuredJobs.json file, which only contains mock data for now. This new feature should not go live until we actually have featured jobs to display on the page. They can be loaded from featuredJobs.json or the API & DB (see Back-end PR # 366)

@jjhampton
Copy link
Member Author

jjhampton commented Jun 2, 2018

@ksmacleod99 @hollomancer Please post an update in here or reach out via Slack when the initial content is ready for this.

"source": "GitHub",
"sourceUrl": "https://www.github.com",
"city": "Austin",
"state": "texas",
Copy link
Member

Choose a reason for hiding this comment

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

Texas

Copy link
Member Author

Choose a reason for hiding this comment

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

This JSON file is just mock data for now. Its content will be replaced with actual featured jobs, or the JSON file will discarded completely once the API endpoint is ready.

<div>
<div className={styles.job}>
<div>
<OutboundLink href={sourceUrl} analyticsEventLabel={`[FeaturedJob] ${sourceUrl}`}>
Copy link
Member

Choose a reason for hiding this comment

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

🙌 ty for thinking of analytics

@@ -29,11 +32,39 @@ class Jobs extends Component {
};
tryRunInit();
}

featuredJobs
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to delete this line.

<Section title="Featured Jobs" theme="white">
<div className={styles.featuredJobsContainer}>
<div className={styles.featuredJobs}>
{featuredJobs}
Copy link
Member

Choose a reason for hiding this comment

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

You should do

{FeaturedJobsData.length() > 0 ? featuredJobs : <div>some default content expressed a lack of featured jobs and how to get one featured</div>}

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. We should probably have a contact link somewhere here. It should display whether or not there are any featured jobs exist. Can start off with an email link to @ksmacleod99 for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kylemh As long as we have the contact link (explaining how to get a featured job), we can probably go live with this sooner (without any featured jobs yet). Test out the waters and see if we get anyone contacting us.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. You've got the structure in place for jobs when they come in.

I'd say create the default, see what traffic - if any - we get towards that feature.

Back-end can look at the JSON in this PR as an example to prepare for, and the ticket can be ✅

Copy link
Member Author

@jjhampton jjhampton Jun 3, 2018

Choose a reason for hiding this comment

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

@kylemh I also went ahead and set the three 'mock' Jobs in the JSON file as "status": "inactive", so they won't display on the page. I think back-end PR is actually nearing completion (to serve up API data), but I can leave the mock JSON data in there until then as a guide.

Also cleaned up code in response to code review
@jjhampton
Copy link
Member Author

@kylemh I added a contact link in response to your comment - it will display below featured jobs, or if there are no jobs, it can serve as the placeholder text:

selection_060

This should prevent them from displaying. Also added '(Mock Data)' to their titles to prevent any confusion.
These should be replaced with actual featured jobs when those exist, or this file can be replaced when the API is ready to serve
up real data.
</div>
</div>
<p className={styles.contact}>
Are you hiring? <a href="mailto:[email protected]">Contact</a> us to post your job opening with Operation Code!
Copy link
Member

Choose a reason for hiding this comment

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

Can you use the ExternalLink component here? Then it will be good to go.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed to use the OutboundLink component in latest commit, also updated email contact address (sending them to Kelly since she'll be coordinating this, confirmed usage with her already).

}

.whiteCondensed {
composes: white;
Copy link
Member

Choose a reason for hiding this comment

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

woah - never knew about this! thanks for showing me something new.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, there's a couple other places we've been using composes w/ CSS Modules in the app - it's a nice way of composing multiple classes together to create a new one, so you only need to apply one CSS class to an element instead of multiple ones (which is sometimes seen w/ patterns like BEM).

@jjhampton
Copy link
Member Author

jjhampton commented Jun 3, 2018

@hollomancer @ksmacleod99 Do you two want to go live with this now (without any featured jobs listed yet)? If so, let me know, and I can unblock/merge this. The page will appear like so, with only the contact link:

Update: Not going live yet - awaiting featured jobs content per Slack discussion in #oc-projects.

selection_062

@jjhampton jjhampton force-pushed the 982-highlighted-jobs branch from 715f5ab to cfd6461 Compare July 13, 2018 01:24
@jjhampton jjhampton merged commit 62251d2 into OperationCode:master Jul 13, 2018
@jjhampton
Copy link
Member Author

jjhampton commented Jul 13, 2018

The first set of featured job data has been posted in #982 , and has been added to the static JSON file.

@jjhampton jjhampton deleted the 982-highlighted-jobs branch July 13, 2018 01:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants