Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cfd1bd0
wire up project picker
hahn-kev Apr 9, 2025
e224cbc
show the current project as selected in the dropdown
hahn-kev Apr 9, 2025
0dab504
Playwright screenshots for fw lite ui (#1590)
hahn-kev Apr 10, 2025
aa834a6
Merge branch 'develop' into shadcn-ui-main
hahn-kev Apr 18, 2025
7f34f8a
change index.html in viewer so when you open it you're taken to /test…
hahn-kev Apr 23, 2025
4e364d0
Migrate dialogs to shadcn (#1612)
hahn-kev Apr 24, 2025
6458230
Use runes for project services (#1593)
hahn-kev Apr 24, 2025
7e18323
run CI on PRs for shadcn main
hahn-kev Apr 24, 2025
d293158
fix up viewer to work with new project context
hahn-kev Apr 24, 2025
8354d66
fix up viewer-specific lint errors by using project context for tests
hahn-kev Apr 24, 2025
a4c4fbb
Refactor editor classes to editor components (#1619)
myieye Apr 24, 2025
d0e2b12
Migrate entry select dialog (#1620)
hahn-kev Apr 29, 2025
7705cd7
Shadcn Single-select (#1623)
myieye Apr 29, 2025
f1911ea
Make rich-text-editor support readonly mode (#1624)
myieye Apr 29, 2025
33e8cc3
Ensure user can tab to readonly rich-text just like other inputs (#1638)
myieye Apr 30, 2025
75b08d4
Fix entry view and filter outline overflow (#1639)
myieye Apr 30, 2025
f4e4f69
WS single and multi inputs (#1637)
myieye Apr 30, 2025
a446e96
hook up delete buttons in new project view (#1635)
hahn-kev Apr 30, 2025
6804eeb
display a dictionary preview on the entry list (#1641)
hahn-kev May 1, 2025
17cc0f7
update bits ui to fix issue on popup close
hahn-kev May 2, 2025
f740656
Merge remote-tracking branch 'origin/develop' into shadcn-ui-main
myieye May 2, 2025
f308f86
Tweak muted backgrounds (#1647)
myieye May 8, 2025
1cf3af0
1636 editor layout (#1654)
myieye May 9, 2025
0f8434f
Fix matching projects (#1653)
myieye May 9, 2025
4ee1090
Migrate components, complex forms and sense and example sentence acti…
myieye May 13, 2025
9412d21
Url state tracking (ShadCN) (#1662)
hahn-kev May 15, 2025
131dfba
Merge branch 'develop' into shadcn-ui-main
hahn-kev May 15, 2025
f6bf6e5
hide audio writing systems since we don't support them
hahn-kev May 15, 2025
fb3793c
fix linting
hahn-kev May 15, 2025
0da0e2f
remove svelte ux from tailwind (#1664)
hahn-kev May 15, 2025
55a182c
fix icon button styles, add a sandbox which shows button configurations
hahn-kev May 15, 2025
123882d
Don't run install 3 times (#1669)
myieye May 15, 2025
3989c11
Merge remote-tracking branch 'origin/develop' into shadcn-ui-main
myieye May 15, 2025
db9dfbc
cleanup lint errors
hahn-kev May 16, 2025
e7946a9
fix DictionaryEntry.svelte links
hahn-kev May 16, 2025
ee0b250
show history when clicking the history button on an entry
hahn-kev May 16, 2025
533b687
Merge remote-tracking branch 'origin/develop' into shadcn-ui-main
myieye May 16, 2025
7a4b9f5
Finalize shadcn buttons (#1670)
myieye May 19, 2025
1ba7c3d
fix lint error
hahn-kev May 19, 2025
0fc843b
fix more lint errors
hahn-kev May 19, 2025
74fbe42
Persist changes in EntryView.svelte (#1671)
hahn-kev May 19, 2025
b4aa0f0
Setup back handler (#1673)
hahn-kev May 19, 2025
5a48a98
Make svelte-check and lint happy
myieye May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/fw-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
branches:
- develop
- main
- shadcn-ui-main #just for now ensure PRs to this branch have checks run
env:
VIEWER_BUILD_OUTPUT_DIR: backend/FwLite/FwLiteShared/wwwroot/viewer
jobs:
Expand Down
8 changes: 8 additions & 0 deletions backend/FwLite/FwLiteShared/Events/EntryDeletedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace FwLiteShared.Events;

public class EntryDeletedEvent(Guid entryId) : IFwEvent
{
public FwEventType Type => FwEventType.EntryDeleted;
public bool IsGlobal => false;
public Guid EntryId { get; init; } = entryId;
}
2 changes: 2 additions & 0 deletions backend/FwLite/FwLiteShared/Events/IFwEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace FwLiteShared.Events;

[JsonPolymorphic]
[JsonDerivedType(typeof(EntryChangedEvent), nameof(EntryChangedEvent))]
[JsonDerivedType(typeof(EntryDeletedEvent), nameof(EntryDeletedEvent))]
[JsonDerivedType(typeof(ProjectEvent), nameof(ProjectEvent))]
[JsonDerivedType(typeof(AuthenticationChangedEvent), nameof(AuthenticationChangedEvent))]
public interface IFwEvent
Expand All @@ -19,4 +20,5 @@ public enum FwEventType
EntryChanged,
AuthenticationChanged,
ProjectEvent,
EntryDeleted
}
4 changes: 3 additions & 1 deletion backend/FwLite/FwLiteShared/Pages/CrdtProject.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@page "/project/{projectName}"
@page "/project/{projectName}/{*path}"
@using FwLiteShared.Layout
@layout SvelteLayout;

@code {
[Parameter]
public required string ProjectName { get; set; }
[Parameter]
public required string Path { get; set; }
}
4 changes: 3 additions & 1 deletion backend/FwLite/FwLiteShared/Pages/FwdataProject.razor
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@page "/fwdata/{projectName}"
@page "/fwdata/{projectName}/{*path}"
@using FwLiteShared.Layout
@layout SvelteLayout;

@code {

[Parameter]
public required string ProjectName { get; set; }
[Parameter]
public required string Path { get; set; }

}
9 changes: 7 additions & 2 deletions backend/FwLite/FwLiteShared/Pages/Sandbox.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@page "/sandbox"
@page "/sandbox/{*path}"
@using FwLiteShared.Layout
@using FwLiteShared.Services
@layout SvelteLayout;

@*this looks empty because it is, but it's required to declare the route which is then used by the svelte router*@
@code {

[Parameter]
public required string Path { get; set; }

}
9 changes: 8 additions & 1 deletion backend/FwLite/FwLiteShared/Pages/TestingProject.razor
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
@page "/testing/project-view"
@page "/testing/project-view/{*path}"
@using FwLiteShared.Layout
@layout SvelteLayout;

@code {

[Parameter]
public required string Path { get; set; }

}
23 changes: 23 additions & 0 deletions backend/FwLite/FwLiteShared/Services/MiniLcmApiNotifyWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ public async Task NotifyEntryChangedAsync(Guid entryId)
bus.PublishEntryChangedEvent(project, entry);
}

public void NotifyEntryDeleted(Guid entryId)
{
bus.PublishEvent(project, new EntryDeletedEvent(entryId));
}

// ********** Overrides go here **********

async Task<Entry> IMiniLcmWriteApi.CreateEntry(Entry entry)
Expand Down Expand Up @@ -105,6 +110,24 @@ async Task IMiniLcmWriteApi.DeleteComplexFormComponent(ComplexFormComponent comp
await NotifyEntryChangedAsync(complexFormComponent.ComponentEntryId);
}

async Task IMiniLcmWriteApi.DeleteEntry(Guid id)
{
await _api.DeleteEntry(id);
NotifyEntryDeleted(id);
}

async Task IMiniLcmWriteApi.DeleteSense(Guid entryId, Guid senseId)
{
await _api.DeleteSense(entryId, senseId);
await NotifyEntryChangedAsync(entryId);
}

async Task IMiniLcmWriteApi.DeleteExampleSentence(Guid entryId, Guid senseId, Guid exampleSentenceId)
{
await _api.DeleteExampleSentence(entryId, senseId, exampleSentenceId);
await NotifyEntryChangedAsync(entryId);
}

void IDisposable.Dispose()
{
}
Expand Down
8 changes: 8 additions & 0 deletions backend/FwLite/FwLiteShared/Sync/SyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using MiniLcm;
using MiniLcm.Models;
using SIL.Harmony;
using SIL.Harmony.Changes;

namespace FwLiteShared.Sync;

Expand Down Expand Up @@ -95,6 +96,13 @@ private async Task SendNotifications(SyncResults syncResults)
logger.LogError("Failed to get entry {EntryId}, was not found", entryId);
}
}

foreach (var deleteChange in syncResults.MissingFromLocal
.SelectMany(c => c.ChangeEntities, (_, change) => change.Change)
.OfType<DeleteChange<Entry>>())
{
changeEventBus.PublishEvent(currentProjectService.Project, new EntryDeletedEvent(deleteChange.EntityId));
}
}
catch (Exception e)
{
Expand Down
6 changes: 3 additions & 3 deletions backend/FwLite/FwLiteWeb/Routes/FwIntegrationRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static IEndpointConventionBuilder MapFwIntegrationRoutes(this WebApplicat
});
return operation;
});
group.MapGet("/open/entry/{id}",
group.MapGet("/link/entry/{id}",
async ([FromServices] FwDataProjectContext context,
[FromServices] IHubContext<FwDataMiniLcmHub, ILexboxHubClient> hubContext,
[FromServices] FwDataFactory factory,
Expand All @@ -29,8 +29,8 @@ public static IEndpointConventionBuilder MapFwIntegrationRoutes(this WebApplicat
if (context.Project is null) return Results.BadRequest("No project is set in the context");
await hubContext.Clients.Group(context.Project.Name).OnProjectClosed(CloseReason.Locked);
factory.CloseProject(context.Project);
//need to use redirect as a way to not trigger flex until after we have closed the project
return Results.Redirect(FwLink.ToEntry(id, context.Project.Name));
var link = FwLink.ToEntry(id, context.Project.Name);
return Results.Text(link, "text/plain");
});
return group;
}
Expand Down
6 changes: 5 additions & 1 deletion frontend/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ tasks:
- task: fw-lite-infr-internal

fw-lite-infr-internal:
deps: [ viewer-dev, https-oauth-authority ]
internal: true
deps: [ viewer:run-app, run-https-proxy ]

playwright-tests:
aliases: [ pt ]
Expand Down Expand Up @@ -80,6 +81,9 @@ tasks:
cmds:
- corepack enable || true
- pnpm install
run-https-proxy:
dir: ./https-proxy
cmd: pnpm run dev
https-proxy:
dir: ./https-proxy
desc: "MSAL requires the oauth authority to be available over https. That's why this is here. As a bonus it dynamically looks for the UI either locally or in k8s."
Expand Down
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@graphql-codegen/typescript": "^4.1.6",
"@graphql-typed-document-node/core": "^3.2.0",
"@iconify-json/mdi": "^1.2.3",
"@playwright/test": "^1.52.0",
"@playwright/test": "catalog:",
"@stylistic/eslint-plugin": "catalog:",
"@sveltejs/adapter-node": "^5.2.12",
"@sveltejs/kit": "2.20.7",
Expand Down Expand Up @@ -102,7 +102,7 @@
"js-cookie": "^3.0.5",
"just-order-by": "^1.0.0",
"mjml": "^4.15.3",
"runed": "^0.26.0",
"runed": "catalog:",
"set-cookie-parser": "^2.7.1",
"svelte-exmarkdown": "catalog:",
"svelte-intl-precompile": "^0.12.3",
Expand Down
Loading
Loading