Skip to content

Dark theme support for New Project Wizard and Import Dataset dialogs - #17280

Merged
gtritchie merged 1 commit into
mainfrom
feature/dark-mode-wizard-import-dialogs
Mar 24, 2026
Merged

gtritchie merged 1 commit into
mainfrom
feature/dark-mode-wizard-import-dialogs

Conversation

@gtritchie

@gtritchie gtritchie commented Mar 24, 2026 •

Copy link
Copy Markdown
Member

Intent

Additional work on #10296

Summary

  • Add dark theme support for the New Project Wizard and Import Dataset dialogs (Import Excel, CSV, Text, etc.) by opting them into the setThemeAware(true) mechanism from dark theme support for modal dialogs #17242
  • Add dark mode CSS overrides for wizard page selector items, back button, disclosure arrow, page backgrounds, data import grid frame, code preview area, options blocks, and column types popup menu
  • Enable existing theme infrastructure for the data import grid preview iframe

Screenshots

01-create-project 02-project-type 03-create-r-package import-text

Test plan

  • Enable a dark editor theme (e.g. Cobalt) and open File > New Project — verify the New Project Wizard has dark styling on all pages (navigation page, New Directory, Existing Directory, Version Control)
  • Verify the back button retains its arrow shape and has readable text in dark mode
  • Open Environment > Import Dataset > From Text (readr) — verify dark styling on the import dialog, options panel, code preview, data preview grid, and column type popup menu
  • Open Environment > Import Dataset > From Excel — verify dark styling applies
  • Open Environment > Import Dataset > From Text (base) — verify the legacy ImportFileSettingsDialog has dark styling
  • Open the CSV locale sub-dialog (Configure... button) — verify it has dark styling
  • Set use_dark_theme_modal_dialogs preference to false — verify all dialogs remain light even with a dark editor theme
  • Switch to a light editor theme — verify all dialogs display correctly in light mode (no regressions)

@gtritchie gtritchie added this to the Globemaster Allium milestone Mar 24, 2026
@posit-snyk-bot

posit-snyk-bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gtritchie
gtritchie requested a review from kevinushey March 24, 2026 17:28
@gtritchie

Copy link
Copy Markdown
Member Author

Found a problem, if you are using a dark theme, but set the use_dark_theme_modal_dialogs preference to false, the "Data Preview" region of the import dialog will be dark (but should be light, matching the rest of the dialog).

@kevinushey

Copy link
Copy Markdown
Collaborator

Very nice!

Can we also tweak the border color on the Back buttons, so they're dark (in a similar way to the Create Project and Cancel buttons?

Also, a bit more padding between the Type: and Package name: inputs?

@kevinushey

Copy link
Copy Markdown
Collaborator

We should also consistently use grey for the "right" arrow in each menu item in the wizard. (The first ones appear to be darker grey / black)

@gtritchie
gtritchie force-pushed the feature/dark-mode-wizard-import-dialogs branch 2 times, most recently from 2e2cab2 to 6d61d55 Compare March 24, 2026 20:13
Addresses #10296

Add dark theme support for the New Project Wizard and Import Dataset
dialogs by opting them into the setThemeAware(true) mechanism from
PR #17242.

- Add setThemeAware(true) to NewProjectWizard, DataImportDialog,
  ImportFileSettingsDialog, and DataImportOptionsUiCsvLocale
- Add dark mode CSS overrides for wizard page selector items, sprite
  backgrounds, disclosure arrows, and page backgrounds
- Create dedicated dark-mode back button sprites matching the standard
  dialog button colors (rgb(68,80,90) fill, rgb(12,31,48) border)
- Add dark mode CSS for data import grid frame, code preview area,
  options blocks (shared and CSV-specific), and column types popup
- Propagate dark class from owning dialog to DataImportColTypesMenu
  popup via DOM walk using hasClassName for exact class matching
- Enable theme support for the data import GridViewerFrame iframe,
  gated on the owning dialog's dark state so the grid stays light
  when use_dark_theme_modal_dialogs is disabled; strip editor_dark
  and add editor_light to fully revert grid styling
- Set dark background on grid viewer container to prevent light flash
  while the iframe content loads
- Add dark mode override for invalid package name highlight
- Add spacing between Type dropdown and Package name field on the
  Create R Package page
@gtritchie
gtritchie force-pushed the feature/dark-mode-wizard-import-dialogs branch from 6d61d55 to c00dedd Compare March 24, 2026 20:29
@gtritchie
gtritchie merged commit ec1fc99 into main Mar 24, 2026
1 of 7 checks passed
@gtritchie
gtritchie deleted the feature/dark-mode-wizard-import-dialogs branch March 24, 2026 20:33
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.

3 participants