Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Popup window's script injection #956

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lilla28
Copy link
Contributor

@lilla28 lilla28 commented Feb 20, 2025

Changes:

  • First commit : Added IWindowPolicy with DefaultPopupWindowPolicy to not inject scripts into popups - opened window via the window.open JS call and track the Window's and ContentPane's child popup windows to enable closing windows if their parent is closed in case of popups.
  • Second commit: PLEASE BE AWARE I am happy to drop this commit I was just doing some little experiment/research on the Testably and TestableIO upgrades.

Also please be aware I have an another solution for the script inejction popup windows where I am using the WebWindowOptions to create a FloatingOnly window instead of creating a PopupWindow class. Commit can be found here: [https://github.com/morganstanley/ComposeUI/commit/f41a19950dfa32cd5acc2682467650f0e039eb5f]

@lilla28 lilla28 requested a review from a team as a code owner February 20, 2025 16:08
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 135 lines in your changes missing coverage. Please review.

Project coverage is 67.34%. Comparing base (bb3c3d1) to head (7a8c5b2).

Files with missing lines Patch % Lines
src/shell/dotnet/Shell/WebContent.xaml.cs 0.00% 49 Missing ⚠️
src/shell/dotnet/Shell/App.xaml.cs 0.00% 24 Missing ⚠️
src/shell/dotnet/Shell/Layout/LayoutManager.cs 0.00% 21 Missing ⚠️
src/shell/dotnet/Shell/Popup/PopupWindow.xaml.cs 0.00% 21 Missing ⚠️
src/shell/dotnet/Shell/Modules/ModuleService.cs 0.00% 17 Missing ⚠️
src/shell/dotnet/Shell/Popup/DefaultPopupPolicy.cs 0.00% 1 Missing ⚠️
src/shell/dotnet/Shell/Popup/PopupWindow.xaml 0.00% 1 Missing ⚠️
src/shell/dotnet/Shell/WebContent.xaml 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #956      +/-   ##
==========================================
- Coverage   67.88%   67.34%   -0.55%     
==========================================
  Files         308      311       +3     
  Lines        9131     9202      +71     
  Branches     1052     1057       +5     
==========================================
- Hits         6199     6197       -2     
- Misses       2701     2774      +73     
  Partials      231      231              
Files with missing lines Coverage Δ
...rganStanley.ComposeUI.AppDirectory/AppDirectory.cs 85.38% <ø> (ø)
...Stanley.ComposeUI.DesktopAgent/Fdc3DesktopAgent.cs 78.87% <ø> (ø)
src/shell/dotnet/Shell/MainWindow.xaml.cs 0.00% <ø> (ø)
src/shell/dotnet/Shell/WebContentPane.cs 0.00% <ø> (ø)
src/shell/dotnet/Shell/Popup/DefaultPopupPolicy.cs 0.00% <0.00%> (ø)
src/shell/dotnet/Shell/Popup/PopupWindow.xaml 0.00% <0.00%> (ø)
src/shell/dotnet/Shell/WebContent.xaml 0.00% <0.00%> (ø)
src/shell/dotnet/Shell/Modules/ModuleService.cs 0.00% <0.00%> (ø)
src/shell/dotnet/Shell/Layout/LayoutManager.cs 0.00% <0.00%> (ø)
src/shell/dotnet/Shell/Popup/PopupWindow.xaml.cs 0.00% <0.00%> (ø)
... and 2 more

... and 4 files with indirect coverage changes

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.

2 participants