Skip to content

Commit fd6a0ed

Browse files
feat(tinacms): upgrade to 3.8.1, remove ui.router so title click opens form, add IPv4 proxy
Three bundled changes that together make the admin editor actually usable when a contributor runs `npm start` locally and edits content. 1. tinacms 3.4.1 -> 3.8.1 + @tinacms/cli 2.1.5 -> 2.1.7. The 3.4 side panel could not be resized which made editing painful in narrow windows (the reported half of #81). 3.8 ships a working resize. CLI is pinned EXACT to 2.1.7 because 2.1.8+ hangs on init (likely the @tinacms/schema-tools 2.6->2.7 bump that landed in 2.1.8) -- the dev server never spawns ng serve and beta returns 502. 2. tina/config.ts: remove `ui.router` from every collection. With router defined, clicking a row title in the admin list routes to the visual-edit iframe at #/~/<path>, which only renders form fields when the embedded page calls TinaCMS's useTina() hook. Our Angular pages don't (no Tina React integration), so editors saw the live page with an empty "form fields will appear here" panel and couldn't reach the schema fields. The kebab menu's "Edit in Admin" already opened the right form editor, but the kebab column was hidden by horizontal overflow whenever filenames were long (most news entries) which made editing news effectively impossible. Without router, title clicks route straight to /collections/edit/<file> -- the same form editor. 3. projects/website-angular/src/scripts/tina-ipv4-proxy.js + Dockerfile CMD: tinacms dev binds to ::1:4001 only. Docker port-publish is IPv4-only, so without this the admin URL is unreachable from the host (404 / connection reset) -- which broke both the SSH-tunnel local-development workflow AND any future test access. Tiny Node forwarder bound to 0.0.0.0:4001 pipes connections to [::1]:4001. Spawned in background from the Dockerfile CMD so it survives restarts.
1 parent 5f12d19 commit fd6a0ed

6 files changed

Lines changed: 1887 additions & 171 deletions

File tree

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ COPY . .
2222
EXPOSE 4200
2323
EXPOSE 4001
2424

25-
# We use "npm run dev:serve" but pass the flags through the -- separator
25+
# We use "npm run dev:serve" but pass the flags through the -- separator.
26+
# The IPv4 proxy runs in the background because `tinacms dev` only binds to
27+
# ::1:4001; docker port-publish is IPv4-only, so without this the admin UI
28+
# is unreachable from the host (and from any SSH tunnel into it).
2629
CMD npx tsx projects/website-angular/src/scripts/generate-index.ts && \
30+
(node projects/website-angular/src/scripts/tina-ipv4-proxy.js &) && \
2731
npx tinacms dev --rootPath projects/website-angular -c "ng serve --host 0.0.0.0 --poll 2000 --disable-host-check"

0 commit comments

Comments
 (0)