Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update crdt project list API to show all user projects to allow them to upload #1248

Merged
merged 15 commits into from
Nov 19, 2024

Conversation

hahn-kev
Copy link
Collaborator

closes #1247

UI to login to a server you aren't logged in to yet
image
UI for a server you are logged in to with a project selected
image

one issue is that admins will only see projects they are members of, but maybe that's ok for uploading? I'm not sure, that will require some thought about how to let them work on an arbitrary project.

@hahn-kev hahn-kev requested a review from myieye November 18, 2024 09:48
Copy link

github-actions bot commented Nov 18, 2024

UI unit Tests

12 tests  ±0   12 ✅ ±0   0s ⏱️ ±0s
 4 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit e1cde72. ± Comparison against base commit c23a0bc.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Nov 18, 2024

C# Unit Tests

90 tests  ±0   90 ✅ ±0   5s ⏱️ ±0s
14 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit e1cde72. ± Comparison against base commit c23a0bc.

♻️ This comment has been updated with latest results.

@myieye
Copy link
Contributor

myieye commented Nov 19, 2024

I just ran into this, is that interesting? 🤔

It started when I tried to upload my CRDT Sena-3 project to my local Sena-3 project.
Now, I can't open the CRDT Sena-3 project.

[fw-lite:local-web-app] fail: Microsoft.EntityFrameworkCore.Query[10100]
[fw-lite:local-web-app]       An exception occurred while iterating over the results of a query for context type 'LcmCrdt.LcmCrdtDbContext'.
[fw-lite:local-web-app]       System.InvalidOperationException: Each parameter in the deserialization constructor on type 'LcmCrdt.Changes.AddSemanticDomainChange' must bind to an object property or field on deserialization. Each parameter name must match with a property or field on the object. Fields are only considered when 'JsonSerializerOptions.IncludeFields' is enabled. The match can be case-insensitive.
[fw-lite:local-web-app]          at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.OnTryReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Object& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)  
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
[fw-lite:local-web-app]          at SIL.Harmony.Db.EntityConfig.ChangeEntityConfig.DeserializeChange(String json) in D:\code\languageforge-lexbox\backend\harmony\src\SIL.Harmony\Db\EntityConfig\ChangeEntityConfig.cs:line 26
[fw-lite:local-web-app]          at lambda_method240(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateIncludeCollection[TIncludingEntity,TIncludedEntity](Int32 collectionId, QueryContext queryContext, DbDataReader dbDataReader, SingleQueryResultCoordinator resultCoordinator, Func`3 parentIdentifier, Func`3 outerIdentifier, Func`3 selfIdentifier, IReadOnlyList`1 parentIdentifierValueComparers, IReadOnlyList`1 outerIdentifierValueComparers, IReadOnlyList`1 selfIdentifierValueComparers, Func`5 innerShaper, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
[fw-lite:local-web-app]          at lambda_method244(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
[fw-lite:local-web-app]       System.InvalidOperationException: Each parameter in the deserialization constructor on type 'LcmCrdt.Changes.AddSemanticDomainChange' must bind to an object property or field on deserialization. Each parameter name must match with a property or field on the object. Fields are only considered when 'JsonSerializerOptions.IncludeFields' is enabled. The match can be case-insensitive.
[fw-lite:local-web-app]          at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.OnTryReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Object& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)  
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
[fw-lite:local-web-app]          at SIL.Harmony.Db.EntityConfig.ChangeEntityConfig.DeserializeChange(String json) in D:\code\languageforge-lexbox\backend\harmony\src\SIL.Harmony\Db\EntityConfig\ChangeEntityConfig.cs:line 26
[fw-lite:local-web-app]          at lambda_method240(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateIncludeCollection[TIncludingEntity,TIncludedEntity](Int32 collectionId, QueryContext queryContext, DbDataReader dbDataReader, SingleQueryResultCoordinator resultCoordinator, Func`3 parentIdentifier, Func`3 outerIdentifier, Func`3 selfIdentifier, IReadOnlyList`1 parentIdentifierValueComparers, IReadOnlyList`1 outerIdentifierValueComparers, IReadOnlyList`1 selfIdentifierValueComparers, Func`5 innerShaper, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
[fw-lite:local-web-app]          at lambda_method244(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()

Copy link
Contributor

@myieye myieye left a comment

Choose a reason for hiding this comment

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

I made a few small changes.

I'd like to make the sync status (whether it's syncing with a cloud project and where) more visible eventually, but this looks good to me 👍

@myieye
Copy link
Contributor

myieye commented Nov 19, 2024

Created a bug for the stacktrace a posted above
#1257

@hahn-kev hahn-kev merged commit 412aa71 into develop Nov 19, 2024
22 checks passed
@hahn-kev hahn-kev deleted the chore/use-project-api-in-fw-lite branch November 19, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

figure out project linking and picking/upload model
2 participants