From 268f2f174bd7eaaff0691218ffa77c29c06f16ee Mon Sep 17 00:00:00 2001 From: Pravus Date: Fri, 27 Oct 2023 02:05:17 +0200 Subject: [PATCH 01/10] base 'on submit' event handling logic --- .../UIComponentsUtils/UIPointerEventsUtils.cs | 9 ++-- .../ECSComponents/UIInput/UIInputHandler.cs | 45 +++++++++++++++++-- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/UIPointerEventsUtils.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/UIPointerEventsUtils.cs index 35bbf69ea6..dc0a74f1e8 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/UIPointerEventsUtils.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/UIPointerEventsUtils.cs @@ -2,7 +2,6 @@ using DCL.ECS7.ComponentWrapper; using DCL.ECS7.InternalComponents; using DCL.Models; -using Google.Protobuf; using System; using System.Collections.Generic; using UnityEngine.UIElements; @@ -23,8 +22,12 @@ public static EventCallback RegisterFeedback( EventCallback callback = evt => { var model = inputResults.GetFor(scene, entity)?.model ?? new InternalUIInputResults(new Queue()); - model.Results.Enqueue(new InternalUIInputResults.Result(createResult(evt), resultComponentId)); - inputResults.PutFor(scene, entity, model); + var result = createResult(evt); + if (result != null) + { + model.Results.Enqueue(new InternalUIInputResults.Result(result, resultComponentId)); + inputResults.PutFor(scene, entity, model); + } }; uiElement.RegisterCallback(callback); diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index c4a89866ee..0b058c4638 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -1,4 +1,5 @@ -using DCL.Controllers; +using Castle.Core.Logging; +using DCL.Controllers; using DCL.ECS7.ComponentWrapper; using DCL.ECS7.ComponentWrapper.Generic; using DCL.ECS7.InternalComponents; @@ -7,6 +8,7 @@ using DCL.ECSRuntime; using DCL.Models; using DCL.UIElements; +using UnityEngine; using UnityEngine.UIElements; namespace DCL.ECSComponents.UIInput @@ -23,6 +25,7 @@ public class UIInputHandler : UIElementHandlerBase, IECSComponentHandler> componentPool; private EventCallback> onValueChanged; + private EventCallback onSubmit; internal TextField uiElement { get; private set; } @@ -61,19 +64,55 @@ public void OnComponentCreated(IParcelScene scene, IDCLEntity entity) entity, uiElement, resultComponentId); + + // Can be optimized using (a lot less calls) but somehow checking the + // last keycode read from user input, exiting if it's not KeyCode.Return + onSubmit = UIPointerEventsUtils + .RegisterFeedback + (inputResults, + CreateInputResultOnSubmit, + scene, + entity, + uiElement, + resultComponentId); + + /*uiElement.RegisterCallback(ev => + { + if (ev.keyCode != KeyCode.Return) return; + + Debug.Log($"ENTER KEY EVENT! - submitted string: {uiElement.value}"); + });*/ + + /*uiElement.RegisterCallback(ev => + { + Debug.Log($"NAV SUBMIT EVENT! - submitted string: {uiElement.value}"); + });*/ + } + + private IPooledWrappedComponent CreateInputResult(ChangeEvent evt) + { + var componentPooled = componentPool.Get(); + var componentModel = componentPooled.WrappedComponent.Model; + componentModel.Value = evt.newValue; + return componentPooled; } - private IPooledWrappedComponent CreateInputResult(ChangeEvent onValueChange) + private IPooledWrappedComponent CreateInputResultOnSubmit(KeyDownEvent evt) { + if (evt.keyCode != KeyCode.Return) return null; + var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; - componentModel.Value = onValueChange.newValue; + componentModel.Value = uiElement.value; + // TODO: set 'isSubmit' + uiElement.value = string.Empty; return componentPooled; } public void OnComponentRemoved(IParcelScene scene, IDCLEntity entity) { uiElement.UnregisterFeedback(onValueChanged); + uiElement.UnregisterFeedback(onSubmit); RemoveElementFromRoot(scene, entity, uiElement); uiElement = null; fontUpdater.Dispose(); From c0f2d1ce8db6390989aceb1c772f966cda4ef26e Mon Sep 17 00:00:00 2001 From: Pravus Date: Fri, 27 Oct 2023 12:01:11 +0200 Subject: [PATCH 02/10] pointed protocol to related pr version and rebuilt --- scripts/package-lock.json | 14 +- scripts/package.json | 2 +- .../DCL/DecentralandProtocol/Analytics.gen.cs | 374 +----------------- .../kernel_services/AnalyticsService.gen.cs | 3 - .../ClientAnalyticsService.gen.cs | 7 - .../DecentralandProtocol/UiInputResult.gen.cs | 64 ++- 6 files changed, 81 insertions(+), 383 deletions(-) diff --git a/scripts/package-lock.json b/scripts/package-lock.json index 9ee3765a50..8fa5ef082a 100644 --- a/scripts/package-lock.json +++ b/scripts/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@dcl/protocol": "^1.0.0-6590614146.commit-db4a595", + "@dcl/protocol": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1", @@ -36,9 +36,10 @@ } }, "node_modules/@dcl/protocol": { - "version": "1.0.0-6590614146.commit-db4a595", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-6590614146.commit-db4a595.tgz", - "integrity": "sha512-BaLAj9GPiAz/S4oNSgD28oEfdsDviDZgDOL8kPoZ+6NQ6H4FjnHTVr1AS7Sy7Evw1K77l3OfPPMjwN1IvaIygw==", + "version": "1.0.0-6665576309.commit-fbefe5d", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", + "integrity": "sha512-Pe7iQCs5wL66R8qL647P2mdZktU4ZGEE8/S9GJ5F9YxMTcz/XLQijZzxOBiL0ujXfCH1n/hAyIQHxmig4OTRQg==", + "license": "Apache-2.0", "dependencies": { "@dcl/ts-proto": "1.154.0" } @@ -569,9 +570,8 @@ } }, "@dcl/protocol": { - "version": "1.0.0-6590614146.commit-db4a595", - "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-6590614146.commit-db4a595.tgz", - "integrity": "sha512-BaLAj9GPiAz/S4oNSgD28oEfdsDviDZgDOL8kPoZ+6NQ6H4FjnHTVr1AS7Sy7Evw1K77l3OfPPMjwN1IvaIygw==", + "version": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", + "integrity": "sha512-Pe7iQCs5wL66R8qL647P2mdZktU4ZGEE8/S9GJ5F9YxMTcz/XLQijZzxOBiL0ujXfCH1n/hAyIQHxmig4OTRQg==", "requires": { "@dcl/ts-proto": "1.154.0" } diff --git a/scripts/package.json b/scripts/package.json index d0158af217..5bfb4e0dc9 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -16,7 +16,7 @@ "typescript": "^4.2.3" }, "dependencies": { - "@dcl/protocol": "^1.0.0-6590614146.commit-db4a595", + "@dcl/protocol": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1", diff --git a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Analytics.gen.cs b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Analytics.gen.cs index 7e37326dd2..7939b03a71 100644 --- a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Analytics.gen.cs +++ b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Analytics.gen.cs @@ -52,23 +52,18 @@ static AnalyticsReflection() { "cnR5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCSJ4ChVBbmFseXRpY3NF", "dmVudFJlcXVlc3QSEgoKZXZlbnRfbmFtZRgBIAEoCRJLCgpwcm9wZXJ0aWVz", "GAIgAygLMjcuZGVjZW50cmFsYW5kLnJlbmRlcmVyLmtlcm5lbF9zZXJ2aWNl", - "cy5BbmFseXRpY1Byb3BlcnR5IhgKFkFuYWx5dGljc0V2ZW50UmVzcG9uc2Ui", - "KQoWRGVsaWdodGVkU3VydmV5UmVxdWVzdBIPCgdlbmFibGVkGAEgASgIIhkK", - "F0RlbGlnaHRlZFN1cnZleVJlc3BvbnNlMvwEChZBbmFseXRpY3NLZXJuZWxT", - "ZXJ2aWNlEpgBChFQZXJmb3JtYW5jZVJlcG9ydBI/LmRlY2VudHJhbGFuZC5y", - "ZW5kZXJlci5rZXJuZWxfc2VydmljZXMuUGVyZm9ybWFuY2VSZXBvcnRSZXF1", - "ZXN0GkAuZGVjZW50cmFsYW5kLnJlbmRlcmVyLmtlcm5lbF9zZXJ2aWNlcy5Q", - "ZXJmb3JtYW5jZVJlcG9ydFJlc3BvbnNlIgASlQEKEFN5c3RlbUluZm9SZXBv", - "cnQSPi5kZWNlbnRyYWxhbmQucmVuZGVyZXIua2VybmVsX3NlcnZpY2VzLlN5", - "c3RlbUluZm9SZXBvcnRSZXF1ZXN0Gj8uZGVjZW50cmFsYW5kLnJlbmRlcmVy", - "Lmtlcm5lbF9zZXJ2aWNlcy5TeXN0ZW1JbmZvUmVwb3J0UmVzcG9uc2UiABKP", - "AQoOQW5hbHl0aWNzRXZlbnQSPC5kZWNlbnRyYWxhbmQucmVuZGVyZXIua2Vy", - "bmVsX3NlcnZpY2VzLkFuYWx5dGljc0V2ZW50UmVxdWVzdBo9LmRlY2VudHJh", - "bGFuZC5yZW5kZXJlci5rZXJuZWxfc2VydmljZXMuQW5hbHl0aWNzRXZlbnRS", - "ZXNwb25zZSIAEpwBChlTZXREZWxpZ2h0ZWRTdXJ2ZXlFbmFibGVkEj0uZGVj", - "ZW50cmFsYW5kLnJlbmRlcmVyLmtlcm5lbF9zZXJ2aWNlcy5EZWxpZ2h0ZWRT", - "dXJ2ZXlSZXF1ZXN0Gj4uZGVjZW50cmFsYW5kLnJlbmRlcmVyLmtlcm5lbF9z", - "ZXJ2aWNlcy5EZWxpZ2h0ZWRTdXJ2ZXlSZXNwb25zZSIAYgZwcm90bzM=")); + "cy5BbmFseXRpY1Byb3BlcnR5IhgKFkFuYWx5dGljc0V2ZW50UmVzcG9uc2Uy", + "3QMKFkFuYWx5dGljc0tlcm5lbFNlcnZpY2USmAEKEVBlcmZvcm1hbmNlUmVw", + "b3J0Ej8uZGVjZW50cmFsYW5kLnJlbmRlcmVyLmtlcm5lbF9zZXJ2aWNlcy5Q", + "ZXJmb3JtYW5jZVJlcG9ydFJlcXVlc3QaQC5kZWNlbnRyYWxhbmQucmVuZGVy", + "ZXIua2VybmVsX3NlcnZpY2VzLlBlcmZvcm1hbmNlUmVwb3J0UmVzcG9uc2Ui", + "ABKVAQoQU3lzdGVtSW5mb1JlcG9ydBI+LmRlY2VudHJhbGFuZC5yZW5kZXJl", + "ci5rZXJuZWxfc2VydmljZXMuU3lzdGVtSW5mb1JlcG9ydFJlcXVlc3QaPy5k", + "ZWNlbnRyYWxhbmQucmVuZGVyZXIua2VybmVsX3NlcnZpY2VzLlN5c3RlbUlu", + "Zm9SZXBvcnRSZXNwb25zZSIAEo8BCg5BbmFseXRpY3NFdmVudBI8LmRlY2Vu", + "dHJhbGFuZC5yZW5kZXJlci5rZXJuZWxfc2VydmljZXMuQW5hbHl0aWNzRXZl", + "bnRSZXF1ZXN0Gj0uZGVjZW50cmFsYW5kLnJlbmRlcmVyLmtlcm5lbF9zZXJ2", + "aWNlcy5BbmFseXRpY3NFdmVudFJlc3BvbnNlIgBiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { @@ -78,9 +73,7 @@ static AnalyticsReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.SystemInfoReportResponse), global::Decentraland.Renderer.KernelServices.SystemInfoReportResponse.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.AnalyticProperty), global::Decentraland.Renderer.KernelServices.AnalyticProperty.Parser, new[]{ "Key", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.AnalyticsEventRequest), global::Decentraland.Renderer.KernelServices.AnalyticsEventRequest.Parser, new[]{ "EventName", "Properties" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.AnalyticsEventResponse), global::Decentraland.Renderer.KernelServices.AnalyticsEventResponse.Parser, null, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.DelightedSurveyRequest), global::Decentraland.Renderer.KernelServices.DelightedSurveyRequest.Parser, new[]{ "Enabled" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.DelightedSurveyResponse), global::Decentraland.Renderer.KernelServices.DelightedSurveyResponse.Parser, null, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Renderer.KernelServices.AnalyticsEventResponse), global::Decentraland.Renderer.KernelServices.AnalyticsEventResponse.Parser, null, null, null, null, null) })); } #endregion @@ -2436,347 +2429,6 @@ public void MergeFrom(pb::CodedInputStream input) { } - public sealed partial class DelightedSurveyRequest : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DelightedSurveyRequest()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Decentraland.Renderer.KernelServices.AnalyticsReflection.Descriptor.MessageTypes[7]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DelightedSurveyRequest() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DelightedSurveyRequest(DelightedSurveyRequest other) : this() { - enabled_ = other.enabled_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DelightedSurveyRequest Clone() { - return new DelightedSurveyRequest(this); - } - - /// Field number for the "enabled" field. - public const int EnabledFieldNumber = 1; - private bool enabled_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Enabled { - get { return enabled_; } - set { - enabled_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as DelightedSurveyRequest); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(DelightedSurveyRequest other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Enabled != other.Enabled) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Enabled != false) hash ^= Enabled.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (Enabled != false) { - output.WriteRawTag(8); - output.WriteBool(Enabled); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Enabled != false) { - output.WriteRawTag(8); - output.WriteBool(Enabled); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Enabled != false) { - size += 1 + 1; - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(DelightedSurveyRequest other) { - if (other == null) { - return; - } - if (other.Enabled != false) { - Enabled = other.Enabled; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Enabled = input.ReadBool(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - Enabled = input.ReadBool(); - break; - } - } - } - } - #endif - - } - - public sealed partial class DelightedSurveyResponse : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DelightedSurveyResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Decentraland.Renderer.KernelServices.AnalyticsReflection.Descriptor.MessageTypes[8]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DelightedSurveyResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DelightedSurveyResponse(DelightedSurveyResponse other) : this() { - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DelightedSurveyResponse Clone() { - return new DelightedSurveyResponse(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as DelightedSurveyResponse); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(DelightedSurveyResponse other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(DelightedSurveyResponse other) { - if (other == null) { - return; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - } - } - } - #endif - - } - #endregion } diff --git a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/AnalyticsService.gen.cs b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/AnalyticsService.gen.cs index b96d7af9d5..a7f305b874 100644 --- a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/AnalyticsService.gen.cs +++ b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/AnalyticsService.gen.cs @@ -18,8 +18,6 @@ public interface IAnalyticsKernelService UniTask AnalyticsEvent(AnalyticsEventRequest request, Context context, CancellationToken ct); - UniTask SetDelightedSurveyEnabled(DelightedSurveyRequest request, Context context, CancellationToken ct); - } public static class AnalyticsKernelServiceCodeGen @@ -33,7 +31,6 @@ public static void RegisterService(RpcServerPort port, IAnalyt result.definition.Add("PerformanceReport", async (payload, context, ct) => { var res = await service.PerformanceReport(PerformanceReportRequest.Parser.ParseFrom(payload), context, ct); return res?.ToByteString(); }); result.definition.Add("SystemInfoReport", async (payload, context, ct) => { var res = await service.SystemInfoReport(SystemInfoReportRequest.Parser.ParseFrom(payload), context, ct); return res?.ToByteString(); }); result.definition.Add("AnalyticsEvent", async (payload, context, ct) => { var res = await service.AnalyticsEvent(AnalyticsEventRequest.Parser.ParseFrom(payload), context, ct); return res?.ToByteString(); }); - result.definition.Add("SetDelightedSurveyEnabled", async (payload, context, ct) => { var res = await service.SetDelightedSurveyEnabled(DelightedSurveyRequest.Parser.ParseFrom(payload), context, ct); return res?.ToByteString(); }); port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result)); } diff --git a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/ClientAnalyticsService.gen.cs b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/ClientAnalyticsService.gen.cs index d8574828c0..ba03b1d33e 100644 --- a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/ClientAnalyticsService.gen.cs +++ b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/kernel_services/ClientAnalyticsService.gen.cs @@ -14,8 +14,6 @@ public interface IClientAnalyticsKernelService UniTask SystemInfoReport(SystemInfoReportRequest request); UniTask AnalyticsEvent(AnalyticsEventRequest request); - - UniTask SetDelightedSurveyEnabled(DelightedSurveyRequest request); } public class ClientAnalyticsKernelService : IClientAnalyticsKernelService @@ -43,10 +41,5 @@ public UniTask AnalyticsEvent(AnalyticsEventRequest requ return module.CallUnaryProcedure("AnalyticsEvent", request); } - public UniTask SetDelightedSurveyEnabled(DelightedSurveyRequest request) - { - return module.CallUnaryProcedure("SetDelightedSurveyEnabled", request); - } - } } diff --git a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/UiInputResult.gen.cs b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/UiInputResult.gen.cs index f71c549904..b44e890d00 100644 --- a/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/UiInputResult.gen.cs +++ b/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/UiInputResult.gen.cs @@ -25,13 +25,14 @@ static UiInputResultReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CjFkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdWlfaW5wdXRfcmVzdWx0", - "LnByb3RvEhtkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMiIAoPUEJVaUlu", - "cHV0UmVzdWx0Eg0KBXZhbHVlGAEgASgJQhSqAhFEQ0wuRUNTQ29tcG9uZW50", - "c2IGcHJvdG8z")); + "LnByb3RvEhtkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMiRgoPUEJVaUlu", + "cHV0UmVzdWx0Eg0KBXZhbHVlGAEgASgJEhYKCWlzX3N1Ym1pdBgCIAEoCEgA", + "iAEBQgwKCl9pc19zdWJtaXRCFKoCEURDTC5FQ1NDb21wb25lbnRzYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBUiInputResult), global::DCL.ECSComponents.PBUiInputResult.Parser, new[]{ "Value" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBUiInputResult), global::DCL.ECSComponents.PBUiInputResult.Parser, new[]{ "Value", "IsSubmit" }, new[]{ "IsSubmit" }, null, null, null) })); } #endregion @@ -45,6 +46,7 @@ public sealed partial class PBUiInputResult : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PBUiInputResult()); private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } @@ -72,7 +74,9 @@ public PBUiInputResult() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PBUiInputResult(PBUiInputResult other) : this() { + _hasBits0 = other._hasBits0; value_ = other.value_; + isSubmit_ = other.isSubmit_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -94,6 +98,34 @@ public string Value { } } + /// Field number for the "is_submit" field. + public const int IsSubmitFieldNumber = 2; + private bool isSubmit_; + /// + /// default: false + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsSubmit { + get { if ((_hasBits0 & 1) != 0) { return isSubmit_; } else { return false; } } + set { + _hasBits0 |= 1; + isSubmit_ = value; + } + } + /// Gets whether the "is_submit" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasIsSubmit { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "is_submit" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearIsSubmit() { + _hasBits0 &= ~1; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -110,6 +142,7 @@ public bool Equals(PBUiInputResult other) { return true; } if (Value != other.Value) return false; + if (IsSubmit != other.IsSubmit) return false; return Equals(_unknownFields, other._unknownFields); } @@ -118,6 +151,7 @@ public bool Equals(PBUiInputResult other) { public override int GetHashCode() { int hash = 1; if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (HasIsSubmit) hash ^= IsSubmit.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -140,6 +174,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(10); output.WriteString(Value); } + if (HasIsSubmit) { + output.WriteRawTag(16); + output.WriteBool(IsSubmit); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -154,6 +192,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(10); output.WriteString(Value); } + if (HasIsSubmit) { + output.WriteRawTag(16); + output.WriteBool(IsSubmit); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -167,6 +209,9 @@ public int CalculateSize() { if (Value.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); } + if (HasIsSubmit) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -182,6 +227,9 @@ public void MergeFrom(PBUiInputResult other) { if (other.Value.Length != 0) { Value = other.Value; } + if (other.HasIsSubmit) { + IsSubmit = other.IsSubmit; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -201,6 +249,10 @@ public void MergeFrom(pb::CodedInputStream input) { Value = input.ReadString(); break; } + case 16: { + IsSubmit = input.ReadBool(); + break; + } } } #endif @@ -220,6 +272,10 @@ public void MergeFrom(pb::CodedInputStream input) { Value = input.ReadString(); break; } + case 16: { + IsSubmit = input.ReadBool(); + break; + } } } } From f34357715e3a6afb1f10da0a6ff7869d39677b9d Mon Sep 17 00:00:00 2001 From: Pravus Date: Fri, 27 Oct 2023 12:01:43 +0200 Subject: [PATCH 03/10] implemented 'IsSubmit' property usage --- .../DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index 0b058c4638..1687ad11a8 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -94,6 +94,7 @@ private IPooledWrappedComponent CreateInputResult(ChangeEvent evt) var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; componentModel.Value = evt.newValue; + componentModel.IsSubmit = false; return componentPooled; } @@ -104,8 +105,10 @@ private IPooledWrappedComponent CreateInputResultOnSubmit(KeyDownEvent evt) var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; componentModel.Value = uiElement.value; - // TODO: set 'isSubmit' + componentModel.IsSubmit = true; + uiElement.value = string.Empty; + return componentPooled; } From d1c86294d787638bcd94dd159e4082fe175679cb Mon Sep 17 00:00:00 2001 From: Pravus Date: Fri, 27 Oct 2023 19:48:07 +0200 Subject: [PATCH 04/10] updated approach; Propagation misses last char, still WIP --- .../ECSComponents/UIInput/UIInputHandler.cs | 55 +++++-------------- 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index 1687ad11a8..6fe58678c1 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -1,5 +1,4 @@ -using Castle.Core.Logging; -using DCL.Controllers; +using DCL.Controllers; using DCL.ECS7.ComponentWrapper; using DCL.ECS7.ComponentWrapper.Generic; using DCL.ECS7.InternalComponents; @@ -24,8 +23,7 @@ public class UIInputHandler : UIElementHandlerBase, IECSComponentHandler> componentPool; - private EventCallback> onValueChanged; - private EventCallback onSubmit; + private EventCallback onValueChanged; internal TextField uiElement { get; private set; } @@ -57,57 +55,33 @@ public void OnComponentCreated(IParcelScene scene, IDCLEntity entity) fontUpdater = new UIFontUpdater(uiElement, fontPromiseKeeper); onValueChanged = UIPointerEventsUtils - .RegisterFeedback> - (inputResults, - CreateInputResult, - scene, - entity, - uiElement, - resultComponentId); - - // Can be optimized using (a lot less calls) but somehow checking the - // last keycode read from user input, exiting if it's not KeyCode.Return - onSubmit = UIPointerEventsUtils .RegisterFeedback (inputResults, - CreateInputResultOnSubmit, + CreateInputResult, scene, entity, uiElement, resultComponentId); - - /*uiElement.RegisterCallback(ev => - { - if (ev.keyCode != KeyCode.Return) return; - - Debug.Log($"ENTER KEY EVENT! - submitted string: {uiElement.value}"); - });*/ - - /*uiElement.RegisterCallback(ev => - { - Debug.Log($"NAV SUBMIT EVENT! - submitted string: {uiElement.value}"); - });*/ } - private IPooledWrappedComponent CreateInputResult(ChangeEvent evt) + private int lastFrameCalled = 0; + private IPooledWrappedComponent CreateInputResult(KeyDownEvent evt) { - var componentPooled = componentPool.Get(); - var componentModel = componentPooled.WrappedComponent.Model; - componentModel.Value = evt.newValue; - componentModel.IsSubmit = false; - return componentPooled; - } + int currentFrame = Time.frameCount; + if (lastFrameCalled == currentFrame) return null; - private IPooledWrappedComponent CreateInputResultOnSubmit(KeyDownEvent evt) - { - if (evt.keyCode != KeyCode.Return) return null; + lastFrameCalled = currentFrame; var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; componentModel.Value = uiElement.value; - componentModel.IsSubmit = true; - uiElement.value = string.Empty; + // bool isSubmit = evt.keyCode == KeyCode.Return; + bool isSubmit = Input.GetKeyDown(KeyCode.Return); + + componentModel.IsSubmit = isSubmit; + if (isSubmit) + uiElement.value = string.Empty; return componentPooled; } @@ -115,7 +89,6 @@ private IPooledWrappedComponent CreateInputResultOnSubmit(KeyDownEvent evt) public void OnComponentRemoved(IParcelScene scene, IDCLEntity entity) { uiElement.UnregisterFeedback(onValueChanged); - uiElement.UnregisterFeedback(onSubmit); RemoveElementFromRoot(scene, entity, uiElement); uiElement = null; fontUpdater.Dispose(); From 512a6f44ae0a1cc2b73049dd7ddf3edcf2802196 Mon Sep 17 00:00:00 2001 From: Pravus Date: Fri, 27 Oct 2023 20:55:14 +0200 Subject: [PATCH 05/10] went back to having a specific event for onSubmit --- .../ECSComponents/UIInput/UIInputHandler.cs | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index 6fe58678c1..eec4660d0c 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -23,7 +23,8 @@ public class UIInputHandler : UIElementHandlerBase, IECSComponentHandler> componentPool; - private EventCallback onValueChanged; + private EventCallback> onValueChanged; + private EventCallback onSubmit; internal TextField uiElement { get; private set; } @@ -55,40 +56,51 @@ public void OnComponentCreated(IParcelScene scene, IDCLEntity entity) fontUpdater = new UIFontUpdater(uiElement, fontPromiseKeeper); onValueChanged = UIPointerEventsUtils - .RegisterFeedback + .RegisterFeedback> (inputResults, - CreateInputResult, + CreateOnChangeInputResult, + scene, + entity, + uiElement, + resultComponentId); + + // We don't use because that one is called a lot more and is + // triggered twice for some reason (probably a unity bug) + onSubmit = UIPointerEventsUtils + .RegisterFeedback + (inputResults, + CreateOnSubmitInputResult, scene, entity, uiElement, resultComponentId); } - private int lastFrameCalled = 0; - private IPooledWrappedComponent CreateInputResult(KeyDownEvent evt) + private IPooledWrappedComponent CreateOnChangeInputResult(ChangeEvent evt) { - int currentFrame = Time.frameCount; - if (lastFrameCalled == currentFrame) return null; - - lastFrameCalled = currentFrame; - var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; componentModel.Value = uiElement.value; + componentModel.IsSubmit = false; + return componentPooled; + } - // bool isSubmit = evt.keyCode == KeyCode.Return; - bool isSubmit = Input.GetKeyDown(KeyCode.Return); - - componentModel.IsSubmit = isSubmit; - if (isSubmit) - uiElement.value = string.Empty; + private IPooledWrappedComponent CreateOnSubmitInputResult(NavigationSubmitEvent evt) + { + // Space-bar is also detected as a navigation "submit" event + if (!Input.GetKeyDown(KeyCode.Return)) return null; + var componentPooled = componentPool.Get(); + var componentModel = componentPooled.WrappedComponent.Model; + componentModel.Value = uiElement.value; + componentModel.IsSubmit = true; return componentPooled; } public void OnComponentRemoved(IParcelScene scene, IDCLEntity entity) { uiElement.UnregisterFeedback(onValueChanged); + uiElement.UnregisterFeedback(onSubmit); RemoveElementFromRoot(scene, entity, uiElement); uiElement = null; fontUpdater.Dispose(); From 0c43e336ad5c04420993edd419b87208cebf107b Mon Sep 17 00:00:00 2001 From: Pravus Date: Mon, 30 Oct 2023 13:24:44 +0100 Subject: [PATCH 06/10] added textfield clearing; added support for keypad enter key; added event propagation safeguard --- .../ECS7/ECSComponents/UIInput/UIInputHandler.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index eec4660d0c..a8d0b3a0c5 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -78,6 +78,8 @@ public void OnComponentCreated(IParcelScene scene, IDCLEntity entity) private IPooledWrappedComponent CreateOnChangeInputResult(ChangeEvent evt) { + evt.StopPropagation(); + var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; componentModel.Value = uiElement.value; @@ -87,13 +89,19 @@ private IPooledWrappedComponent CreateOnChangeInputResult(ChangeEvent ev private IPooledWrappedComponent CreateOnSubmitInputResult(NavigationSubmitEvent evt) { + evt.StopPropagation(); + // Space-bar is also detected as a navigation "submit" event - if (!Input.GetKeyDown(KeyCode.Return)) return null; + if (!Input.GetKeyDown(KeyCode.Return) && !Input.GetKeyDown(KeyCode.KeypadEnter)) return null; var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; componentModel.Value = uiElement.value; componentModel.IsSubmit = true; + + // Clear text field without triggering its onChange event + uiElement.SetValueWithoutNotify(string.Empty); + return componentPooled; } From b055dcd3dea7017ed395a094b997fba32dd3103d Mon Sep 17 00:00:00 2001 From: Pravus Date: Mon, 30 Oct 2023 20:18:00 +0100 Subject: [PATCH 07/10] fixed tests and test assemblies --- .../UIAbstractElements/AssemblyInfo.cs | 2 +- ...CSComponents.AbstractElements.Tests.asmdef | 36 --------------- ...CSComponents.AbstractElements.Tests.asmref | 3 ++ ...onents.AbstractElements.Tests.asmref.meta} | 0 .../Tests/UIComponentsShouldBase.cs | 4 ++ .../UIBackground/AssemblyInfo.cs | 2 +- ...CL.ECSComponents.UIBackground.Tests.asmdef | 37 --------------- ...CL.ECSComponents.UIBackground.Tests.asmref | 3 ++ ...Components.UIBackground.Tests.asmref.meta} | 0 .../UIComponentsUtils/AssemblyInfo.cs | 2 +- ...SComponents.UIComponentsUtils.Tests.asmdef | 39 ---------------- ...SComponents.UIComponentsUtils.Tests.asmref | 3 ++ ...nents.UIComponentsUtils.Tests.asmref.meta} | 0 .../ECSComponents/UIDropdown/AssemblyInfo.cs | 2 +- .../DCL.ECSComponents.UIDropdown.Tests.asmdef | 37 --------------- .../DCL.ECSComponents.UIDropdown.Tests.asmref | 3 ++ ...CSComponents.UIDropdown.Tests.asmref.meta} | 0 .../ECSComponents/UIInput/AssemblyInfo.cs | 2 +- .../DCL.ECSComponents.UIInput.Tests.asmdef | 38 ---------------- .../DCL.ECSComponents.UIInput.Tests.asmref | 3 ++ ...L.ECSComponents.UIInput.Tests.asmref.meta} | 0 .../UIInput/Tests/UIInputHandlerShould.cs | 20 ++++++--- .../ECSComponents/UIInput/UIInputHandler.cs | 2 +- .../ECS7.Systems.UIInputSender.Tests.asmdef | 45 ------------------- .../ECS7.Systems.UIInputSender.Tests.asmref | 3 ++ ...7.Systems.UIInputSender.Tests.asmref.meta} | 0 .../ECS7/Tests/ECS7Plugin.Tests.asmdef | 11 ++++- .../ECS7/UIElements/Image/AssemblyInfo.cs | 2 +- 28 files changed, 52 insertions(+), 247 deletions(-) delete mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmdef create mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmref rename unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/{DCL.ECSComponents.AbstractElements.Tests.asmdef.meta => DCL.ECSComponents.AbstractElements.Tests.asmref.meta} (100%) delete mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmdef create mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmref rename unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/{DCL.ECSComponents.UIBackground.Tests.asmdef.meta => DCL.ECSComponents.UIBackground.Tests.asmref.meta} (100%) delete mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmdef create mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmref rename unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/{DCL.ECSComponents.UIComponentsUtils.Tests.asmdef.meta => DCL.ECSComponents.UIComponentsUtils.Tests.asmref.meta} (100%) delete mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmdef create mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmref rename unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/{DCL.ECSComponents.UIDropdown.Tests.asmdef.meta => DCL.ECSComponents.UIDropdown.Tests.asmref.meta} (100%) delete mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmdef create mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmref rename unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/{DCL.ECSComponents.UIInput.Tests.asmdef.meta => DCL.ECSComponents.UIInput.Tests.asmref.meta} (100%) delete mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmdef create mode 100644 unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmref rename unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/{ECS7.Systems.UIInputSender.Tests.asmdef.meta => ECS7.Systems.UIInputSender.Tests.asmref.meta} (100%) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/AssemblyInfo.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/AssemblyInfo.cs index dd705837e6..166b1af15a 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/AssemblyInfo.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/AssemblyInfo.cs @@ -1,2 +1,2 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("DCL.ECSComponents.AbstractElements.Tests")] +[assembly: InternalsVisibleTo("ECS7Plugin.Tests")] diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmdef deleted file mode 100644 index c9f177dc27..0000000000 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmdef +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "DCL.ECSComponents.AbstractElements.Tests", - "rootNamespace": "", - "references": [ - "GUID:27619889b8ba8c24980f49ee34dbb44a", - "GUID:0acc523941302664db1f4e527237feb3", - "GUID:f3eba44237ea4969b29674e332426425", - "GUID:9cccce9925d3495d8a5e4fa5b25f54a5", - "GUID:9b110c16a6b8f4d54ae0f56af2163334", - "GUID:97d8897529779cb49bebd400c7f402a6", - "GUID:1dd0780aa6be12b428c8005d0bee46b8", - "GUID:37d2c04574c1d480d8c817e2a7c578e7", - "GUID:1fa4d2c8ae751fb46a83e1fdc59823dc", - "GUID:f8a3a0af3ed28474c885e04c605a7962", - "GUID:4bd423f6dceb67540b5c246ca8cf789b", - "GUID:7eb48a6a47db4795bdee44a726fa8338", - "GUID:3c7b57a14671040bd8c549056adc04f5" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "NSubstitute.dll", - "Google.Protobuf.dll" - ], - "autoReferenced": false, - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmref b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmref new file mode 100644 index 0000000000..97e7f8980d --- /dev/null +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:f8afb582bba443878c19a3bf4e7d83c0" +} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmdef.meta b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmref.meta similarity index 100% rename from unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmdef.meta rename to unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/DCL.ECSComponents.AbstractElements.Tests.asmref.meta diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIComponentsShouldBase.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIComponentsShouldBase.cs index dcca64c0aa..d08693e464 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIComponentsShouldBase.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIComponentsShouldBase.cs @@ -61,6 +61,9 @@ public void SetUp() if (!uiDoc.rootVisualElement.Contains(internalCompData.Value.model.rootElement)) uiDoc.rootVisualElement.Add(internalCompData.Value.model.rootElement); }); + + var serviceLocator = ServiceLocatorTestFactory.CreateMocked(); + Environment.Setup(serviceLocator); } protected static UIDocument InstantiateUiDocument() => @@ -70,6 +73,7 @@ protected static UIDocument InstantiateUiDocument() => public void TearDown() { sceneTestHelper.Dispose(); + Environment.Dispose(); } } } diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/AssemblyInfo.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/AssemblyInfo.cs index d90e944b33..439cda3eb9 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/AssemblyInfo.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/AssemblyInfo.cs @@ -1,3 +1,3 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("DCL.ECSComponents.UIBackground.Tests")] +[assembly: InternalsVisibleTo("ECS7Plugin.Tests")] diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmdef deleted file mode 100644 index 2ea6115ecc..0000000000 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmdef +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "DCL.ECSComponents.UIBackground.Tests", - "references": [ - "GUID:f3eba44237ea4969b29674e332426425", - "GUID:9cccce9925d3495d8a5e4fa5b25f54a5", - "GUID:97d8897529779cb49bebd400c7f402a6", - "GUID:9b110c16a6b8f4d54ae0f56af2163334", - "GUID:37d2c04574c1d480d8c817e2a7c578e7", - "GUID:1dd0780aa6be12b428c8005d0bee46b8", - "GUID:e30cc2f9ee2c45df93dbb8f7f826792f", - "GUID:4bd423f6dceb67540b5c246ca8cf789b", - "GUID:a881b57670b1d2747a6d7f9e32b63230", - "GUID:d8d40e815f1e74d4f821388b7c13bf78", - "GUID:a3ceb534947fac14da25035bc5c24788", - "GUID:1fa4d2c8ae751fb46a83e1fdc59823dc", - "GUID:59c9e1ae4a4a61c43b19957ad3bfbaf7", - "GUID:091c556278214ab49cfdc87549e3135c", - "GUID:3c7b57a14671040bd8c549056adc04f5" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "NSubstitute.dll", - "System.Threading.Tasks.Extensions.dll" - ], - "autoReferenced": false, - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmref b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmref new file mode 100644 index 0000000000..97e7f8980d --- /dev/null +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:f8afb582bba443878c19a3bf4e7d83c0" +} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmdef.meta b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmref.meta similarity index 100% rename from unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmdef.meta rename to unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIBackground/Tests/DCL.ECSComponents.UIBackground.Tests.asmref.meta diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/AssemblyInfo.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/AssemblyInfo.cs index 74982b5ee3..439cda3eb9 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/AssemblyInfo.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/AssemblyInfo.cs @@ -1,3 +1,3 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("DCL.ECSComponents.UIComponentsUtils.Tests")] +[assembly: InternalsVisibleTo("ECS7Plugin.Tests")] diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmdef deleted file mode 100644 index d2b4a86811..0000000000 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmdef +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "DCL.ECSComponents.UIComponentsUtils.Tests", - "rootNamespace": "", - "references": [ - "GUID:f3eba44237ea4969b29674e332426425", - "GUID:97d8897529779cb49bebd400c7f402a6", - "GUID:9b110c16a6b8f4d54ae0f56af2163334", - "GUID:37d2c04574c1d480d8c817e2a7c578e7", - "GUID:1dd0780aa6be12b428c8005d0bee46b8", - "GUID:a3f19928bfc54c8ca5660ce7ba0c4d75", - "GUID:4bd423f6dceb67540b5c246ca8cf789b", - "GUID:a881b57670b1d2747a6d7f9e32b63230", - "GUID:a3ceb534947fac14da25035bc5c24788", - "GUID:d8d40e815f1e74d4f821388b7c13bf78", - "GUID:4cbefd453333a0b4dbf7e4045dacb0bd", - "GUID:1fa4d2c8ae751fb46a83e1fdc59823dc", - "GUID:c29054c91fb4463193b37a04e2e85515", - "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:acb0f5633d7c47aba96ee6b61c872d94", - "GUID:9cccce9925d3495d8a5e4fa5b25f54a5" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "NSubstitute.dll", - "Google.Protobuf.dll" - ], - "autoReferenced": false, - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmref b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmref new file mode 100644 index 0000000000..97e7f8980d --- /dev/null +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:f8afb582bba443878c19a3bf4e7d83c0" +} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmdef.meta b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmref.meta similarity index 100% rename from unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmdef.meta rename to unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIComponentsUtils/Tests/DCL.ECSComponents.UIComponentsUtils.Tests.asmref.meta diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/AssemblyInfo.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/AssemblyInfo.cs index 95ebbaea37..439cda3eb9 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/AssemblyInfo.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/AssemblyInfo.cs @@ -1,3 +1,3 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("DCL.ECSComponents.UIDropdown.Tests")] +[assembly: InternalsVisibleTo("ECS7Plugin.Tests")] diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmdef deleted file mode 100644 index 21d879a9a1..0000000000 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmdef +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "DCL.ECSComponents.UIDropdown.Tests", - "rootNamespace": "", - "references": [ - "GUID:f3eba44237ea4969b29674e332426425", - "GUID:97d8897529779cb49bebd400c7f402a6", - "GUID:9b110c16a6b8f4d54ae0f56af2163334", - "GUID:37d2c04574c1d480d8c817e2a7c578e7", - "GUID:1dd0780aa6be12b428c8005d0bee46b8", - "GUID:4bd423f6dceb67540b5c246ca8cf789b", - "GUID:a881b57670b1d2747a6d7f9e32b63230", - "GUID:a3ceb534947fac14da25035bc5c24788", - "GUID:d8d40e815f1e74d4f821388b7c13bf78", - "GUID:1fa4d2c8ae751fb46a83e1fdc59823dc", - "GUID:02760f41040d3ef4c8652916aad15b45", - "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:acb0f5633d7c47aba96ee6b61c872d94", - "GUID:9cccce9925d3495d8a5e4fa5b25f54a5" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "NSubstitute.dll", - "Google.Protobuf.dll" - ], - "autoReferenced": false, - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmref b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmref new file mode 100644 index 0000000000..8f11f09ff9 --- /dev/null +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:f8afb582bba443878c19a3bf4e7d83c0" +} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmdef.meta b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmref.meta similarity index 100% rename from unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmdef.meta rename to unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIDropdown/Tests/DCL.ECSComponents.UIDropdown.Tests.asmref.meta diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/AssemblyInfo.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/AssemblyInfo.cs index 792dee2a82..439cda3eb9 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/AssemblyInfo.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/AssemblyInfo.cs @@ -1,3 +1,3 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("DCL.ECSComponents.UIInput.Tests")] +[assembly: InternalsVisibleTo("ECS7Plugin.Tests")] diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmdef deleted file mode 100644 index 86756addb6..0000000000 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmdef +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "DCL.ECSComponents.UIInput.Tests", - "rootNamespace": "", - "references": [ - "GUID:f3eba44237ea4969b29674e332426425", - "GUID:9cccce9925d3495d8a5e4fa5b25f54a5", - "GUID:97d8897529779cb49bebd400c7f402a6", - "GUID:9b110c16a6b8f4d54ae0f56af2163334", - "GUID:37d2c04574c1d480d8c817e2a7c578e7", - "GUID:1dd0780aa6be12b428c8005d0bee46b8", - "GUID:a3f19928bfc54c8ca5660ce7ba0c4d75", - "GUID:4bd423f6dceb67540b5c246ca8cf789b", - "GUID:a881b57670b1d2747a6d7f9e32b63230", - "GUID:a3ceb534947fac14da25035bc5c24788", - "GUID:d8d40e815f1e74d4f821388b7c13bf78", - "GUID:4cbefd453333a0b4dbf7e4045dacb0bd", - "GUID:1fa4d2c8ae751fb46a83e1fdc59823dc", - "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:acb0f5633d7c47aba96ee6b61c872d94" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "NSubstitute.dll", - "Google.Protobuf.dll" - ], - "autoReferenced": false, - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmref b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmref new file mode 100644 index 0000000000..97e7f8980d --- /dev/null +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:f8afb582bba443878c19a3bf4e7d83c0" +} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmdef.meta b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmref.meta similarity index 100% rename from unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmdef.meta rename to unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/DCL.ECSComponents.UIInput.Tests.asmref.meta diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs index 9bc795c040..85da0fc04f 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs @@ -9,7 +9,6 @@ namespace DCL.ECSComponents.UIInput.Tests { - [Category("Flaky")] public class UIInputHandlerShould : UIComponentsShouldBase { private const int COMPONENT_ID = 1001; @@ -22,7 +21,6 @@ public class UIInputHandlerShould : UIComponentsShouldBase public void CreateHandler() { pool = new WrappedComponentPool>(0, () => new ProtobufWrappedComponent(new PBUiInputResult())); - handler = new UIInputHandler( internalUiContainer, RESULT_COMPONENT_ID, @@ -33,7 +31,13 @@ public void CreateHandler() ); } - [Test][Category("ToFix")] + [TearDown] + public void TearDown() + { + handler.OnComponentRemoved(scene, entity); + } + + [Test] [TestCase(false)] [TestCase(true)] public void ConformToSchema(bool useTextValue) @@ -51,18 +55,20 @@ public void ConformToSchema(bool useTextValue) Assert.AreEqual("PLACEHOLDER", handler.uiElement.text); } - [Test][Category("ToFix")] + [Test] public void EmitResult() { const string TEST_VALUE = "TEST_TEXT"; + UpdateComponentModel(); + handler.uiElement.value = TEST_VALUE; var result = pool.Get(); result.WrappedComponent.Model.Value = TEST_VALUE; - Assert.Contains( - new InternalUIInputResults.Result(result, RESULT_COMPONENT_ID), - uiInputResults.Results); + // Assert.Contains( + // new InternalUIInputResults.Result(result, RESULT_COMPONENT_ID), + // uiInputResults.Results); } [Test] diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index a8d0b3a0c5..8f29cab843 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -26,7 +26,7 @@ public class UIInputHandler : UIElementHandlerBase, IECSComponentHandler> onValueChanged; private EventCallback onSubmit; - internal TextField uiElement { get; private set; } + public TextField uiElement { get; private set; } internal TextFieldPlaceholder placeholder { get; private set; } diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmdef deleted file mode 100644 index ead540cacb..0000000000 --- a/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmdef +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "ECS7.Systems.UIInputSender.Tests", - "rootNamespace": "", - "references": [ - "GUID:f3eba44237ea4969b29674e332426425", - "GUID:1dd0780aa6be12b428c8005d0bee46b8", - "GUID:a881b57670b1d2747a6d7f9e32b63230", - "GUID:3b80b0b562b1cbc489513f09fc1b8f69", - "GUID:9cccce9925d3495d8a5e4fa5b25f54a5", - "GUID:37d2c04574c1d480d8c817e2a7c578e7", - "GUID:f8a3a0af3ed28474c885e04c605a7962", - "GUID:3f9bd7dfada994a3ca114055e53e2c1f", - "GUID:8796c22c84974ce385f8d79b1ae08e1b", - "GUID:5c497d137ccf6054880aae69dbaea398", - "GUID:77b2ad1d87ef4cfb82003d8a3fa9cb3b", - "GUID:4bd423f6dceb67540b5c246ca8cf789b", - "GUID:97d8897529779cb49bebd400c7f402a6", - "GUID:f334064a9ed3462091d1b06f9e981366", - "GUID:ac62e852826a4b36aeb22931dad73edb", - "GUID:9b110c16a6b8f4d54ae0f56af2163334", - "GUID:d8d40e815f1e74d4f821388b7c13bf78", - "GUID:1e10040ab6604cbe8ad0921047d49e65", - "GUID:3c7b57a14671040bd8c549056adc04f5", - "GUID:acb0f5633d7c47aba96ee6b61c872d94", - "GUID:dfe945c84f5740b79615bed3c57f6118", - "GUID:7eb48a6a47db4795bdee44a726fa8338" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "NSubstitute.dll", - "Google.Protobuf.dll" - ], - "autoReferenced": false, - "defineConstraints": [ - "UNITY_INCLUDE_TESTS" - ], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmref b/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmref new file mode 100644 index 0000000000..97e7f8980d --- /dev/null +++ b/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:f8afb582bba443878c19a3bf4e7d83c0" +} \ No newline at end of file diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmdef.meta b/unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmref.meta similarity index 100% rename from unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmdef.meta rename to unity-renderer/Assets/DCLPlugins/ECS7/Systems/UIInputSenderSystem/Tests/ECS7.Systems.UIInputSender.Tests.asmref.meta diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/Tests/ECS7Plugin.Tests.asmdef b/unity-renderer/Assets/DCLPlugins/ECS7/Tests/ECS7Plugin.Tests.asmdef index 7cc8f3b459..f3680695e9 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/Tests/ECS7Plugin.Tests.asmdef +++ b/unity-renderer/Assets/DCLPlugins/ECS7/Tests/ECS7Plugin.Tests.asmdef @@ -77,7 +77,16 @@ "GUID:933da198fac7c00489424e7b953fe8b1", "GUID:691ba36162f94224faace1706408a72c", "GUID:e55bb9116cf54f04a57453fc981dc81d", - "GUID:cd4c1c51b9a395144a2550a24a6c496c" + "GUID:cd4c1c51b9a395144a2550a24a6c496c", + "GUID:d8d40e815f1e74d4f821388b7c13bf78", + "GUID:4cbefd453333a0b4dbf7e4045dacb0bd", + "GUID:1fa4d2c8ae751fb46a83e1fdc59823dc", + "GUID:02760f41040d3ef4c8652916aad15b45", + "GUID:c29054c91fb4463193b37a04e2e85515", + "GUID:e30cc2f9ee2c45df93dbb8f7f826792f", + "GUID:091c556278214ab49cfdc87549e3135c", + "GUID:f334064a9ed3462091d1b06f9e981366", + "GUID:59c9e1ae4a4a61c43b19957ad3bfbaf7" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/UIElements/Image/AssemblyInfo.cs b/unity-renderer/Assets/DCLPlugins/ECS7/UIElements/Image/AssemblyInfo.cs index 6665bc5a59..f81204788d 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/UIElements/Image/AssemblyInfo.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/UIElements/Image/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("DCL.ECS7.UIElements.Image.Tests")] -[assembly: InternalsVisibleTo("DCL.ECSComponents.UIBackground.Tests")] +[assembly: InternalsVisibleTo("ECS7Plugin.Tests")] From 33fa296ae01f74b155253028daad96445a156421 Mon Sep 17 00:00:00 2001 From: Pravus Date: Mon, 30 Oct 2023 20:46:24 +0100 Subject: [PATCH 08/10] fixed test --- .../UIInput/Tests/UIInputHandlerShould.cs | 27 +++++++++++++------ .../ECSComponents/UIInput/UIInputHandler.cs | 4 ++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs index 85da0fc04f..100c831ae2 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/Tests/UIInputHandlerShould.cs @@ -1,6 +1,6 @@ -using DCL.ECS7.ComponentWrapper; +using DCL.ECS7; +using DCL.ECS7.ComponentWrapper; using DCL.ECS7.ComponentWrapper.Generic; -using DCL.ECS7.InternalComponents; using DCL.ECSComponents.UIAbstractElements.Tests; using Decentraland.Common; using NUnit.Framework; @@ -56,19 +56,17 @@ public void ConformToSchema(bool useTextValue) } [Test] - public void EmitResult() + public void EmitOnChangeInputResult() { const string TEST_VALUE = "TEST_TEXT"; UpdateComponentModel(); + Assert.IsFalse(ContainsInputResult(TEST_VALUE)); + handler.uiElement.value = TEST_VALUE; - var result = pool.Get(); - result.WrappedComponent.Model.Value = TEST_VALUE; - // Assert.Contains( - // new InternalUIInputResults.Result(result, RESULT_COMPONENT_ID), - // uiInputResults.Results); + Assert.IsTrue(ContainsInputResult(TEST_VALUE)); } [Test] @@ -98,6 +96,19 @@ private void UpdateComponentModel(bool useTextValueProperty = false) handler.OnComponentModelUpdated(scene, entity, model); } + + private bool ContainsInputResult(string targetTextValue, bool targetSubmitValue = false) + { + foreach (var inputResult in uiInputResults.Results) + { + if (inputResult.Message.WrappedComponentBase is IWrappedComponent comp + && inputResult.ComponentId == RESULT_COMPONENT_ID + && comp.Model.Value == targetTextValue + && comp.Model.IsSubmit == targetSubmitValue) return true; + } + + return false; + } } } diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs index 8f29cab843..2e63d46db4 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIInput/UIInputHandler.cs @@ -92,7 +92,9 @@ private IPooledWrappedComponent CreateOnSubmitInputResult(NavigationSubmitEvent evt.StopPropagation(); // Space-bar is also detected as a navigation "submit" event - if (!Input.GetKeyDown(KeyCode.Return) && !Input.GetKeyDown(KeyCode.KeypadEnter)) return null; + if (evt.shiftKey || evt.altKey || evt.ctrlKey || evt.commandKey + || (!Input.GetKeyDown(KeyCode.Return) && !Input.GetKeyDown(KeyCode.KeypadEnter))) + return null; var componentPooled = componentPool.Get(); var componentModel = componentPooled.WrappedComponent.Model; From dd71e9b1f48b245ee9112b345ea479945e15295c Mon Sep 17 00:00:00 2001 From: Pravus Date: Mon, 30 Oct 2023 21:40:25 +0100 Subject: [PATCH 09/10] fixed another test --- .../Tests/UIElementRegisterBaseShould.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIElementRegisterBaseShould.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIElementRegisterBaseShould.cs index 0f46ae066e..67274f13f6 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIElementRegisterBaseShould.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/UIAbstractElements/Tests/UIElementRegisterBaseShould.cs @@ -29,12 +29,20 @@ public void RegisterSetUp() (COMPONENT_ID, RESULT_COMPONENT_ID, factory, writer, internalUiContainer, handlerBuilder); } + [TearDown] + public void RegisterTearDown() + { + factory.ClearReceivedCalls(); + writer.ClearReceivedCalls(); + register.ClearReceivedCalls(); + } + [Test] public void AddDeserializer() { factory.Received(1) .AddOrReplaceComponent(COMPONENT_ID, - Arg.Any>(), default); + (o) => { return new PBUiBackground(); }, default); Assert.IsTrue(factory.componentBuilders.TryGetValue(COMPONENT_ID, out var componentBuilder)); Assert.AreEqual(typeof(ECSComponent), componentBuilder().GetType()); From 48c06ed8f0b424c891633a45d82a93a38b7e7498 Mon Sep 17 00:00:00 2001 From: Pravus Date: Thu, 2 Nov 2023 09:53:12 +0100 Subject: [PATCH 10/10] updated protocol package to point to @next and rebuilt --- scripts/package-lock.json | 14 +++++++------- scripts/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/package-lock.json b/scripts/package-lock.json index 8fa5ef082a..7bae886467 100644 --- a/scripts/package-lock.json +++ b/scripts/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@dcl/protocol": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", + "@dcl/protocol": "^1.0.0-6725457366.commit-d6b2b77", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1", @@ -36,10 +36,9 @@ } }, "node_modules/@dcl/protocol": { - "version": "1.0.0-6665576309.commit-fbefe5d", - "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", - "integrity": "sha512-Pe7iQCs5wL66R8qL647P2mdZktU4ZGEE8/S9GJ5F9YxMTcz/XLQijZzxOBiL0ujXfCH1n/hAyIQHxmig4OTRQg==", - "license": "Apache-2.0", + "version": "1.0.0-6725457366.commit-d6b2b77", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-6725457366.commit-d6b2b77.tgz", + "integrity": "sha512-hZQxkoBTsNamu6kpbRtT7QAg4yIa7qF/ZAsfDM3OR0KtbKxYtxsat5dQ2KnjUm6JEMefphonoL9PIR0wOJYrFA==", "dependencies": { "@dcl/ts-proto": "1.154.0" } @@ -570,8 +569,9 @@ } }, "@dcl/protocol": { - "version": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", - "integrity": "sha512-Pe7iQCs5wL66R8qL647P2mdZktU4ZGEE8/S9GJ5F9YxMTcz/XLQijZzxOBiL0ujXfCH1n/hAyIQHxmig4OTRQg==", + "version": "1.0.0-6725457366.commit-d6b2b77", + "resolved": "https://registry.npmjs.org/@dcl/protocol/-/protocol-1.0.0-6725457366.commit-d6b2b77.tgz", + "integrity": "sha512-hZQxkoBTsNamu6kpbRtT7QAg4yIa7qF/ZAsfDM3OR0KtbKxYtxsat5dQ2KnjUm6JEMefphonoL9PIR0wOJYrFA==", "requires": { "@dcl/ts-proto": "1.154.0" } diff --git a/scripts/package.json b/scripts/package.json index 5bfb4e0dc9..13bdf86025 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -16,7 +16,7 @@ "typescript": "^4.2.3" }, "dependencies": { - "@dcl/protocol": "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-6665576309.commit-fbefe5d.tgz", + "@dcl/protocol": "^1.0.0-6725457366.commit-d6b2b77", "@protobuf-ts/protoc": "^2.8.2", "@types/fs-extra": "^11.0.1", "@types/glob": "^8.0.1",