feat(request): marker request flow page + Request entry point #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/G-16"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements Linear G-16 "Marker Request Flow" in a single commit (
5ce56a2):index.html(bottom-right, above the Leaflet zoom control), labelled fromconfig/ui.json, opening the new request page in a new tab.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.markers.jsonentry in a fencedjsonblock, a prominent copy button, and a Discord hint (configurable user, default "Velvie") via new flatstringskeys inconfig/ui.json.js/request.jskeeps all DOM/Leaflet access insideinit()and exports pure helpers (slugify,isValidColour,buildMarkerEntry,buildSnippet) so it stays Node-importable;js/config.jsexportsICON_NAMES/COLOUR_RE,js/markers.jsexports the popup renderer.css/style.css(CSS vars fromui.jsononly) and docs updated (docs/development.md,docs/configuration.md).How to review
Riskiest first:
request/index.html— subfolder page; every asset/config path depends on<base href="../">.js/request.js— new module; check the live-preview/validation flow and the boot error path (no user-facing error banner yet, R1-F2).js/ui.js—#request-btnwiring/label;[hidden]is ineffective until configs load (R1-F1, cosmetic).config/ui.json— new flat string keys understrings(incl.requestSteps,requestDiscordUser,requestDiscordInstructions).css/style.css— button offset above the bottom-right zoom bar; modal/panel styles use theme vars only.How to verify
phases.quality-gate = skipped, no QA command) — no automated QA suite ran.node --check js/*.js, config JSON validity + newui.jsonkeys,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..plan/G-16/review-round-1.md).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:request/index.htmlin a subfolder breaks all relative paths unless<base href="../">is set (calibrate.html pattern).navigator.clipboardneeds a secure context — fine onhttp://localhost, not onfile://(the site already requires an HTTP server for config fetches).js/request.jsmust stay Node-importable (no top-level DOM/Leaflet access) so the spec-audit command criteria remain runnable.config/ui.jsonCSS vars) wins over the mockup's panel colours.Key assumptions: entry point on
index.htmlonly; the snippet is a completemarkers.jsonentry in a fencedjsonblock (slugified id, world-normalized x/y viapixelToWorld,layersentry when the active layer is a zone); Discord messaging is text-only viaui.jsonkeys; 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-16View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.