Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

fix Tab Bar disappearing in Fullscreen Split View #1168

Merged
merged 7 commits into from
May 4, 2023

Conversation

mallexxx
Copy link
Collaborator

@mallexxx mallexxx commented Apr 27, 2023

Task/Issue URL: https://app.asana.com/0/1177771139624306/1203853030672990/f

Steps to test this PR:

  1. Open TextEdit, open the Browser
  • Click-and-hold the Green Button in TextEdit
  • Choose "Tile window to the Left"
  • As another window choose the browser window
  • TextEdit should be the Key App
  • Click the browser window, validate the Tab Bar is visible
  1. Validate TabBar is visible when entering full screen from the Browser app Green Button
  2. Open 3 windows; Put one window in Full Screen Mode
  • Click Enter Split Screen in second window, choose Text Edit window as another window
  • Open another Text Edit window, click Enter Split Screen, choose the third window as another window
  • Validate all 3 browser windows Tab Bars are functional and showing window controls on mouse over
  1. Open 2 windows
  • Enter Full Screen in one window
  • Exit Full Screen
  • Enter Full Screen again
  • Scroll back to a space with non-fullscreen window
  • Ensure the Full Screen window is not re-activated

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

@mallexxx mallexxx requested a review from tomasstrba April 27, 2023 07:54
@mallexxx mallexxx changed the title fix Tab Bar disappearing in Fullscreen Split View [WIP] fix Tab Bar disappearing in Fullscreen Split View Apr 27, 2023
@mallexxx mallexxx changed the title [WIP] fix Tab Bar disappearing in Fullscreen Split View fix Tab Bar disappearing in Fullscreen Split View Apr 27, 2023
@mallexxx
Copy link
Collaborator Author

mallexxx commented Apr 27, 2023

resolved: Need to check windows screen to avoid adding other window's title to the window children

Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Comment on lines 210 to 217
func windowDidEnterFullScreen(_ notification: Notification) {
// fix NSToolbarFullScreenWindow occurring beneath the MainWindow
// https://app.asana.com/0/1177771139624306/1203853030672990/f
if !NSApp.isActive {
for window in NSApp.windows {
guard window.className.contains("FullScreen"),
window.parent == nil,
window.screen == self.window!.screen else { continue }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider safely unwrapping to avoid potential crashes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the window property (strongly kept in Notification.object) is nil here - that would mean something has gone terribly wrong. It‘s ok to crash here

@mallexxx mallexxx force-pushed the alex/fix-fullscreen-tabbar branch from 5b58f44 to 4727f66 Compare May 4, 2023 09:35
@mallexxx mallexxx changed the base branch from develop to release/1.38.0 May 4, 2023 09:35
Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Works like a charm 🏅

@mallexxx mallexxx merged commit 064630f into release/1.38.0 May 4, 2023
@mallexxx mallexxx deleted the alex/fix-fullscreen-tabbar branch May 4, 2023 11:37
samsymons added a commit that referenced this pull request May 23, 2023
# By Alexey Martemyanov (56) and others
# Via Dominik Kapusta (6) and others
* upstream_develop: (267 commits)
  Fix creating DMG images in GitHub Actions (#1185)
  Update Privacy Dashboard info on redirect (#1186)
  Update BSK with autofill 6.5.1 (#1182)
  Only use LazyVStack on home page when on macos 12 or higher (#1181)
  Version 1.38.2
  Update PULL_REQUEST_TEMPLATE.md (#1173)
  New Dax Icons (#1179)
  fix Tab Bar disappearing in Fullscreen Split View (#1168)
  Sabrina/allow tabs in single tab windows to be moved to other windows (#1174)
  Version 1.38.1
  Version 1.38.0
  Embeded files updated
  Fix TabBar scrolling (#1178)
  Remove the Fire button pixel (#1151)
  remove duck player pixels (#1176)
  Adding a mitigation for youtube-nocookie storing data in localStorage (#1172)
  Version 1.38.1
  fix bug  where pasting url into address bar clears its content (#1166)
  Version 1.38.0
  Embeded files updated
  ...

# Conflicts:
#	.github/workflows/danger.yml
#	.github/workflows/pr.yml
#	.github/workflows/release.yml
#	.swiftlint.tests.yml
#	.swiftlint.yml
#	.xcode-version
#	Configuration/AppStoreBuildNumber.xcconfig
#	Configuration/Configuration.xcconfig
#	Configuration/Tests/IntegrationTests.xcconfig
#	Configuration/Tests/UnitTests.xcconfig
#	Configuration/Version.xcconfig
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/xcshareddata/xcschemes/DuckDuckGo Privacy Browser App Store.xcscheme
#	DuckDuckGo/API/APIHeaders.swift
#	DuckDuckGo/API/APIRequest.swift
#	DuckDuckGo/App Delegate/UpdateController.swift
#	DuckDuckGo/AppDelegate/AppDelegate.swift
#	DuckDuckGo/AppDelegate/AppIconChanger.swift
#	DuckDuckGo/AppDelegate/URLEventHandler.swift
#	DuckDuckGo/Assets.xcassets/Images/InternalChannelIcon.imageset/Contents.json
#	DuckDuckGo/Autoconsent/AutoconsentUserScript.swift
#	DuckDuckGo/Autoconsent/UI/CookieConsentPopoverManager.swift
#	DuckDuckGo/Autofill/ContentOverlayViewController.swift
#	DuckDuckGo/Bookmarks/Model/BookmarkList.swift
#	DuckDuckGo/Bookmarks/Model/BookmarkManager.swift
#	DuckDuckGo/Bookmarks/Services/BookmarkStore.swift
#	DuckDuckGo/Bookmarks/View/AddBookmarkModalViewController.swift
#	DuckDuckGo/Bookmarks/View/BookmarkListViewController.swift
#	DuckDuckGo/Bookmarks/View/BookmarkManagementDetailViewController.swift
#	DuckDuckGo/Bookmarks/View/BookmarkManagementSidebarViewController.swift
#	DuckDuckGo/Bookmarks/ViewModel/BookmarkViewModel.swift
#	DuckDuckGo/Browser Tab/Extensions/AdClickAttributionTabExtension.swift
#	DuckDuckGo/Browser Tab/Model/Tab.swift
#	DuckDuckGo/Browser Tab/ViewModel/WebViewStateObserver.swift
#	DuckDuckGo/Common/AppVersion.swift
#	DuckDuckGo/Common/Database/Database.swift
#	DuckDuckGo/Common/Extensions/FileManagerExtension.swift
#	DuckDuckGo/Common/Extensions/NSAlertExtension.swift
#	DuckDuckGo/Common/Extensions/NSApplicationExtension.swift
#	DuckDuckGo/Common/Extensions/NSColorExtension.swift
#	DuckDuckGo/Common/Extensions/NSPasteboardExtension.swift
#	DuckDuckGo/Common/Extensions/NSPasteboardItemExtension.swift
#	DuckDuckGo/Common/Extensions/WKUserContentControllerExtension.swift
#	DuckDuckGo/Common/Extensions/WKWebViewExtension.swift
#	DuckDuckGo/Common/Localizables/UserText.swift
#	DuckDuckGo/Common/Logging/Logging.swift
#	DuckDuckGo/Common/Utilities/ErrorWithParameters.swift
#	DuckDuckGo/Common/Utilities/UserDefaultsWrapper.swift
#	DuckDuckGo/Common/View/AppKit/NSSavePanelExtension.swift
#	DuckDuckGo/Configuration/ConfigurationDownloading.swift
#	DuckDuckGo/Configuration/ConfigurationStore.swift
#	DuckDuckGo/ContentBlocker/AppPrivacyConfigurationDataProvider.swift
#	DuckDuckGo/ContentBlocker/AppTrackerDataSetProvider.swift
#	DuckDuckGo/ContentBlocker/macos-config.json
#	DuckDuckGo/ContentBlocker/trackerData.json
#	DuckDuckGo/Data Import/Logins/Firefox/FirefoxBerkeleyDatabaseReader.m
#	DuckDuckGo/Favicons/Model/FaviconManager.swift
#	DuckDuckGo/Feedback/View/FeedbackPresenter.swift
#	DuckDuckGo/File Download/Model/UTType.swift
#	DuckDuckGo/FileDownload/Extensions/WKWebView+Download.swift
#	DuckDuckGo/FileDownload/Model/FileDownloadManager.swift
#	DuckDuckGo/Fire/Model/Fire.swift
#	DuckDuckGo/HomePage/Model/HomePageFavoritesModel.swift
#	DuckDuckGo/HomePage/View/FavoritesView.swift
#	DuckDuckGo/Info.plist
#	DuckDuckGo/Main/View/MainWindowController.swift
#	DuckDuckGo/Menus/MainMenu.storyboard
#	DuckDuckGo/Menus/MainMenu.swift
#	DuckDuckGo/Menus/MainMenuActions.swift
#	DuckDuckGo/Menus/SharingMenu.swift
#	DuckDuckGo/NavigationBar/PinningManager.swift
#	DuckDuckGo/NavigationBar/View/AddressBarButtonsViewController.swift
#	DuckDuckGo/NavigationBar/View/AddressBarTextField.swift
#	DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
#	DuckDuckGo/NavigationBar/View/NavigationBar.storyboard
#	DuckDuckGo/NavigationBar/View/NavigationBarViewController.swift
#	DuckDuckGo/PasswordManager/Bitwarden/Model/BWManagement.swift
#	DuckDuckGo/PasswordManager/Bitwarden/Model/BWManager.swift
#	DuckDuckGo/PasswordManager/Bitwarden/View/BWNotRespondingAlert.swift
#	DuckDuckGo/Preferences/Model/AutofillPreferencesModel.swift
#	DuckDuckGo/Preferences/View/Preferences.swift
#	DuckDuckGo/Preferences/View/PreferencesAutofillView.swift
#	DuckDuckGo/Preferences/View/PreferencesViewController.swift
#	DuckDuckGo/Smarter Encryption/HTTPSBloomFilterSpecification.swift
#	DuckDuckGo/Smarter Encryption/HTTPSUpgrade.swift
#	DuckDuckGo/Smarter Encryption/Store/AppHTTPSUpgradeStore.swift
#	DuckDuckGo/Statistics/ATB/StatisticsLoader.swift
#	DuckDuckGo/Statistics/PixelEvent.swift
#	DuckDuckGo/Statistics/PixelParameters.swift
#	DuckDuckGo/Tab/Model/Tab+Dialogs.swift
#	DuckDuckGo/Tab/Model/Tab+UIDelegate.swift
#	DuckDuckGo/Tab/TabExtensions/TabExtensions.swift
#	DuckDuckGo/Tab/View/BrowserTabViewController.swift
#	DuckDuckGo/TabBar/View/TabBarViewController.swift
#	DuckDuckGo/TabBar/View/TabDragAndDropManager.swift
#	DuckDuckGo/TabBar/ViewModel/TabCollectionViewModel.swift
#	DuckDuckGo/Youtube Player/PrivatePlayer.swift
#	DuckDuckGo/YoutubePlayer/YoutubePlayerUserScript.swift
#	Integration Tests/Autoconsent/AutoconsentBackgroundTests.swift
#	IntegrationTests/autoconsent-test-page-banner.html
#	LocalPackages/SwiftUIExtensions/Sources/SwiftUIExtensions/HoverButton.swift
#	LocalPackages/SwiftUIExtensions/Sources/SwiftUIExtensions/TextButton.swift
#	Packages/NetworkProtectionUI/Tests/NetworkProtectionUITests/NetworkProtectionUITests.swift
#	Submodules/privacy-reference-tests
#	Unit Tests/Browser Tab/Model/TabTests.swift
#	Unit Tests/Configuration/ConfigurationDownloaderTests.swift
#	Unit Tests/User Agent/Model/UserAgentTests.swift
#	Unit Tests/Youtube Player/PrivatePlayerTests.swift
#	UnitTests/App/WindowManagerStateRestorationTests.swift
#	UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift
#	UnitTests/Common/Extensions/FutureExtensionTests.swift
#	UnitTests/Common/FileSystemDSLTests.swift
#	UnitTests/ContentBlocker/AppPrivacyConfigurationTests.swift
#	UnitTests/HomePage/RecentlyVisitedSiteModelTests.swift
#	UnitTests/PrivacyReferenceTests/FireproofingReferenceTests.swift
#	UnitTests/PrivacyReferenceTests/PrivacyReferenceTestHelper.swift
#	fastlane/metadata/default/release_notes.txt
#	scripts/archive.sh
#	set_version.sh
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants