mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
* refactor(risk-insights-data.service): unify drawer state management with BehaviorSubject - Replace individual drawer properties with unified drawerDetailsSubject - Add reactive Observable getters for drawer state checking - Update all drawer methods to use centralized state management * risk-insights.component: add special case drawer state sync in component - Add private _isDrawerOpen property for internal state tracking - Subscribe to drawerDetails$ changes with takeUntilDestroyed cleanup - Implement getter/setter for isDrawerOpen to sync component <-> service - Enable two-way binding while maintaining reactive patterns * risk-insights.component.html: replace drawer template with unified observable patterns - Replace dataService.openDrawer with isDrawerOpen special case getter - Wrap drawer in @if block with drawerDetails$ | async for single subscription - Update isActiveDrawerType() calls to reactive isActiveDrawerType$() | async - Replace direct property access with unified drawerDetails object - Use modern @if control flow syntax for better performance * all-applications.component.html: replace drawer state with reactive observable patterns - Replace dataService.drawerInvokerId with drawerDetails$ | async in card highlighting - Update app-table-row-scrollable input from isDrawerIsOpenForThisRecord function to openApplication string * critical-applications.component.html: replace drawer state with reactive observable patterns - Replace dataService.drawerInvokerId with drawerDetails$ | async in card highlighting - Update table component binding from isDrawerIsOpenForThisRecord to openApplication - Use reactive drawer state checking for consistent behavior with all-applications * all-applications.component.ts: remove deprecated drawer state functions - Remove unused trackByFunction that's no longer needed in template - Remove getSelectedUrls function that's not used anywhere - Remove isDrawerOpenForTableRow replaced by reactive openApplication binding - Clean up unused ApplicationHealthReportDetail import - Simplifies component interface following reactive pattern migration * critical-applications.component.ts: remove deprecated drawer state functions - Remove unused trackByFunction that's no longer needed in template - Remove isDrawerOpenForTableRow replaced by reactive openApplication binding * app-table-row-scrollable.component.html: replace drawer function calls with string comparison - Replace isDrawerIsOpenForThisRecord(row.applicationName) with row.applicationName === openApplication - Use direct string comparison instead of function calls for better performance - Matches updated component input from function to string property - Simplifies template logic following reactive pattern migration * fix(risk-insights-data.service.ts): restore drawer toggle behavior in setter methods - Add toggle logic to check if same drawer type and invoker are already open - Close drawer when clicking same button twice (preserves original UX) - Switch drawer content when clicking different button - Maintains reactive patterns while restoring expected behavior * revert to drawer state functions to maintain scope of task - the logic replacing these functions will be in pr16523 * fix(risk-insights-data.service.ts): restore boolean isActiveDrawerType function per review feedback - Keep original isActiveDrawerType() as boolean function using drawerDetailsSubject.value - Maintain isActiveDrawerType$() as Observable version for reactive templates - Apply same pattern to isDrawerOpenForInvoker() for consistency - Addresses review feedback to preserve existing function signatures * refactor(risk-insights-data.service.ts): use destructuring in drawer setter methods per review feedback * refactor(all-applications.component.html): optimize single subscription for drawer state per review feedback * refactor(critical-applications.component.html): optimize single subscription for drawer state per review feedback * refactor(risk-insights.component.html): use boolean drawer type functions per review feedback * fix(browser-system-notification.service.ts): restore eslint disable comment removed by prettier --------- Co-authored-by: Tom <144813356+ttalty@users.noreply.github.com>
Bitwarden Licensed Code
All source code under this directory is licensed under the Bitwarden License Agreement.