Skip to content

feat: apply backdrop blur/overlay background styling to all modal windows#502

Draft
Power-Maverick wants to merge 4 commits intodevfrom
add-overlay-to-modals
Draft

feat: apply backdrop blur/overlay background styling to all modal windows#502
Power-Maverick wants to merge 4 commits intodevfrom
add-overlay-to-modals

Conversation

@Power-Maverick
Copy link
Copy Markdown
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request.
  • Follow the guidelines from the CONTRIBUTING.md.
  • Mention the bug or the feature number the PR will be targeting.
  • Test the change in your own code. (Compile and run)
  • Resolve all GH Copilot comments.

What & Why

The global-search command palette has a polished overlay effect — a semi-transparent dark backdrop with a backdrop-filter: blur(4px) that dims and blurs the app content behind it. None of the BrowserWindow-backed modals had this treatment, making them feel visually inconsistent.

This PR copies that background styling to all modal windows so they share the same atmospheric appearance.

Approach

Since modal windows are already transparent: true with backgroundColor: "#00000000", the simplest approach was to apply the overlay background directly to the html, body style injected by modalWindowManager.composeDocumentHtml():

background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);

This means every modal window — regardless of its content — automatically inherits the backdrop effect through Electron's transparent window compositing. Modal window sizing and panel layout are completely unchanged.

Files changed

  • src/main/managers/modalWindowManager.ts — adds background and backdrop-filter to the shared body style in composeDocumentHtml; all other window management logic is untouched
  • No changes to any modal view.ts files or sharedStyles.ts

Power-Maverick and others added 2 commits March 29, 2026 12:18
Copy the global-search overlay pattern (semi-transparent backdrop +
backdrop-filter blur) to all BrowserWindow-backed modals.

- modalWindowManager: modal windows now fill the full main-window bounds
  so the overlay covers the entire app; injects --modal-panel-width and
  --modal-panel-height CSS vars so each panel keeps its intended size
- sharedStyles: add .modal-overlay rule (fixed inset-0, rgba(0,0,0,0.5)
  background, backdrop-filter blur(4px), flex-centered); update
  .modal-panel to CSS-var sizing with border-radius and max constraints
- All 10 modal view.ts files: wrap panel div in <div class="modal-overlay">
- Custom-panel modals (about, troubleshooting, updateNotification,
  toolDetail): inject .modal-overlay CSS inline and update panel class
  to CSS-var dimensions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert the full-size window and CSS-var sizing  modals remainchanges
content-sized and centered as before.

Only copy the visual background styling from the global-search overlay:
- modalWindowManager: body gets background: rgba(0,0,0,0.5) and
  backdrop-filter: blur(4px) so the modal window shows the dark
  blurred backdrop behind the panel (through Electron transparent window)
- Remove .modal-overlay wrapper divs and CSS var sizing from all modals
- Restore .modal-panel to width/height: 100% in sharedStyles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 955.78 KB
Renderer JS 544.86 KB
Renderer CSS 95.56 KB
Total 1.56 MB

Bundle Analysis Reports

The detailed bundle analysis reports are available in the workflow artifacts:

  • 📊 Main Process: stats-main.html
  • 📊 Renderer Process: stats-renderer.html

Download the artifacts from the workflow run to view interactive visualizations.


Bundle size tracking is now active! This helps prevent bundle bloat.

The backdrop-filter on a child BrowserWindow cannot blur the parent
window's content (different OS-level windows). Instead, inject the
overlay directly into the main  the same approach therenderer
global-search overlay uses.

- index.html: add #modal-backdrop div (hidden by default)
- styles.scss: .modal-backdrop mirrors the global-search overlay styles
  (position fixed, inset 0, rgba(0,0,0,0.5), backdrop-filter blur(4px))
- browserWindowModals.ts: listen to MODAL_WINDOW_OPENED/CLOSED events
  and toggle the backdrop div visibility
- modalWindowManager.ts: revert body background to transparent (backdrop
  is now handled in the main renderer, not the modal window itself)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 955.73 KB
Renderer JS 545.1 KB
Renderer CSS 95.69 KB
Total 1.56 MB

Bundle Analysis Reports

The detailed bundle analysis reports are available in the workflow artifacts:

  • 📊 Main Process: stats-main.html
  • 📊 Renderer Process: stats-renderer.html

Download the artifacts from the workflow run to view interactive visualizations.


Bundle size tracking is now active! This helps prevent bundle bloat.

- Show backdrop synchronously in showBrowserWindowModal() before
  awaiting the modal window, eliminating the timing gap where the
  modal appears before the dark overlay
- Use display: flex for .modal-backdrop (matching .global-search-overlay)
  and update all JS toggle calls to use flex instead of block

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Bundle Size Report 📦

Bundle Size
Main Process 955.73 KB
Renderer JS 545.17 KB
Renderer CSS 95.71 KB
Total 1.56 MB

Bundle Analysis Reports

The detailed bundle analysis reports are available in the workflow artifacts:

  • 📊 Main Process: stats-main.html
  • 📊 Renderer Process: stats-renderer.html

Download the artifacts from the workflow run to view interactive visualizations.


Bundle size tracking is now active! This helps prevent bundle bloat.

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