Skip to content

Fix backend build: migrate DjangoAdminEditorModal to Radix Dialog#4668

Merged
marcoacierno merged 1 commit into
mainfrom
fix/django-admin-editor-modal-radix
Jun 10, 2026
Merged

Fix backend build: migrate DjangoAdminEditorModal to Radix Dialog#4668
marcoacierno merged 1 commit into
mainfrom
fix/django-admin-editor-modal-radix

Conversation

@marcoacierno

Copy link
Copy Markdown
Member

Summary

The backend Docker build on main is failing (run 27280034017) with:

Could not resolve "../modal" from "src/components/shared/django-admin-editor-modal/index.tsx"

#4664 (Migrate custom_admin Schedule Builder to Radix UI) deleted shared/modal.tsx but missed django-admin-editor-modal/index.tsx, which still imported it. This migrates that last consumer to the same Radix Dialog pattern used by the rest of #4664.

The iframe modal keeps its ~90vw footprint via Dialog.Content width/maxWidth; a visually hidden Dialog.Title keeps Radix's accessibility requirement satisfied. Closing the dialog still triggers the ConferenceSchedule refetch.

Test plan

  • pnpm build in backend/custom_admin (node:23 container, same as Dockerfile js-stage) — previously failed at the client vite stage, now completes
  • Biome check passes

🤖 Generated with Claude Code

PR #4664 removed shared/modal.tsx but django-admin-editor-modal still
imported it, breaking the vite client build in the backend Docker image.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pycon Error Error Jun 10, 2026 6:39pm

@marcoacierno marcoacierno merged commit 2832fe6 into main Jun 10, 2026
7 of 8 checks passed
@marcoacierno marcoacierno deleted the fix/django-admin-editor-modal-radix branch June 10, 2026 18:42
@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Migrates DjangoAdminEditorModal from the deleted shared/modal.tsx to Radix UI Dialog, fixing the broken build from #4664.

Early return before Dialog.Root bypasses close animation

The component guards with if (!url) { return null; } before rendering Dialog.Root. When the dialog closes, url becomes null, the entire Dialog.Root is unmounted, and Radix never runs its exit transition. The sibling AddItemModal (introduced in #4664) uses the correct pattern: always render Dialog.Root, guard the content inside with {url && (...)}. This should match that pattern.

Iframe height reduction

The iframe changed from h-[90vh] to h-[85vh], but @radix-ui/themes Dialog.Content also adds internal top/bottom padding that the old Modal component didn't have. The effective visible area has shrunk by more than just 5vh. Consider bumping back to h-[90vh] or accounting for the padding explicitly.

Missing aria-describedby={undefined} (Dialog.Content, line ~53)

No Dialog.Description is provided and no aria-describedby={undefined} to suppress the Radix accessibility warning. insert-link-dialog.tsx in the same repo already uses the opt-out pattern — worth adding here to keep the console clean.

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.52%. Comparing base (09720c7) to head (7eb13ec).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4668   +/-   ##
=======================================
  Coverage   92.52%   92.52%           
=======================================
  Files         359      359           
  Lines       10800    10800           
  Branches      821      821           
=======================================
  Hits         9993     9993           
  Misses        696      696           
  Partials      111      111           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant