Skip to content

Commit

Permalink
wip places reels
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-ranciaffi committed Dec 16, 2024
1 parent 2dbfe28 commit b1d5d70
Show file tree
Hide file tree
Showing 8 changed files with 863 additions and 53 deletions.
11 changes: 10 additions & 1 deletion Explorer/Assets/DCL/Editor/EntityBrowserWindow.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

660 changes: 660 additions & 0 deletions Explorer/Assets/DCL/ExplorePanel/Assets/ExplorePanelUI.prefab

Large diffs are not rendered by default.

196 changes: 151 additions & 45 deletions Explorer/Assets/DCL/Navmap/Assets/PlacesAndEventsPanel.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -2940,6 +2940,7 @@ GameObject:
- component: {fileID: 7759004361330947247}
- component: {fileID: 4664607407495590862}
- component: {fileID: 704618131798200519}
- component: {fileID: 7200146210527412804}
m_Layer: 5
m_Name: Scrollbar Vertical
m_TagString: Untagged
Expand Down Expand Up @@ -3054,6 +3055,18 @@ MonoBehaviour:
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &7200146210527412804
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1460356527806582751}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bef540126917455dbb8524f7a5c6403d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1462199297278231064
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -19139,8 +19152,6 @@ GameObject:
m_Component:
- component: {fileID: 2102492260123249919}
- component: {fileID: 9154585405177239235}
- component: {fileID: 3756216488557502705}
- component: {fileID: 1743022378764979925}
m_Layer: 5
m_Name: Photos
m_TagString: Untagged
Expand All @@ -19159,14 +19170,15 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 3408424988560092109}
m_Father: {fileID: 4340935152919255707}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 235, y: -292}
m_SizeDelta: {x: 430, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
m_SizeDelta: {x: 430, y: 550}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &9154585405177239235
CanvasRenderer:
m_ObjectHideFlags: 0
Expand All @@ -19175,46 +19187,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8035667016663885416}
m_CullTransparentMesh: 1
--- !u!114 &3756216488557502705
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8035667016663885416}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 1
m_Spacing: 2
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &1743022378764979925
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8035667016663885416}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &8074817390811737702
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -20256,6 +20228,7 @@ MonoBehaviour:
<PhotosTabButton>k__BackingField: {fileID: 8489475166372520332}
<PhotosTabContainer>k__BackingField: {fileID: 8035667016663885416}
<PhotosTabSelected>k__BackingField: {fileID: 5227586704766605664}
<CameraReelGalleryView>k__BackingField: {fileID: 2048196813802253358}
<EventsTabButton>k__BackingField: {fileID: 1251594420067401240}
<EventsTabContainer>k__BackingField: {fileID: 2737486664989542730}
<EventsTabSelected>k__BackingField: {fileID: 6234270080758982578}
Expand Down Expand Up @@ -22669,6 +22642,139 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 2336035712942851721, guid: d565b61885fb1ef41b1582a285e748e9, type: 3}
m_PrefabInstance: {fileID: 2304517796882161491}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2693621050349241493
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2102492260123249919}
m_Modifications:
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4110944459725859003, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: elementMask
value:
objectReference: {fileID: 5830637756907967332}
- target: {fileID: 6526360350117164228, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Name
value: CameraReelGallery
objectReference: {fileID: 0}
- target: {fileID: 9111658648430937670, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Spacing
value: 4
objectReference: {fileID: 0}
- target: {fileID: 9111658648430937670, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Padding.m_Top
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9111658648430937670, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Padding.m_Left
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9111658648430937670, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
propertyPath: m_Padding.m_Bottom
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
--- !u!114 &2048196813802253358 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4110944459725859003, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
m_PrefabInstance: {fileID: 2693621050349241493}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec6735352be14eacb561225405a95c1d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &3408424988560092109 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 733104209777700696, guid: ade6e83ad45fc4c7e81daa5a6e0f7bab, type: 3}
m_PrefabInstance: {fileID: 2693621050349241493}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3386030295544219167
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
5 changes: 4 additions & 1 deletion Explorer/Assets/DCL/Navmap/Navmap.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:98798e6d11df4325a3e60a800a0b5808",
"GUID:b97826ed91484ac1af953a8afc03316e",
"GUID:5ba622ca6fb7e4a03870764b38e5493b"
"GUID:5ba622ca6fb7e4a03870764b38e5493b",
"GUID:f82471a6db95848d88faad2ceb31c9c9",
"GUID:f0968673e9444d64b49cde6a40d7df7a",
"GUID:b5762faee0fa644b38047f2b625378a1"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
23 changes: 18 additions & 5 deletions Explorer/Assets/DCL/Navmap/PlaceInfoPanelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using DCL.Chat.Commands;
using DCL.Chat.MessageBus;
using DCL.EventsApi;
using DCL.InWorldCamera.CameraReelGallery;
using DCL.InWorldCamera.CameraReelStorageService;
using DCL.MapRenderer;
using DCL.MapRenderer.MapLayers.Pins;
using DCL.PlacesAPIService;
Expand Down Expand Up @@ -35,12 +37,14 @@ public class PlaceInfoPanelController
private readonly MultiStateButtonController likeButton;
private readonly MultiStateButtonController favoriteButton;
private readonly List<EventElementView> eventElements = new ();
private readonly CameraReelGalleryController cameraReelGalleryController;
private PlacesData.PlaceInfo? place;
private CancellationTokenSource? favoriteCancellationToken;
private CancellationTokenSource? rateCancellationToken;
private CancellationTokenSource? fetchEventsCancellationToken;
private CancellationTokenSource? attendEventCancellationToken;
private CancellationTokenSource? openEventDetailsCancellationToken;
private CancellationTokenSource? showPlaceGalleryCancellationToken;
private Vector2Int? currentBaseParcel;
private Vector2Int? destination;

Expand All @@ -53,7 +57,11 @@ public PlaceInfoPanelController(PlaceInfoPanelView view,
IEventsApiService eventsApiService,
ObjectPool<EventElementView> eventElementPool,
SharePlacesAndEventsContextMenuController shareContextMenu,
IWebBrowser webBrowser)
IWebBrowser webBrowser,
ICameraReelStorageService? cameraReelStorageService = null,
ICameraReelScreenshotsStorage? cameraReelScreenshotsStorage = null,
ReelGalleryConfigParams? reelGalleryConfigParams = null,
bool? reelUseSignedRequest = null)
{
this.view = view;
this.webRequestController = webRequestController;
Expand All @@ -65,8 +73,12 @@ public PlaceInfoPanelController(PlaceInfoPanelView view,
this.eventElementPool = eventElementPool;
this.shareContextMenu = shareContextMenu;
this.webBrowser = webBrowser;

thumbnailImage = new ImageController(view.Thumbnail, webRequestController);

if (view.CameraReelGalleryView != null)
this.cameraReelGalleryController = new CameraReelGalleryController(view.CameraReelGalleryView, cameraReelStorageService!, cameraReelScreenshotsStorage!, reelGalleryConfigParams!.Value, reelUseSignedRequest!.Value);

mapPathEventBus.OnSetDestination += SetDestination;
mapPathEventBus.OnRemovedDestination += RemoveDestination;

Expand Down Expand Up @@ -165,6 +177,9 @@ public void Toggle(Section section)

foreach (GameObject container in view.OverviewElementsThatShouldBeDisabled)
container.SetActive(section != Section.OVERVIEW);

if (section == Section.PHOTOS)
showPlaceGalleryCancellationToken = showPlaceGalleryCancellationToken.SafeRestart();
}

private void SetCategories(PlacesData.PlaceInfo place)
Expand Down Expand Up @@ -375,10 +390,8 @@ private void ClearEventElements()
eventElements.Clear();
}

private void FetchPhotos()
{
// TODO
}
private void FetchPhotos() =>
cameraReelGalleryController?.ShowPlaceGalleryAsync(place?.id, showPlaceGalleryCancellationToken!.Token).Forget();

public enum Section
{
Expand Down
4 changes: 4 additions & 0 deletions Explorer/Assets/DCL/Navmap/PlaceInfoPanelView.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using DCL.AssetsProvision;
using DCL.InWorldCamera.CameraReelGallery;
using DCL.UI;
using System;
using TMPro;
Expand Down Expand Up @@ -104,6 +105,9 @@ public class PlaceInfoPanelView : MonoBehaviour
[field: SerializeField]
public GameObject PhotosTabSelected { get; private set; }

[field: SerializeField]
public CameraReelGalleryView CameraReelGalleryView { get; private set; }

[field: Header("Events Tab")]
[field: SerializeField]
public Button EventsTabButton { get; private set; }
Expand Down
14 changes: 13 additions & 1 deletion Explorer/Assets/DCL/PluginSystem/Global/ExplorePanelPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ public async UniTask InitializeAsync(ExplorePanelSettings settings, Cancellation

placeInfoPanelController = new PlaceInfoPanelController(navmapView.PlacesAndEventsPanelView.PlaceInfoPanelView,
webRequestController, placesAPIService, mapPathEventBus, navmapBus, chatMessagesBus, eventsApiService,
eventElementsPool, shareContextMenu, webBrowser);
eventElementsPool, shareContextMenu, webBrowser, cameraReelStorageService, cameraReelScreenshotsStorage,
new ReelGalleryConfigParams(settings.PlaceGridLayoutFixedColumnCount, settings.PlaceThumbnailHeight, settings.PlaceThumbnailWidth, false), false);

eventInfoPanelController = new EventInfoPanelController(navmapView.PlacesAndEventsPanelView.EventInfoPanelView,
webRequestController, navmapBus, chatMessagesBus, eventsApiService, eventScheduleElementsPool,
Expand Down Expand Up @@ -513,6 +514,17 @@ public class ExplorePanelSettings : IDCLPluginSettings
[field: SerializeField]
public int ThumbnailWidth { get; private set; }

[field: Header("Place Reel")]

[field: SerializeField]
public int PlaceGridLayoutFixedColumnCount { get; private set; }

[field: SerializeField]
public int PlaceThumbnailHeight { get; private set; }

[field: SerializeField]
public int PlaceThumbnailWidth { get; private set; }

public IReadOnlyCollection<URN> EmbeddedEmotesAsURN() =>
EmbeddedEmotes.Select(s => new URN(s)).ToArray();
}
Expand Down
Loading

0 comments on commit b1d5d70

Please sign in to comment.