-
-
Notifications
You must be signed in to change notification settings - Fork 6
Begin modeling pictures in MiniLcm #2300
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
ef9493a
Begin modeling pictures in MiniLcm
rmunn 98d23b3
Incomplete implementation of MiniLcm picture APIs
rmunn 54f139b
Handle MediaUri properties for Picture API
rmunn 623c63b
Add DB migration for Pictures column in JSON
rmunn ed08c35
Tell EF Core about Pictures in DbContext
rmunn f049d4b
Add MiniLcmApiWriteNormalizationWrapper APi calls
rmunn 18a947d
Attempt to get pictures to sync (not working yet)
rmunn d69f076
Actually get Pictures data from FW during sync
rmunn b2898c1
Actually use SenseId, we're going to need it
rmunn 27d2acd
Move Pictures to its own DB table
rmunn 759a337
Back to storing pictures as JSON fields on senses
rmunn 66c3000
Add Picture to Reinforced.Typings config
rmunn 3719d92
Add pictures list to Typescript demo data
rmunn 914ff07
Picture changes should now be `EditChange<Sense>`
rmunn b618feb
Add `pictures: []` to a couple more frontend bits
rmunn be1fe2f
Update pictures with a dedicated change type
rmunn 6844a51
Ensure patching MediaUri values does not normalize
rmunn 30ae193
Have LfClassicMiniLcmApi actually find pictures
rmunn 681e0b8
Give migration correct default for jsonb lists
rmunn 76d2674
Normalization wrapper now normalizes Pictures too
rmunn fa043be
Have CreatePicture look up the pic after creating
rmunn 0812b11
Don't update deleted pictures
rmunn bf04002
Fix default value of Pictures column
rmunn 9e1ef96
Better ownership-validation logic for pictures
rmunn ae8010c
Skip reordering if picture already deleted
rmunn 064b77e
Get PictureId from change object on creation
rmunn 0891da0
Handle Order changes correctly in UpdatePicture
rmunn de80c5d
Update a bunch of verified.txt files with pictures
rmunn 4312aaf
Picture can't be IObjectWithId
rmunn 5387127
Teach AutoFaker how to create pictures
rmunn 26a8902
Fix a couple more tests
rmunn b4dfc7a
Add new unit tests for Pictures
rmunn cc089f7
Merge branch 'develop' into feat/pictures
rmunn b464387
Add new SubmitUpdatePicture API
rmunn 5246d03
Add TypeScript conversion of Picture
rmunn 99d8e71
Fix DeletePicture sync test
rmunn 94a3814
Do not sync the Order property in Pictures
rmunn f8ad64d
Remove completed TODO comments
rmunn eb7a7ac
Remove extraneous blank line
rmunn fdbc1e0
Slightly better change regression test data
rmunn 5128681
Address review comments
rmunn 5e9ae99
One more review-comment fix
rmunn e560749
Don't throw if no local media files found
rmunn 47222d3
Address one final review comment
rmunn 06d426e
Set up Picture order correctly in AutoFaker
rmunn bf18715
Merge branch 'develop' into feat/pictures
rmunn 5cd730f
Fix up incorrect merge-conflict resolution
rmunn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
backend/FwLite/FwDataMiniLcmBridge/Api/UpdateProxy/UpdatePictureProxy.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| using MiniLcm.Media; | ||
| using MiniLcm.Models; | ||
| using SIL.LCModel; | ||
|
|
||
| namespace FwDataMiniLcmBridge.Api.UpdateProxy; | ||
|
|
||
| public class UpdatePictureProxy(ICmPicture picture, FwDataMiniLcmApi lexboxLcmApi) : Picture | ||
| { | ||
| public override Guid Id | ||
| { | ||
| get => picture.Guid; | ||
| set => throw new NotImplementedException(); | ||
| } | ||
|
|
||
| public override RichMultiString Caption | ||
| { | ||
| get => new UpdateRichMultiStringProxy(picture.Caption, lexboxLcmApi); | ||
| set => throw new NotImplementedException(); | ||
| } | ||
|
|
||
| public override MediaUri MediaUri | ||
| { | ||
| get => lexboxLcmApi.MediaUriFromLcmPicture(picture); | ||
| set => lexboxLcmApi.SetLcmPictureFile(picture, value); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.