-
-
Notifications
You must be signed in to change notification settings - Fork 6
A swath of UI bug fixes and small improvements #2018
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
15 commits
Select commit
Hold shift + click to select a range
a008654
Use a button component for Lexbox link
myieye 152b2e5
Unify heights of local and lexbox rows
myieye 103cd68
Fix: whitespace on one side of svg sync-arrow
myieye 58a9a50
Put Last Sync at top of tab where it has more space on mobile
myieye 5682b70
SyncStatusPrimitive: put sync/login buttons in middle
myieye 4a949c2
Fix throttled api resources might never load
myieye f0ba74f
Use debounce for refreshing entry count instead of throttle
myieye 15553cf
Map crdt deserialization/download exceptions to user-readable exceptions
myieye 5fec599
Fix: navigation while focussed in a dirty rich-text-field fails to sa…
myieye 0f9dfde
Improve task done-view items contrast
myieye b229725
Fix error and ws not persisted during task
myieye 1d6cbd5
Remove dist from vs-code search results
myieye 0ac8c8e
Supply root-location in storybook
myieye 9fc1c35
Patch various rich-text errors
myieye 405355a
i18n:extract
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
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 |
|---|---|---|
|
|
@@ -43,5 +43,8 @@ | |
| ], | ||
| "iconify.preview.exclude": [ | ||
| "**/icon-class.ts" | ||
| ] | ||
| ], | ||
| "search.exclude": { | ||
| "**/dist": true | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| namespace LcmCrdt.RemoteSync; | ||
|
|
||
| public class CrdtSyncException : Exception | ||
| { | ||
| public enum CrdtSyncStep { Upload, Download } | ||
|
|
||
| public CrdtSyncStep Step { get; init; } | ||
|
|
||
| public CrdtSyncException(string message, CrdtSyncStep step) : base(message) | ||
| { | ||
| Step = step; | ||
| } | ||
| public CrdtSyncException(string message, CrdtSyncStep step, Exception innerException) : base(message, innerException) | ||
| { | ||
| Step = step; | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| <script lang="ts"> | ||
| import { setupGlobalErrorHandlers } from '$lib/errors/global-errors'; | ||
| import { navigate, Route, Router, useLocation } from 'svelte-routing'; | ||
| import Sandbox from '$lib/sandbox/Sandbox.svelte'; | ||
| import DotnetProjectView from './DotnetProjectView.svelte'; | ||
| import HomeView from './home/HomeView.svelte'; | ||
| import TestProjectView from './TestProjectView.svelte'; | ||
| import { initRootLocation } from '$lib/services/root-location-service'; | ||
|
|
||
| let url = ''; | ||
|
|
||
| setupGlobalErrorHandlers(); | ||
| initRootLocation(useLocation()); | ||
| </script> | ||
|
|
||
| <Route path="/project/:code/*" let:params> | ||
| <Router {url}> | ||
| {#key params.code} | ||
| <DotnetProjectView code={params.code} type="crdt" /> | ||
| {/key} | ||
| </Router> | ||
| </Route> | ||
| <Route path="/fwdata/:name/*" let:params> | ||
| <Router {url}> | ||
| {#key params.name} | ||
| <DotnetProjectView code={params.name} type="fwdata" /> | ||
| {/key} | ||
| </Router> | ||
| </Route> | ||
| <Route path="/paratext/project/:code/*" let:params> | ||
| <Router {url}> | ||
| {#key params.code} | ||
| <DotnetProjectView code={params.code} type="crdt" paratext /> | ||
| {/key} | ||
| </Router> | ||
| </Route> | ||
| <Route path="/paratext/fwdata/:name/*" let:params> | ||
| <Router {url}> | ||
| {#key params.name} | ||
| <DotnetProjectView code={params.name} type="fwdata" paratext /> | ||
| {/key} | ||
| </Router> | ||
| </Route> | ||
| <Route path="/testing/project-view/*"> | ||
| <Router {url}> | ||
| <TestProjectView /> | ||
| </Router> | ||
| </Route> | ||
| <Route path="/"> | ||
| <HomeView /> | ||
| </Route> | ||
| <Route path="/sandbox"> | ||
| <Sandbox /> | ||
| </Route> | ||
| <Route path="/*"> | ||
| {setTimeout(() => navigate('/', { replace: true }))} | ||
| </Route> |
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
25 changes: 19 additions & 6 deletions
25
frontend/viewer/src/lib/components/stomp/stomp-safe-lcm-rich-text-editor.svelte
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 |
|---|---|---|
| @@ -1,34 +1,47 @@ | ||
| <script lang="ts"> | ||
| import {untrack, type ComponentProps} from 'svelte'; | ||
| import {onDestroy, untrack, type ComponentProps} from 'svelte'; | ||
| import {StompGuard} from './stomp-guard.svelte'; | ||
| import {mergeProps} from 'bits-ui'; | ||
| import LcmRichTextEditor from '../lcm-rich-text-editor/lcm-rich-text-editor.svelte'; | ||
| import {useIdleService} from '$lib/services/idle-service'; | ||
| import {useRootLocation} from '$lib/services/root-location-service'; | ||
|
|
||
| type Props = ComponentProps<typeof LcmRichTextEditor> & { onchange: () => void }; | ||
|
|
||
| let { value = $bindable(), onchange, ...rest}: Props = $props(); | ||
|
|
||
| const locationService = useRootLocation(); | ||
|
|
||
| const guard = new StompGuard( | ||
| () => value, | ||
| (newValue) => value = newValue | ||
| ); | ||
|
|
||
| let idleService = useIdleService(); | ||
| function onIdle() { | ||
| function commitAnyChanges() { | ||
| if (guard.isDirty) { | ||
| guard.commitAndUnlock(); | ||
| onchange(); | ||
| } | ||
| } | ||
|
|
||
| let idleService = useIdleService(); | ||
| $effect(() => { | ||
| if (idleService.isIdle) untrack(onIdle); | ||
| if (idleService.isIdle) untrack(commitAnyChanges); | ||
| }); | ||
| onDestroy(() => { | ||
| // This is just a precaution. I'm not aware of a scenario where we actually need to commit at this point. | ||
| commitAnyChanges(); | ||
|
|
||
| return locationService.subscribe(() => { | ||
| // This handler is required, because the contenteditable blur event is too late when blurring due to navigation. | ||
| // Calling subscribe seems to be the only reliable way to get the callback triggered in that case. | ||
| commitAnyChanges(); | ||
| }); | ||
| }); | ||
| </script> | ||
|
|
||
| <LcmRichTextEditor bind:value={guard.value} {...mergeProps({ | ||
| onchange: () => { | ||
| guard.commitAndUnlock(); | ||
| commitAnyChanges(); | ||
| } | ||
| }, { onchange }, rest)} /> | ||
| }, rest)} /> |
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.