-
-
Notifications
You must be signed in to change notification settings - Fork 6
Rework the activity view: readable summaries and a before/after diff #2388
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
Closed
Closed
Changes from 8 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
a21704a
Rework the activity view: readable change summaries and a before/afte…
myieye d74c664
Reframe reorder summaries and name the type on vocab field edits
myieye 8990c43
Collapse single-entry create commits in the activity panel
myieye 21d1d4e
Bound the activity list, and guard summary/diff coverage with tests
myieye 9f7e728
Tidy after review: barrel exports, test/type tightening, comment trims
myieye 9130fbb
Fix viewer lint on the activity-summary changes
myieye 6d113b4
Drop a dead change handler and add reverse coverage
myieye ff63fe6
Polish activity summaries per review: readability, headwords, layout fix
myieye 4018a28
Merge remote-tracking branch 'origin/develop' into claude/brave-allen…
myieye 3e511aa
Address review round 2 + CodeRabbit: new change types, perf, vocab pr…
myieye 9dbbe57
Merge remote-tracking branch 'origin/develop' into claude/brave-allen…
myieye 64823ca
Fix History button no-op on delete-change cards
myieye e1bfd37
Iterate activity view: CFC preview fixes, sense-create format, exampl…
myieye 4677ab8
Strengthen diff palette: bolder strikethrough, visible kept-outline i…
myieye fcc8596
Give activity summaries a clear hierarchy: bold subject, muted verb, …
myieye 498ae5e
Make Detailed activity mode a change-inspector: group changes by subject
myieye bc3f266
Fix three activity-preview data-fidelity issues
myieye 2e1438f
Handle audio field values generically in activity summaries
myieye 6914184
Show the historical entry in collapsed create-entry previews
myieye 8c6fde6
Render collapsed create-entry preview with diff components, not the r…
myieye 4cf3f88
Summarize media resources by kind + play them in the preview
myieye 72f408e
Show and play audio writing systems in diff previews
myieye 45a674f
Make media-resource commits show as audio and play in the preview
myieye 4e871db
Polish audio diffs: editor 'No audio' placeholder + gutter-marked add…
myieye f174e32
Name endpoints on removed-component summaries
myieye a435604
Detailed mode: change-kind gutter glyphs + a more generous change cap
myieye eb87d3e
Diff custom views, and guard vocab field coverage
myieye 3806751
Use an mdi arrow for the single-select before→after transition
myieye a2e7f70
Show readable names for custom-view base and writing-system type enums
myieye 2a4d25f
Number senses positionally like FieldWorks, not by gloss duplication
myieye eafa809
Drop the change-type-names stripe from the preview
myieye 4940b90
Collapse a create-sense commit into a single sense + examples view
myieye 87aba1c
Add a per-author coloured person icon to activity rows
myieye f8fa0d5
Merge remote-tracking branch 'origin/develop' into claude/brave-allen…
myieye fe4bdad
Extract EntryHeadwordButton for reuse in collapsed previews
myieye 93573cc
Add headword button and Preview/Details tabs to collapsed previews
myieye a3728b1
Extract i18n strings for custom-view diff labels
myieye 994a113
Fix viewer ESLint errors surfaced by lint:report
myieye 6272319
Trail the author icon after the name
myieye cc2343d
Only hang-indent Detailed changes inside a subject group
myieye bbf87c7
Flatten the audio diff to full width with just a surface tint
myieye 2e7ac25
Center change-type glyphs and breathe above the row footer
myieye 20a12a1
Center the ungrouped change-type glyph via flex
myieye 6867a74
Mark single-fact rows with a coloured corner cut
myieye 558bf80
Resolve root-entry headwords and deleted-object labels for activity info
myieye 06df785
Style writing-system codes as chips, opting out in the dictionary pre…
myieye e0d362a
Label custom-view fields in the vocab diff and tolerate null lists
myieye 4022f29
Assign distinct author colours across the project's author set
myieye 355efd0
Group activity rows by entry tree with bold names for created and del…
myieye 542ec9d
Merge remote-tracking branch 'origin/develop' into claude/brave-allen…
myieye aa27c51
Summarize comment changes from develop in the activity feed
myieye 91da2ea
Keep the group indent rail visible on selected rows
myieye 638fae5
Merge remote-tracking branch 'origin/develop' into claude/brave-allen…
myieye 0874e55
Bold the entity name in grouped sub-item summaries
myieye 726626c
Darken writing-system code text to clear WCAG AA contrast
myieye c929da0
Guard entity-config coverage test against a silent empty parse
myieye c0bf70d
Merge branch 'develop' into claude/brave-allen-91bf15
myieye 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
41 changes: 41 additions & 0 deletions
41
backend/FwLite/FwLiteShared/TypeGen/ChangeTypesCodeGenerator.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,41 @@ | ||
| using System.Reflection; | ||
| using LcmCrdt; | ||
| using Reinforced.Typings; | ||
| using Reinforced.Typings.Ast; | ||
| using Reinforced.Typings.Generators; | ||
|
|
||
| namespace FwLiteShared.TypeGen; | ||
|
|
||
| /// <summary> | ||
| /// Emits a `ChangeType` string-literal union and a `knownChangeTypes` array built from the registered CRDT | ||
| /// change types (<see cref="LcmCrdtKernel.AllChangeTypes"/>) and each type's <c>IPolyType.TypeName</c> | ||
| /// (the serialized <c>$type</c> discriminator). Attached to the <c>ChangeTypes</c> marker; suppresses the | ||
| /// marker's own output. | ||
| /// </summary> | ||
| public class ChangeTypesCodeGenerator : ClassCodeGenerator | ||
| { | ||
| public override RtClass GenerateNode(Type element, RtClass result, TypeResolver resolver) | ||
| { | ||
| var typeNames = LcmCrdtKernel.AllChangeTypes() | ||
| .Select(GetChangeTypeName) | ||
| .Distinct() | ||
| .OrderBy(name => name, StringComparer.Ordinal) | ||
| .ToArray(); | ||
|
|
||
| var union = string.Concat(typeNames.Select(name => $"\n | '{name}'")); | ||
| var array = string.Concat(typeNames.Select(name => $"\n '{name}',")); | ||
|
|
||
| Context.Location.CurrentNamespace.CompilationUnits.Add(new RtRaw( | ||
| $"export type ChangeType ={union};\n\nexport const knownChangeTypes = [{array}\n] as const satisfies readonly ChangeType[];\n")); | ||
|
|
||
| // Suppress the marker class; only the raw union/array above is emitted. | ||
| return null!; | ||
| } | ||
|
|
||
| private static string GetChangeTypeName(Type changeType) | ||
| { | ||
| var typeNameProperty = changeType.GetProperty("TypeName", | ||
| BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy); | ||
| return typeNameProperty?.GetValue(null) as string ?? changeType.Name; | ||
| } | ||
| } | ||
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,10 @@ | ||
| // Namespace is LcmCrdt (not FwLiteShared.TypeGen) on purpose: Reinforced.Typings derives the generated | ||
| // file's path from the type's namespace, so this keeps the output at generated-types/LcmCrdt/ChangeTypes.ts. | ||
| namespace LcmCrdt; | ||
|
|
||
| /// <summary> | ||
| /// Marker type only — no members. Reinforced.Typings (via <c>ChangeTypesCodeGenerator</c>) emits the | ||
| /// <c>ChangeType</c> string-literal union and <c>knownChangeTypes</c> array into ChangeTypes.ts from the | ||
| /// registered change types, so the frontend has a generated, exhaustive list of change <c>$type</c> values. | ||
| /// </summary> | ||
| internal sealed class ChangeTypes; |
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.