StaffCoder
TypeScript
Vanilla TypeScriptTypeScript 7.0
6 modules · 24 challengesSign up
Module 4 · Rendering & DOM Construction

Job Listing Board

easy—No data yet

Problem statement

A job listing board that renders inside a single container on the page. A set of pure renderer functions and one mount helper must together turn an array of jobs into a titled panel — building nodes with plain DOM APIs, never querying the document, never appending anywhere, and always replacing the container's contents so it holds exactly one child, using Vanilla TypeScript and standard DOM APIs.

Demo

The page, styles, sample job data, #app container, and bootstrap wiring are already scaffolded and wired. Only the four modules in src/js/ — renderRow.ts, renderList.ts, renderPanel.ts, and mount.ts — are missing. Implement them so every test passes. Do not edit any other file.

What to implement

  • Show a titled "Open Positions" panel that lists every open job on the page.
  • Show each job's title, company, and location on its own row, in the same order the jobs were given.
  • Show a "No jobs available" message when the list is empty, instead of an empty panel.
  • Show the panel by replacing whatever was in the container before — the page never ends up with two panels stacked on top of each other.
  • Leave the list of jobs you were given unchanged.
  • Everything shown must come from the input — nothing should be hardcoded.

More in Rendering & DOM Construction

See the module
Notifications Feed Implement renderFeed and the four state renderers. renderFeed dispatches on a discriminated FeedState union (loading | empty | error | list), swaps the container's single child, and wires an onRetry callback into the error state that fires exactly once per click. Switching between states must leave no residue from the previous state.—No data yeteasyCourse Review CommentsImplement renderComment + renderCommentList and the splitLines, truncate, isSafeUrl helpers. Review text is rendered via textContent only so a raw <script> never becomes an element; links are built from a separate url field and only when the scheme is http(s); long text truncates at 240 chars with an expand control that reveals the full body on click.—No data yeteasyRecipe List Page Implement pure helpers (parseFilters, applyFilters, formatCount) plus renderCard and renderResults. The filter form combines a title search, difficulty select, and max-time cap under AND semantics; submits re-render only the results panel while the form retains submitted values; no-match renders a single empty-state node; cards are built by cloning a <template>.0%0 of 1 solvedeasy

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.