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
@@ -498,6 +498,42 @@ public sealed class ProjectTests(TestContext context)
|
||||
Assert.Contains(ServerCapabilities.Projects, (await client.GetInfoAsync(context.Cancellation)).Capabilities);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Owner review 1, phase 4: the server announces the settings format it reads, and takes the versions of the formats it
|
||||
/// reads (1, and 2 with a turn or a look), refusing a newer one with 422 <c>newer_format</c>, nothing stored.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public async Task TheServerTakesTheSettingsFormatsItAnnounces()
|
||||
{
|
||||
await using var server = await TestServer.StartAsync(context, services: ArchiveModule.Register);
|
||||
using (var anonymous = new ChronosClient(server.HttpBase, new CertificatePinning([]), "tests"))
|
||||
Assert.Equal(ProjectSettings.CurrentVersion, (await anonymous.GetInfoAsync(context.Cancellation)).SettingsFormat);
|
||||
Assert.Equal(2, ProjectSettings.CurrentVersion);
|
||||
|
||||
var (http, _, token) = await server.UserAsync("alberto", "editor");
|
||||
using var alberto = Client(server, token);
|
||||
var sid = await SequenceAsync(server, token, 2);
|
||||
var main = (await alberto.ListProjectsAsync(sid)).Single(p => p.IsMain);
|
||||
var head = await alberto.GetProjectHeadAsync(sid, main.Id);
|
||||
var home = ProjectWire.ToHomeFrames(await alberto.GetProjectFramesAsync(sid));
|
||||
|
||||
var plain = Version(head, new ProjectSettings { Exposure = new ExposureSettings { ExposureOffsetEv = 0.3 } }, home);
|
||||
Assert.Equal(1, plain.SettingsFormat);
|
||||
var v2 = Assert.NotNull((await alberto.PushProjectVersionAsync(sid, main.Id, plain)).Version);
|
||||
var turned = Version(v2, new ProjectSettings { Camera = new CameraSettings { Rotate = 90, Mirror = true }, Look = new LookSettings { Filter = "sepia" } }, home);
|
||||
Assert.Equal(2, turned.SettingsFormat);
|
||||
var v3 = Assert.NotNull((await alberto.PushProjectVersionAsync(sid, main.Id, turned)).Version);
|
||||
Assert.Equal(2, ProjectContent.FormatOf(v3.SettingsJson));
|
||||
var mirrored = ProjectSettings.FromJson(Assert.NotNull((await server.Database.Sequences.GetAsync(sid))!.SettingsJson));
|
||||
Assert.Equal((90, true, "sepia"), (mirrored.Camera.Rotate, mirrored.Camera.Mirror, mirrored.Look?.Filter), "Main's head is the sequence's settings");
|
||||
|
||||
const string future = """{"version":3,"camera":{"rotate":90}}""";
|
||||
var newer = Version(v3, new ProjectSettings(), home) with { SettingsJson = future, ContentHash = ProjectContent.Hash(future), SettingsFormat = 3 };
|
||||
using (var raw = await http.PostAsJsonAsync($"/api/v1/sequences/{sid}/projects/{main.Id}/versions", newer, ProtocolJson.Default.ProjectVersionDto))
|
||||
await raw.ExpectErrorAsync(HttpStatusCode.UnprocessableEntity, ProjectErrors.NewerFormat);
|
||||
Assert.Equal(3, (await alberto.GetProjectAsync(sid, main.Id)).HeadNumber);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TheFramesOfAHomeAreOfOneFramesVersionWithTheAliasesOfItsConversions()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user