Commit 0ac1bf8
authored
fix(dns-records): restore BIND file import broken by dropdown blur-close (#1329)
## Problem
Importing a BIND zone file on the DNS records page did nothing — no
preview dialog, no error, no processing.
Root cause: `@radix-ui/react-menu` ≥2.1.17 (pulled in by #1321) closes
any open menu on **window blur**. The import dropzone lives inside
`ResponsiveDropdown` (a Radix DropdownMenu on desktop), so clicking
**Select a file** (native picker) or dragging a file in from Finder
blurred the window, closed the dropdown, and unmounted the dropzone
before `onDrop` fired.
## Fix
- **Bump `@datum-cloud/datum-ui` to ^1.3.2** — `ResponsiveDropdown`
renders a Radix Popover on desktop (same UX, no blur-close). Upstream:
datum-cloud/datum-ui#136.
- `handleDrop` reports whether the preview opened; the dropdown only
closes on success so parse errors stay visible.
- Empty accepted-file drops show an error instead of failing silently.
## Test plan
- [ ] Import via file picker — dropdown stays open while the picker is
up, preview dialog opens with parsed records
- [ ] Import via drag-and-drop from Finder
- [ ] Invalid file → error shown inside the dropdown; Export still works
## Note
The E2E regression checks are red due to a **separate, pre-existing**
control-plane change (org creation now requires a system-assigned
`generateName`; `createStandardOrg` fails with 422). It's unrelated to
this PR and affects `main` too — tracked/fixed separately.4 files changed
Lines changed: 20 additions & 10 deletions
File tree
- app/features/edge/dns-records/import-export
- hooks
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
| |||
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
134 | | - | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | | - | |
| 145 | + | |
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
| |||
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | | - | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| |||
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
| 269 | + | |
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
| 274 | + | |
268 | 275 | | |
269 | 276 | | |
270 | 277 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments