PreviewsOurs (00f511f)Steven's PR (e93ab2a)master (55438bb)PR 19078 on GitHub

PR 19078: the Import YAML dialog, master vs Steven's PR vs ours

rancher/dashboard · issue 19076 · taken over from Steven · 12 November 2026

Preview: https://rancherpr19078oursr.mf-created-dashboard.ui.rancher.space/dashboard · built from 00f511f, backend mf Rancher (13.48.147.135). Open Import YAML from the header (the upload icon).

Where it stands: items 1–7 done on our branch, nothing pushed

Our branch is Steven's three commits rebased onto master (55438bb), plus three of ours. It only exists locally and in the preview. Item 8 (the required modal prop) is left for later, as agreed.

  1. RcModal's own layout: no wrapper divs, its 24px section gap and 16px action gap. Import is in #primary-action, so RcModal supplies the tertiary Cancel (rc-modal-cancel). The page object follows, which fixes the a11y job.
  2. The CSS RcModal made unnecessary is gone (.medium, button padding, .mb-24, the 100% width, text-right).
  3. Import is an RcButton with the upload icon, driven by primaryAction, with aria-busy while importing.
  4. Cancel, Esc and a click outside do nothing while an import is running.
  5. The select says "Default Namespace" again (existing string) and is named by that label. That needed a two-line fix in LabeledSelect, which was dropping aria-label/aria-labelledby. It's its own commit, and it also fixes the PodSecurityAdmission and chart callers that already pass them.
  6. The resourceName prop and its strings are gone; the banner says "resources".
  7. The unit tests are rewritten on the real RcModal (15 tests, no any). inheritAttrs: false keeps the host's resources/cluster off the dialog element.
The empty form
The design from the issue
DesignThe issue's Figma (Runtime Enforcer file). Cody asked for the Rancher DS where they differ, so Cancel is the tertiary button, not a link.
master (55438bb): form
master (55438bb)Today: the old card. Select label inside the field, centred buttons, no instructions.
Steven's PR (e93ab2a): form
Steven's PR (e93ab2a)New layout. Cancel is a link and the select says "Namespace". The disabled Import is AsyncButton's faded green.
Ours (00f511f): form
Ours (00f511f)Same layout on RcModal's own spacing. Cancel is the Rancher DS tertiary button. The select says "Default Namespace" and is named by that label for screen readers. The disabled Import is RcButton's grey.
A failed import (a kind the server doesn't know)
master (55438bb): error
master (55438bb)The error banner, and AsyncButton turns red and says "Error" for a few seconds.
Steven's PR (e93ab2a): error
Steven's PR (e93ab2a)Same as master inside the new frame: the button turns red "Error".
Ours (00f511f): error
Ours (00f511f)The error banner only. Import stays as it is, ready to retry, like the other RcModal dialogs.
A successful import (a throwaway ConfigMap)
master (55438bb): results
master (55438bb)The results table with a centred Close.
Steven's PR (e93ab2a): results
Steven's PR (e93ab2a)Results in the new frame, Close on the right.
Ours (00f511f): results
Ours (00f511f)Same as the PR. Close keeps its test id.
The empty form in dark mode
master (55438bb): form-dark
master (55438bb)The old card in dark mode.
Steven's PR (e93ab2a): form-dark
Steven's PR (e93ab2a)New layout in dark mode.
Ours (00f511f): form-dark
Ours (00f511f)Ours in dark mode.
What was checked
CheckResult
Unit tests: ImportDialog, PromptModal, LabeledSelect, the two aria callers, every test with a LabeledSelect snapshotAll pass
The new tests fail when the import guard or inheritAttrs: false is removedEach fails one test
eslint --max-warnings 0 on the changed filesClean
yarn type-check:ciNo new errors (one fewer than the baseline)
./scripts/check-i18nNone of its 28 misses are ours
Live, in the browser: is there a combobox named "Default Namespace", is RcModal's Cancel there, does Esc close the idle dialogOurs: yes, yes, yes. Steven's PR: no name, no rc-modal-cancel, Esc closes.
Real imports on all three previews: a failing kind and a ConfigMapAs shown above; the ConfigMaps were deleted afterwards
Cypress (a11y spec with the new Cancel selector)Not run: Cypress runs on CI only