-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-3914] Refactor Browser Extension Popout Windows #6296
[PM-3914] Refactor Browser Extension Popout Windows #6296
Conversation
No New Or Fixed Issues Found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good start. I would like to see more code owned though.
…indow is force closed for vault item password reprompts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're a bit back to having two classes again. Albeit one is static and one isn't.
I think we need to write up some guidance on which to use. I think the only stateful portion of PopupUtilsService
is knowing if the extension is running in private mode which doesn't feel like something it should know.
…pup utils service and implementating requested changes
…lose the window instead of attempting to close the tab
…ersist if user opens the extension popout in a new window before locking or logging out
…side of the scope fo the openUlockPopout method to ensure it does not have to be rebuilt each time the method is called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* [PM-3914] Refactor Browser Extension Popouts * [PM-3914] Refactor Browser Extension Popouts * [PM-3914] Refactor Browser Extension Popouts * [PM-3914] Adding enums for the browser popout type * [PM-3914] Making the methods for getting a window in a targeted manner public * [PM-3914] Refactoing implementation * [PM-3914] Updating deprecated api call * [PM-3914] Fixing issues found when testing behavior * [PM-3914] Reimplementing behavior based on feedback from platform team * [PM-3914] Adding method of ensuring previously opened single action window is force closed for vault item password reprompts * [PM-3914] Taking into consideration feedback regarding the browser popup utils service and implementating requested changes * [PM-3914] Removing unnecesssary class dependencies * [PM-3914] Adding method for uniquely setting up password reprompt windows * [PM-3914] Modifying method * [PM-3914] Adding jest tests and documentation for AuthPopoutWindow util * [PM-3914] Adding jest tests and documentation for VaultPopoutWindow * [PM-3914] Adding jest tests for the debouncing method within autofill service * [PM-3914] Adding jest tests for the new BrowserApi methods * [PM-3914] Adding jest tests to the BrowserPopupUtils class * [PM-3914] Updating inPrivateMode reference * [PM-3914] Updating inPrivateMode reference * [PM-3914] Modifying comment * [PM-3914] Moviing implementation for openCurrentPagePopout to the BrowserPopupUtils * [PM-3914] Applying feedback * [PM-3914] Applying feedback * [PM-3914] Applying feedback * [PM-3983] Refactoring implementation of `setContentScrollY` to facilitate having a potential delay * [PM-3914] Applying feedback regarding setContentScrollY to the implementation * [PM-3914] Modifying early return within the run method of the ContextMenuClickedHandler * [PM-3914] Adding test for VaultPopoutWindow * [PM-3914] Applying work done within PM-4366 to facilitate opening the popout window as a popup rather than a normal window * [PM-3914] Updating the BrowserApi.removeTab method to leverage a callback structure for the promise rather than an async away structure * [PM-3036] Adding jest tests for added passkeys popout windows * [PM-3914] Adjsuting logic for turning off the warning when FIDO2 credentials are saved * [PM-3914] Fixing height to design * [PM-3914] Fixing call to Fido2 Popout * [PM-3914] Fixing add/edit from fido2 popout * [PM-3914] Fixing add/edit from fido2 popout * [PM-3914] Fixing jest tests for updated elements * [PM-3914] Reverting how context menu actions are passed to the view component * [PM-3914] Reverting re-instantiation of config service within main.background.ts * [PM-3914] Adding jest test for BrowserAPI removeTab method * [PM-3914] Adding method to handle parsing the popout url path * [PM-3914] Removing JSDOC comment elements * [PM-3914] Removing await from method call * [PM-3914] Simplifying implementation on add/edit * [PM-3032] Adding more direct reference to view item action in context menus * [PM-3914] Adjusting routing on Fido2 component to pass the singleActionPopout param to the route when opening the add-edit component * [PM-3914] Adding singleActionPopout param to the fido2 component routing * [PM-3914] Updating implementation details for how we build the extension url path * [PM-3914] Reworking implementation for isSingleActionPopoutOpen to clean up iterative logic * [PM-3914] Merging work from master and fixing merge conflicts * [PM-3914] Fixing merge conflict introduced from master * [PM-3914] Reworking closure of single action popouts to ensure they close the window instead of attempting to close the tab * [PM-3914] Fixing issue within Opera where lock and login routes can persist if user opens the extension popout in a new window before locking or logging out * [PM-3914] Setting the extensionUrls that are cheked as a variable outside of the scope fo the openUlockPopout method to ensure it does not have to be rebuilt each time the method is called
Type of change
Objective
Refactor how the browser extension uses pop-out windows, and migrate the logic within
BrowserPopoutWindowService
andPopupUtilsService
to a new utils classBrowserPopupUtils
to consolidate behavior. We're also updating any potential popups that open in a tab to open within a new window to facilitate consistency in the implementation.Code changes
BrowserPopoutWindowService
entirely.getWindow
method to function with or without a window ID value. If an id is not provided, the method attempts to grab the current window that the user has active.Adding aupdateWindowProperties
method to facilitate repositioning and focusing any single use popout windows that might exist. RemovingopenBitwardenExtensionTab
andcloseBitwardenExtensionTab
as those represent deprecated methods for facilitating user interactions with the popup outside of the popup itself.BrowserPopoutUtils
class, centralizing behavior for theBrowserPopoutWindowService
and thePopupUtilsService
class.BrowserPopoutWindowService
and thePopupUtilsService
classes.PopupCloseWarningService
that handles setting up anonbeforeunload
event listener and enabling/disabling warning behavior based on the class instantiation.BrowserPopupUtils
.VaultPopoutWindow
utilsDemonstration
Screen.Recording.2023-09-14.at.3.09.43.PM.mp4