HTMX Puppeteer — HTMX

HTMX puppet theater: 20 levels writing hx-get, hx-swap, hx-target, hx-trigger and hx-swap-oob in an iframe sandbox with real HTMX 2.x and a mock server.

What the levels ask

  1. Mrs. Romlah calls the health post queue from the Ward Post's board. The Panggil antrean button (call the queue) has to ask Mrs. Tatik's window for the next number, and the reply card has to land in the antrean slot (the queue), not anywhere else.
  2. The neighbourhood head opens the Ward Fund page from the board's menu. Right now the whole ward post site reloads every time a link is tapped. Make that menu fetch its pages through htmx, so the title, the contents and the address change without a reload, and the back button still works.
  3. Bagas signs up for the Sunday morning clean-up. The form has to send his name to the window (not just ask), and the sign-up list the window replies with has to show in the pendaftar list (the sign-ups), while the form stays for whoever signs up next.
  4. Mr. Tono presses Cek saldo kas (check the kas balance). The ledger is at the treasurer's house, so the answer takes a while. While the runner is still on the road, the lampu (the lamp) has to shine, and go out again as soon as the balance arrives.
  5. Mrs. Sari searches the menu in the Cari menu field (search the menu). The results have to come when she stops typing, one request for one word, and nothing sent again if the word did not change.
  6. Mr. Harun scrolls the ward's cash book. The book scrolls inside its own box. When the Muat lagi button (load more) comes into view at the end of the box, the next three entries have to be added at the bottom, the old ones stay, and the next page is fetched only once.
  7. Mrs. Yanti crosses out Mr. Tono's entry that was written twice. Every Coret button (cross out) already carries its own address. Set up the table body so every button asks first, and then only its own row goes, whichever row the button is in.
  8. The name of Neighbourhood 02's head on the board is no longer right. When the neighbourhood head taps the ketua name card (the head of the neighbourhood), the card has to turn into the form for changing the name from the window, one form only, and tapping its field must not call up a new form.
  9. The neighbourhood head writes the new name of Neighbourhood 02's head. That form has to save the name to the window with the method that is meant for updating, and then turn back into the name card.
  10. The neighbourhood head made a typo and presses Batal (cancel). The whole form has to turn back into the name card as the window has it saved, not as it was just typed.
  11. Grandma Marni signs up for the elderly health post with a cut-off phone number. The window replies 422 with a form holding the message. That message has to show in the form, the right number after it has to be signed up, and the error page when the window's machine breaks must not cover the form.
  12. Rara drops out of the jalan sehat. Her button already took her row away. The window's reply carries the sign-ups' count card, and that card has to fly to the jumlah slot (the count) above the list, not to the row that was taken away. Write on the card where it goes.

And more, 20 levels in all.