Automattic / Automattic/WP-Job-Manager
Add Job Data block for showing metadata about a job listing
- Dominant language
- PHP
- Stars
- 899
- Forks
- 369
- Avg merge
- 11h 37m
- Merged PRs (30d)
- 12
Description
The _Job Data_ meta box should be converted to a block.
## Job Data Block
Block in its unselected, empty state:

Once selected, additional block settings become visible in the inspector area:

With the job data filled out and the settings configured, the block would look like this at smaller resolutions:

At larger resolutions, the location and posting date move up to be beside the job type(s):

### Company Website
There is no separate field for adding a company website. For an existing job listing that has a value for company website, the company name field renders as a link that goes to the company site when clicked. For a new job listing, the user can simply link the company name to their site.
### Company Video
For an existing job listing that contains a company video, the video should appear below the rest of the metadata:

For a new job listing, or for an existing job listing that does not have a company video, no video placeholder is shown. If the user wishes to add a video, they can use Gutenberg's core video block.
## Additional Requirements
When Gutenberg is enabled:
- All text fields need to be able to save formatted text as per the toolbar options (i.e. **bold**, _italic_, ~~strikethrough~~ and [links](url)).
- Selecting a job type from the sidebar automatically updates the editor to show that type.
- The timestamp is a dynamic value and only appears once the job listing has been saved.
- When the block is in an _unselected_ state and there is a value entered for the company Twitter account, the field renders as a link, where the URL is `https://twitter.com/`.
- The _Job Data_ block is added to the editor automatically for a job listing, and it appears as the first item in the editor (i.e. it should appear before any existing post content).
- It should be possible to move the block to another location in the editor.
- _Job Types_ and _Job Categories_ appear in the _Document_ settings of the sidebar.
- The _Job Data_ meta box is removed.
- The _Job Data_ block should only be available for the _Job Listings_ custom post type.
- It should not be possible to add more than one _Job Data_ block to a _Job Listings_ custom post type.
Contributor guide
Research direction
Start by locating the existing Job Data meta box and the Job Listings custom post type, then review how Gutenberg blocks and Document settings are integrated. Compare the current metadata, editor insertion behavior, and custom post type restrictions with the requirements; done means the block replaces the meta box and satisfies the listed display, editing, placement, and uniqueness behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, content, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100