feat(request): marker request flow page + Request entry point #1

Open
rukira wants to merge 1 commit from feat/G-16 into main
Owner

Summary

Implements Linear G-16 "Marker Request Flow" in a single commit (5ce56a2):

  • Floating "+ Request" button on index.html (bottom-right, above the Leaflet zoom control), labelled from config/ui.json, opening the new request page in a new tab.
  • New request page request/index.html + js/request.js: calibrate-style world/layer dropdowns, click-to-place live-preview pin + popup card, full marker form (name, owner, description, icLocation, oocLocation; 6-icon picker; colour swatches + validated hex input; live char counters), collapsed JSON preview, step instructions, and a validation-gated "Request" CTA.
  • "Request" opens a modal with the generated markers.json entry in a fenced json block, a prominent copy button, and a Discord hint (configurable user, default "Velvie") via new flat strings keys in config/ui.json.
  • js/request.js keeps all DOM/Leaflet access inside init() and exports pure helpers (slugify, isValidColour, buildMarkerEntry, buildSnippet) so it stays Node-importable; js/config.js exports ICON_NAMES/COLOUR_RE, js/markers.js exports the popup renderer.
  • Theme-consistent styles in css/style.css (CSS vars from ui.json only) and docs updated (docs/development.md, docs/configuration.md).

How to review

Riskiest first:

  1. request/index.html — subfolder page; every asset/config path depends on <base href="../">.
  2. js/request.js — new module; check the live-preview/validation flow and the boot error path (no user-facing error banner yet, R1-F2).
  3. js/ui.js — #request-btn wiring/label; [hidden] is ineffective until configs load (R1-F1, cosmetic).
  4. config/ui.json — new flat string keys under strings (incl. requestSteps, requestDiscordUser, requestDiscordInstructions).
  5. css/style.css — button offset above the bottom-right zoom bar; modal/panel styles use theme vars only.

How to verify

  • Quality-gate was skipped this run (phases.quality-gate = skipped, no QA command) — no automated QA suite ran.
  • Spec-audit cycle round 1: PASS, 8/8 acceptance criteria (C-R1-F1..F8) incl. node --check js/*.js, config JSON validity + new ui.json keys, node .plan/G-16/verify-request-core.mjs, structural greps, and an HTTP smoke test (13 assets, all 200); cycle checks C-R1-F9/F10 confirm the diff stays within the manifest globs and shared modules still integrate. Evidence: .plan/G-16/audit-round-1.md.
  • Code review round 1: PASS with 5 minor/nit warnings (R1-F1..R1-F5, details in .plan/G-16/review-round-1.md).
  • Manual pass (ac-manual-flow): python3 -m http.server 8000, click "+ Request" on the index page, fill the form, click the map to place the preview pin, hit "Request", and copy the fenced snippet.

Risks & assumptions

From .plan/G-16/plan.md:

  • The Leaflet zoom control already sits bottom-right; the "+ Request" button is offset above it to avoid overlap.
  • request/index.html in a subfolder breaks all relative paths unless <base href="../"> is set (calibrate.html pattern).
  • navigator.clipboard needs a secure context — fine on http://localhost, not on file:// (the site already requires an HTTP server for config fetches).
  • js/request.js must stay Node-importable (no top-level DOM/Leaflet access) so the spec-audit command criteria remain runnable.
  • Quality-gate is skipped this run, so verification rests on the spec-audit command criteria plus one manual browser pass.
  • The design mockup is guidance only — the site theme (gold/dark blue via config/ui.json CSS vars) wins over the mockup's panel colours.

Key assumptions: entry point on index.html only; the snippet is a complete markers.json entry in a fenced json block (slugified id, world-normalized x/y via pixelToWorld, layers entry when the active layer is a zone); Discord messaging is text-only via ui.json keys; icon picker limited to the 6 allowed icons; field limits 80/80/200/200/120 chars; out-of-range clicks rejected with a hint; docs updated in the same commit. Full list in .plan/G-16/plan.md (## Assumptions).

# Summary Implements Linear G-16 "Marker Request Flow" in a single commit (`5ce56a2`): - Floating "+ Request" button on `index.html` (bottom-right, above the Leaflet zoom control), labelled from `config/ui.json`, opening the new request page in a new tab. - New request page `request/index.html` + `js/request.js`: calibrate-style world/layer dropdowns, click-to-place live-preview pin + popup card, full marker form (name, owner, description, icLocation, oocLocation; 6-icon picker; colour swatches + validated hex input; live char counters), collapsed JSON preview, step instructions, and a validation-gated "Request" CTA. - "Request" opens a modal with the generated `markers.json` entry in a fenced `json` block, a prominent copy button, and a Discord hint (configurable user, default "Velvie") via new flat `strings` keys in `config/ui.json`. - `js/request.js` keeps all DOM/Leaflet access inside `init()` and exports pure helpers (`slugify`, `isValidColour`, `buildMarkerEntry`, `buildSnippet`) so it stays Node-importable; `js/config.js` exports `ICON_NAMES`/`COLOUR_RE`, `js/markers.js` exports the popup renderer. - Theme-consistent styles in `css/style.css` (CSS vars from `ui.json` only) and docs updated (`docs/development.md`, `docs/configuration.md`). # How to review Riskiest first: 1. `request/index.html` — subfolder page; every asset/config path depends on `<base href="../">`. 2. `js/request.js` — new module; check the live-preview/validation flow and the boot error path (no user-facing error banner yet, R1-F2). 3. `js/ui.js` — `#request-btn` wiring/label; `[hidden]` is ineffective until configs load (R1-F1, cosmetic). 4. `config/ui.json` — new flat string keys under `strings` (incl. `requestSteps`, `requestDiscordUser`, `requestDiscordInstructions`). 5. `css/style.css` — button offset above the bottom-right zoom bar; modal/panel styles use theme vars only. # How to verify - Quality-gate was **skipped this run** (`phases.quality-gate = skipped`, no QA command) — no automated QA suite ran. - Spec-audit cycle round 1: **PASS**, 8/8 acceptance criteria (C-R1-F1..F8) incl. `node --check js/*.js`, config JSON validity + new `ui.json` keys, `node .plan/G-16/verify-request-core.mjs`, structural greps, and an HTTP smoke test (13 assets, all 200); cycle checks C-R1-F9/F10 confirm the diff stays within the manifest globs and shared modules still integrate. Evidence: `.plan/G-16/audit-round-1.md`. - Code review round 1: **PASS** with 5 minor/nit warnings (R1-F1..R1-F5, details in `.plan/G-16/review-round-1.md`). - Manual pass (ac-manual-flow): `python3 -m http.server 8000`, click "+ Request" on the index page, fill the form, click the map to place the preview pin, hit "Request", and copy the fenced snippet. # Risks & assumptions From `.plan/G-16/plan.md`: - The Leaflet zoom control already sits bottom-right; the "+ Request" button is offset above it to avoid overlap. - `request/index.html` in a subfolder breaks all relative paths unless `<base href="../">` is set (calibrate.html pattern). - `navigator.clipboard` needs a secure context — fine on `http://localhost`, not on `file://` (the site already requires an HTTP server for config fetches). - `js/request.js` must stay Node-importable (no top-level DOM/Leaflet access) so the spec-audit command criteria remain runnable. - Quality-gate is skipped this run, so verification rests on the spec-audit command criteria plus one manual browser pass. - The design mockup is guidance only — the site theme (gold/dark blue via `config/ui.json` CSS vars) wins over the mockup's panel colours. Key assumptions: entry point on `index.html` only; the snippet is a complete `markers.json` entry in a fenced `json` block (slugified id, world-normalized x/y via `pixelToWorld`, `layers` entry when the active layer is a zone); Discord messaging is text-only via `ui.json` keys; icon picker limited to the 6 allowed icons; field limits 80/80/200/200/120 chars; out-of-range clicks rejected with a hint; docs updated in the same commit. Full list in `.plan/G-16/plan.md` (`## Assumptions`).
- index.html: floating #request-btn (bottom-right, above the Leaflet zoom
  control, opens a new tab), labelled from ui.json strings.requestButtonLabel
  and unhidden in js/ui.js buildChrome once configs load
- request/index.html (new, <base href="../">): calibrate-style page with the
  marker form (world/layer selects, name/owner/description/icLocation/
  oocLocation fields with maxlengths 80/80/200/200/120 and live n/200
  counters on description + icLocation, icon picker over the 6 allowed
  icons, colour swatches + hex input), a collapsed <details> with the live
  JSON, step instructions (#request-steps) and Cancel + #request-submit CTA
- js/request.js (new): Node-importable module — pure helpers slugify,
  isValidColour, buildMarkerEntry, buildSnippet exported, all DOM/Leaflet
  access inside init(). Click-to-place live-preview pin (same pin style as
  js/markers.js plus a pulsing ring) whose popup card re-renders on every
  input; clicks outside the active layer image are rejected; form validation
  gates the CTA; Request opens #result-modal with the fenced ```json snippet,
  a prominent copy button and the Discord hint naming the configured user
- js/config.js exports ICON_NAMES and COLOUR_RE; js/markers.js exports
  popupHtml and a shared pinIcon helper used by real pins and the preview pin
- config/ui.json: new flat request-flow string keys (requestDiscordUser =
  "Velvie", requestDiscordInstructions with {user} placeholder, requestSteps
  array, labels/hints/CTA strings); existing keys untouched
- css/style.css: themed styles for #request-btn, the request panel, form,
  pickers, preview pin and result modal, plus small-screen rules
- docs/development.md + docs/configuration.md: request page in the project
  structure, "Requesting markers" section, new ui.json string keys

Driver-Task: marker-request-flow
Refs: G-16
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feat/G-16:feat/G-16'
git switch 'feat/G-16'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'feat/G-16'
git switch 'feat/G-16'
git rebase 'main'
git switch 'main'
git merge --ff-only 'feat/G-16'
git switch 'feat/G-16'
git rebase 'main'
git switch 'main'
git merge --no-ff 'feat/G-16'
git switch 'main'
git merge --squash 'feat/G-16'
git switch 'main'
git merge --ff-only 'feat/G-16'
git switch 'main'
git merge 'feat/G-16'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rukira/wow-housing-map!1
No description provided.