Skip to content

Commit da9ff9e

Browse files
committed
feat: refactor nametags to UI Toolkit and add official badge
1 parent 6a3636c commit da9ff9e

File tree

73 files changed

+1809
-3067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1809
-3067
lines changed

Explorer/Assets/AddressableAssetsData/AssetGroups/Essentials.asset

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,6 @@ MonoBehaviour:
225225
m_ReadOnly: 0
226226
m_SerializedLabels: []
227227
FlaggedDuringContentUpdateRestriction: 0
228-
- m_GUID: d65049d6f7a244863b39c4dda5ba538e
229-
m_Address: NametagsData
230-
m_ReadOnly: 0
231-
m_SerializedLabels: []
232-
FlaggedDuringContentUpdateRestriction: 0
233228
- m_GUID: d9a7adc162dc338449107a4654a26d50
234229
m_Address: WorldAudioContainer
235230
m_ReadOnly: 0

Explorer/Assets/AddressableAssetsData/AssetGroups/UI.asset

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ MonoBehaviour:
9090
m_ReadOnly: 0
9191
m_SerializedLabels: []
9292
FlaggedDuringContentUpdateRestriction: 0
93-
- m_GUID: 1d026bc5d9fd448798b32a455c0f3978
94-
m_Address: Nametag
95-
m_ReadOnly: 0
96-
m_SerializedLabels: []
97-
FlaggedDuringContentUpdateRestriction: 0
9893
- m_GUID: 1f557ed079be146f9aeb090104c115c9
9994
m_Address: Assets/DCL/MapRenderer/Addressables/SceneOfInterest.prefab
10095
m_ReadOnly: 0
@@ -215,6 +210,11 @@ MonoBehaviour:
215210
m_ReadOnly: 0
216211
m_SerializedLabels: []
217212
FlaggedDuringContentUpdateRestriction: 0
213+
- m_GUID: 3df1198e2008a4f0abdf407103681813
214+
m_Address: Assets/DCL/NameTags/Assets/NametagUIDocument.prefab
215+
m_ReadOnly: 0
216+
m_SerializedLabels: []
217+
FlaggedDuringContentUpdateRestriction: 0
218218
- m_GUID: 3efe8a48fc3905f47a0648abd6859394
219219
m_Address: MapCameraObject
220220
m_ReadOnly: 0
@@ -565,11 +565,6 @@ MonoBehaviour:
565565
m_ReadOnly: 0
566566
m_SerializedLabels: []
567567
FlaggedDuringContentUpdateRestriction: 0
568-
- m_GUID: b028edf69a2c54c9194c4ce6524befff
569-
m_Address: ChatBubbleConfiguration
570-
m_ReadOnly: 0
571-
m_SerializedLabels: []
572-
FlaggedDuringContentUpdateRestriction: 0
573568
- m_GUID: b54d9d4189903c2438fa811308f14ceb
574569
m_Address: MapConfiguration
575570
m_ReadOnly: 0

Explorer/Assets/DCL/FeatureFlags/FeatureFlagsStrings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public static class FeatureFlagsStrings
2626
public const string CHAT_HISTORY_LOCAL_STORAGE = "alfa-chat-history-local-storage";
2727
public const string VOICE_CHAT = "alfa-voice-chat";
2828
public const string COMMUNITY_VOICE_CHAT = "alfa-community-voice-chat";
29+
public const string OFFICIAL_WALLETS = "official-wallets";
2930
public const string CAMERA_REEL = "alfa-camera-reel";
3031
public const string FRIENDS = "alfa-friends";
3132
public const string FRIENDS_USER_BLOCKING = "alfa-friends-user-blocking";

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/BootstrapAnalyticsDecorator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using SceneRunner.Debugging;
1515
using Segment.Serialization;
1616
using System;
17+
using System.Collections.Generic;
1718
using System.Threading;
1819
using UnityEngine.UIElements;
1920
using Utility;
@@ -78,11 +79,12 @@ CancellationToken ct
7879
IAppArgs appArgs,
7980
ICoroutineRunner coroutineRunner,
8081
DCLVersion dclVersion,
82+
HashSet<string> officialWallets,
8183
CancellationToken ct)
8284
{
8385
(DynamicWorldContainer? container, bool) result =
8486
await core.LoadDynamicWorldContainerAsync(bootstrapContainer, staticContainer, scenePluginSettingsContainer,
85-
settings, dynamicSettings, backgroundMusic, worldInfoTool, playerEntity, appArgs, coroutineRunner, dclVersion, ct);
87+
settings, dynamicSettings, backgroundMusic, worldInfoTool, playerEntity, appArgs, coroutineRunner, dclVersion, officialWallets, ct);
8688

8789
analytics.Track(General.INITIAL_LOADING, new JsonObject
8890
{

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Bootstraper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
using SceneRuntime.Factory.JsSource;
3434
using SceneRuntime.Factory.WebSceneSource;
3535
using System;
36+
using System.Collections.Generic;
3637
using System.Threading;
3738
using UnityEngine;
3839
using UnityEngine.UIElements;
@@ -140,6 +141,7 @@ await StaticContainer.CreateAsync(
140141
IAppArgs appArgs,
141142
ICoroutineRunner coroutineRunner,
142143
DCLVersion dclVersion,
144+
HashSet<string> officialWallets,
143145
CancellationToken ct)
144146
{
145147
dynamicWorldDependencies = new DynamicWorldDependencies
@@ -180,6 +182,7 @@ await StaticContainer.CreateAsync(
180182
coroutineRunner,
181183
dclVersion,
182184
realmUrls,
185+
officialWallets,
183186
ct);
184187

185188
if (tuple.container != null)

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/DynamicWorldContainer.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public override void Dispose()
195195
ICoroutineRunner coroutineRunner,
196196
DCLVersion dclVersion,
197197
RealmUrls realmUrls,
198+
HashSet<string> officialWallets,
198199
CancellationToken ct)
199200
{
200201
DynamicSettings dynamicSettings = dynamicWorldDependencies.DynamicSettings;
@@ -293,7 +294,6 @@ await LODContainer
293294
IWebBrowser webBrowser = bootstrapContainer.WebBrowser;
294295
ISystemClipboard clipboard = new UnityClipboard();
295296
NameColorHelper.SetNameColors(dynamicSettings.UserNameColors);
296-
NametagsData nametagsData = (await assetsProvisioner.ProvideMainAssetAsync(dynamicSettings.NametagsData, ct)).Value;
297297

298298
ChatSharedAreaEventBus chatSharedAreaEventBus = new ChatSharedAreaEventBus();
299299

@@ -712,10 +712,11 @@ await MapRendererContainer
712712
staticContainer.MainPlayerAvatarBaseProxy,
713713
debugBuilder,
714714
staticContainer.CacheCleaner,
715-
nametagsData,
715+
dynamicSettings.NametagsData,
716716
defaultTexturesContainer.TextureArrayContainerFactory,
717717
wearableCatalog,
718-
userBlockingCacheProxy),
718+
userBlockingCacheProxy,
719+
officialWallets),
719720
new MainUIPlugin(mvcManager, mainUIView, includeFriends),
720721
new ProfilePlugin(profileRepository, profileCache, staticContainer.CacheCleaner),
721722
new MapRendererPlugin(mapRendererContainer.MapRenderer),
@@ -738,7 +739,7 @@ await MapRendererContainer
738739
chatMessagesBus,
739740
chatHistory,
740741
entityParticipantTable,
741-
nametagsData,
742+
dynamicSettings.NametagsData,
742743
mainUIView,
743744
staticContainer.InputBlock,
744745
globalWorld,
@@ -1004,7 +1005,7 @@ await MapRendererContainer
10041005
mainUIView.SidebarView.EnsureNotNull().InWorldCameraButton,
10051006
globalWorld,
10061007
debugBuilder,
1007-
nametagsData,
1008+
dynamicSettings.NametagsData,
10081009
profileRepositoryWrapper,
10091010
sharedSpaceManager,
10101011
identityCache,

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/IBootstrap.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Threading;
1313
using DCL.FeatureFlags;
1414
using Global.Versioning;
15+
using System.Collections.Generic;
1516
using UnityEngine.UIElements;
1617
using Utility;
1718

@@ -43,6 +44,7 @@ CancellationToken ct
4344
IAppArgs appArgs,
4445
ICoroutineRunner coroutineRunner,
4546
DCLVersion dclVersion,
47+
HashSet<string> officialWallets,
4648
CancellationToken ct);
4749

4850
UniTask<bool> InitializePluginsAsync(StaticContainer staticContainer, DynamicWorldContainer dynamicWorldContainer,

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/MainSceneLoader.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DCL.AssetsProvision;
1010
using DCL.Audio;
1111
using DCL.AuthenticationScreenFlow;
12+
using DCL.AvatarRendering.AvatarShape;
1213
using DCL.Browser;
1314
using DCL.Browser.DecentralandUrls;
1415
using DCL.DebugUtilities;
@@ -50,6 +51,8 @@
5051
using DCL.Settings.ModuleControllers;
5152
using DCL.Utility;
5253
using DCL.Utility.Types;
54+
using System.Collections.Generic;
55+
using TMPro;
5356
#if UNITY_EDITOR
5457
#endif
5558
using UnityEngine;
@@ -224,6 +227,18 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id
224227
bootstrap.ApplyFeatureFlagConfigs(FeatureFlagsConfiguration.Instance);
225228
staticContainer.SceneLoadingLimit.SetEnabled(FeatureFlagsConfiguration.Instance.IsEnabled(FeatureFlagsStrings.SCENE_MEMORY_LIMIT));
226229

230+
HashSet<string> officialWallets = new HashSet<string>();
231+
if (FeatureFlagsConfiguration.Instance.TryGetCsvPayload(FeatureFlagsStrings.OFFICIAL_WALLETS, FeatureFlagsStrings.WALLETS_VARIANT, out var csv))
232+
{
233+
foreach (string wallet in csv[0])
234+
{
235+
officialWallets.Add(wallet);
236+
}
237+
}
238+
239+
officialWallets.Add("0x3f574d05ec670fe2c92305480b175654ca512005");
240+
officialWallets.Add("0xa078291314bc4369035453f803a21d003badf548");
241+
227242
(dynamicWorldContainer, isLoaded) = await bootstrap.LoadDynamicWorldContainerAsync(
228243
bootstrapContainer,
229244
staticContainer!,
@@ -236,6 +251,7 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id
236251
applicationParametersParser,
237252
coroutineRunner: this,
238253
dclVersion,
254+
officialWallets,
239255
destroyCancellationToken);
240256

241257
if (!isLoaded)

Explorer/Assets/DCL/Infrastructure/Utility/UIToolkit/VisualElementsExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ public static class VisualElementsExtensions
88
public static void SetDisplayed(this VisualElement ve, bool displayed) =>
99
ve.style.display = displayed ? DisplayStyle.Flex : DisplayStyle.None;
1010

11+
public static bool IsDisplayed(this VisualElement ve) =>
12+
ve.style.display == DisplayStyle.Flex;
13+
1114
public static T InstantiateForElement<T>(this VisualTreeAsset asset) where T: VisualElement =>
1215
asset.Instantiate().Q<T>();
1316

Explorer/Assets/DCL/Multiplayer/Connections/Systems/DebugRoomsSystem.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ public DebugRoomsSystem(
3838
IActivatableConnectiveRoom voiceChatRoom,
3939
IReadOnlyEntityParticipantTable entityParticipantTable,
4040
IRemoteMetadata remoteMetadata,
41-
IDebugContainerBuilder debugBuilder,
42-
IObjectPool<DebugRoomIndicatorView> roomIndicatorPool) : base(world)
41+
IDebugContainerBuilder debugBuilder) : base(world)
4342
{
4443
this.roomsStatus = roomsStatus;
4544
this.entityParticipantTable = entityParticipantTable;
46-
this.roomIndicatorPool = roomIndicatorPool;
4745

4846
DebugWidgetBuilder? infoWidget = debugBuilder.TryAddWidget(IDebugContainerBuilder.Categories.ROOM_INFO);
4947
enabled = infoWidget != null;

0 commit comments

Comments
 (0)