Skip to content

Commit

Permalink
fix: search bar shortcut block (#3153)
Browse files Browse the repository at this point in the history
* feat: re-enable shortcuts when exiting explore panel

* fix: gitignore for addressables and user settings

* fix: clear focus / selected object when closing main menu
  • Loading branch information
mihakrajnc authored Jan 20, 2025
1 parent 27210dc commit 8c16219
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 199 deletions.
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,7 @@ sysinfo.txt
# Crashlytics generated file
crashlytics-build.properties

Explorer/UserSettings/Layouts

# Addressables temporary data
Explorer/Assets/AddressableAssetsData/Windows/**
Explorer/Assets/AddressableAssetsData/Windows/*.meta
Explorer/Assets/AddressableAssetsData/Windows.meta
Explorer/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
Explorer/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta
Explorer/UserSettings

# OS generated
.DS_Store
Expand Down
11 changes: 6 additions & 5 deletions Explorer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ crashlytics-build.properties
# Sentry
.sentryconfig.json

# Addressables
Assets/AddressableAssetsData/OSX/
Assets/AddressableAssetsData/OSX.meta
Assets/AddressableAssetsData/Windows/
Assets/AddressableAssetsData/Windows.meta
# Addressables temporary data
Assets/AddressableAssetsData/Windows/**
Assets/AddressableAssetsData/Windows/*.meta
Assets/AddressableAssetsData/Windows.meta
Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta
5 changes: 5 additions & 0 deletions Explorer/Assets/DCL/ExplorePanel/ExplorePanelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using Utility;

Expand Down Expand Up @@ -196,6 +197,10 @@ private void OnCameraReelHotkeyPressed(InputAction.CallbackContext ctx)

private void OnCloseMainMenu(InputAction.CallbackContext obj)
{
// Search bar could be focused when closing the menu, so we need to remove the focus,
// which will also re-enable shortcuts
EventSystem.current.SetSelectedGameObject(null);

profileMenuController.HideViewAsync(CancellationToken.None).Forget();
isControlClosing = true;
}
Expand Down
6 changes: 0 additions & 6 deletions Explorer/Assets/DCL/Navmap/NavmapSearchBarController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class NavmapSearchBarController : IDisposable

private CancellationTokenSource? searchCancellationToken;
private CancellationTokenSource? backCancellationToken;
private bool isAlreadySelected;
private NavmapSearchPlaceFilter currentPlaceFilter = NavmapSearchPlaceFilter.All;
private NavmapSearchPlaceSorting currentPlaceSorting = NavmapSearchPlaceSorting.MostActive;
private string? currentCategory;
Expand Down Expand Up @@ -172,11 +171,6 @@ await navmapBus.SearchForPlaceAsync(INavmapBus.SearchPlaceParams.CreateWithDefau

private void OnSearchBarSelected(bool isSelected)
{
if (isSelected == isAlreadySelected)
return;

isAlreadySelected = isSelected;

if (isSelected)
{
inputBlock.Disable(InputMapComponent.Kind.SHORTCUTS, InputMapComponent.Kind.IN_WORLD_CAMERA);
Expand Down
77 changes: 0 additions & 77 deletions Explorer/UserSettings/EditorUserSettings.asset

This file was deleted.

13 changes: 0 additions & 13 deletions Explorer/UserSettings/Search.index

This file was deleted.

90 changes: 0 additions & 90 deletions Explorer/UserSettings/Search.settings

This file was deleted.

0 comments on commit 8c16219

Please sign in to comment.