feat(editor): visual crop, rotate/mirror/flip/straighten, colour looks (owner review 1 phase 4) (#26)
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s
Owner review 1 R5 + R6. Camera rotation, mirror, flip, straighten and crop handles locked to the output; an Exposure Look group; Export output size ("proportions win"); settings format 2 with older-node gates. Also fixes project text and hashes differing between Windows and Linux.
Closes #19
Closes #20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #26.
This commit is contained in:
1 parent
db389a54f2
commit
188b2c2e55
355 files changed
+10549
-1061
No files matched your search
@@ -54,6 +54,11 @@ internal sealed class FakeSyncRemote : ISyncRemote
|
||||
/// <summary>Edits the server accepted, in order.</summary>
|
||||
public List<UpdateSequenceRequest> Updates { get; } = [];
|
||||
|
||||
/// <summary>The settings format the server announces (an older server's 1).</summary>
|
||||
public int SettingsFormat { get; set; } = Chronos.Core.Project.ProjectSettings.CurrentVersion;
|
||||
|
||||
public Task<int> SettingsFormatAsync(CancellationToken cancellationToken) => Task.FromResult(SettingsFormat);
|
||||
|
||||
public FakeSequence Add(string? title, IEnumerable<byte[]> originals, string? settingsJson = null,
|
||||
SequenceStatus status = SequenceStatus.ProxiesBuilt | SequenceStatus.ThumbsBuilt)
|
||||
{
|
||||
|
||||
@@ -243,6 +243,20 @@ public sealed class SyncRulesTests
|
||||
Assert.Empty(SyncRules.Differences(SyncFixture.Window33, SyncFixture.Window33));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Owner review 1, phase 4: the "version" member follows the content (format 2 only while a turn or a look is set), so a
|
||||
/// rotation alone is one difference, the rotation's; a newer Chronos's format still differs.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TheDerivedFormatIsNoDifferenceOfItsOwn()
|
||||
{
|
||||
var plain = new ProjectSettings().ToJson();
|
||||
var turned = new ProjectSettings { Camera = new CameraSettings { Rotate = 90 } }.ToJson();
|
||||
Assert.Contains("\"version\": 2", turned);
|
||||
Assert.SequenceEqual(["camera.rotate"], SyncRules.Differences(turned, plain).Select(d => d.Path));
|
||||
Assert.Contains(SyncRules.Differences("""{"version":3,"camera":{"rotate":90}}""", turned, max: 5), d => d.Path == "version");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PayloadDifferencesListTheSequenceFieldsBeforeTheSettings()
|
||||
{
|
||||
|
||||
@@ -701,6 +701,35 @@ public sealed class SyncServiceTests(TestContext context)
|
||||
Assert.Equal(SyncStatus.InSync, recovered.Status);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Owner review 1, phase 4: settings an older server cannot read (a turn needs format 2) stay on this PC, the sync row
|
||||
/// saying why; it would store them and then fail every render of them. Settings of the base format are sent as before.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public async Task SettingsAnOlderServerCannotReadStayHere()
|
||||
{
|
||||
await using var f = await SyncFixture.CreateAsync(context);
|
||||
var photos = f.NewPhotos(1);
|
||||
var local = await f.LocalAsync("Harbour", photos);
|
||||
var remote = f.Remote.Add("Harbour", photos);
|
||||
f.Remote.SettingsFormat = ProjectSettings.BaseVersion;
|
||||
await f.Sync.LinkAsync(f.Server, remote.Id, local.Id, f.Ct);
|
||||
await f.RefreshAsync();
|
||||
|
||||
await f.EditLocalSettingsAsync(local.Id, new ProjectSettings { Camera = new CameraSettings { Rotate = 90 } }.ToJson());
|
||||
await f.RefreshAsync();
|
||||
Assert.Null(remote.SettingsJson);
|
||||
Assert.Empty(f.Remote.Updates);
|
||||
var entry = await f.EntryAsync("Harbour");
|
||||
Assert.Equal(SyncStatus.LocalAhead, entry.Status);
|
||||
Assert.Equal(Loc.L("Tooltips.Server.NeedsNewerServer"), entry.Link!.Error);
|
||||
|
||||
await f.EditLocalSettingsAsync(local.Id, SyncFixture.Window41);
|
||||
await f.RefreshAsync();
|
||||
Assert.True(SyncRules.SameSettings(SyncFixture.Window41, remote.SettingsJson), "the base format is sent");
|
||||
Assert.Null((await f.EntryAsync("Harbour")).Link!.Error);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task WithoutTheEditRightThisPcsEditsWaitInsteadOfFailing()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user