mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 09:38:54 +00:00
style(docsync): drop dash punctuation from the added comments and test titles
The lines this branch adds used em and en dashes as sentence punctuation across comments, JSDoc, CSS comments and test titles. Each one is rewritten with a comma, a colon, parentheses or a second sentence, keeping what the sentence said. Only lines this branch adds are touched; everything that already exists on dev stays as it is. No logic, error code or logged message changes. The only string literals affected are describe and it titles, which now read "X: topic" like the rest of the provider tests.
This commit is contained in:
@@ -1361,7 +1361,7 @@ export const filesApi = {
|
||||
/**
|
||||
* Document sync: one provider connection per trip, shared by every member.
|
||||
*
|
||||
* Trip-scoped rather than user-scoped on purpose — a per-user connection would
|
||||
* Trip-scoped rather than user-scoped on purpose: a per-user connection would
|
||||
* make a document's visibility depend on whose credentials fetched it, which is
|
||||
* the opposite of what a shared trip needs.
|
||||
*/
|
||||
|
||||
@@ -81,7 +81,7 @@ export const HANDLED_OUTSIDE_TRIP_STORE = [
|
||||
// who has the book open, and where their pointers are)
|
||||
'journey:book:peers',
|
||||
'journey:book:cursor',
|
||||
// Document sync — components/Files/docsync/useDocSync re-reads the bindings
|
||||
// Document sync: components/Files/docsync/useDocSync re-reads the bindings
|
||||
// and their counts. Content-free like the bag ping: what a run changed is
|
||||
// per-binding server state, and the files it moved arrive as file:* events.
|
||||
'docsync:changed',
|
||||
|
||||
@@ -480,7 +480,7 @@ describe('DocSyncConnectModal with a connection already stored', () => {
|
||||
await screen.findByPlaceholderText('••••••••')
|
||||
// The address is a column of its own rather than a settings entry. Reading
|
||||
// it out of settings left the box empty over its placeholder while the form
|
||||
// went on submitting the stored value — the field and the request quietly
|
||||
// went on submitting the stored value, the field and the request quietly
|
||||
// disagreeing about what the connection is.
|
||||
await waitFor(() =>
|
||||
expect(screen.getByPlaceholderText('https://cloud.example.com')).toHaveValue('https://cloud.example.com'),
|
||||
|
||||
@@ -144,7 +144,7 @@ function Verdict({
|
||||
}: {
|
||||
verdict: { connected: boolean; account?: string; error?: string } | null
|
||||
busy: boolean
|
||||
/** A call that failed outside the connection test — saving, most of all. */
|
||||
/** A call that failed outside the connection test (saving, most of all). */
|
||||
failure: string | null
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@@ -18,8 +18,8 @@ export interface FlowHoldings {
|
||||
/**
|
||||
* The direction control, drawn as what it actually is.
|
||||
*
|
||||
* A document sync has one characteristic picture — two places and things moving
|
||||
* between them — and a dropdown reading "Both ways" hides it behind a word.
|
||||
* A document sync has one characteristic picture (two places and things moving
|
||||
* between them), and a dropdown reading "Both ways" hides it behind a word.
|
||||
* Here the two ends carry what each side is holding, the lanes between them
|
||||
* carry the direction, and switching direction means switching a lane off. It
|
||||
* is the one loud element in the dialog; everything around it stays quiet.
|
||||
@@ -113,7 +113,7 @@ export default function DocSyncFlow({
|
||||
/**
|
||||
* One end of the flow: the mark, the count, the name.
|
||||
*
|
||||
* The count is the largest thing in the box on purpose — "is my stuff over
|
||||
* The count is the largest thing in the box on purpose: "is my stuff over
|
||||
* there" is the question that makes somebody open this dialog, and it should be
|
||||
* answered before they read a word.
|
||||
*/
|
||||
@@ -197,8 +197,8 @@ function Lane({
|
||||
{caption}
|
||||
</span>
|
||||
|
||||
{/* Only while a run is in flight. An idle lane needs no track — that it is
|
||||
on or off is already in its fill — and a permanent line just asks the
|
||||
{/* Only while a run is in flight. An idle lane needs no track (that it is
|
||||
on or off is already in its fill), and a permanent line just asks the
|
||||
reader what it means. */}
|
||||
{moving && (
|
||||
<span
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* pretending the archive is empty.
|
||||
*
|
||||
* The component takes the `useDocSync` hook as a prop, so the double here is the
|
||||
* real hook with `api/client` mocked underneath — the assertions are then about
|
||||
* real hook with `api/client` mocked underneath, so the assertions are about
|
||||
* the requests that actually leave, not about a hand-written stand-in. The hook
|
||||
* is created with `enabled: false` because the panel-level lists it would fetch
|
||||
* belong to the dialog around this modal, not to the picker.
|
||||
@@ -299,7 +299,7 @@ describe('DocSyncScopeModal creating a folder', () => {
|
||||
|
||||
it('FE-DOCSYNC-SCOPE-021: a refused create says why instead of doing nothing', async () => {
|
||||
// The create had no failure path at all: the rejection escaped the click
|
||||
// handler unhandled, nothing was bound, and the dialog said nothing — the
|
||||
// handler unhandled, nothing was bound, and the dialog said nothing: the
|
||||
// button blinked and the person was left guessing. Every other write in the
|
||||
// hook reports, and so does this one now.
|
||||
createScope.mockRejectedValue({ response: { data: { error: 'quota_exceeded' } } })
|
||||
|
||||
@@ -54,7 +54,7 @@ export function useConflicts(tripId: number | string, sync: ReturnType<typeof us
|
||||
setWorking(itemId)
|
||||
try {
|
||||
await sync.resolveConflict(itemId, keep)
|
||||
// The row is gone from this list either way — it was resolved, or the
|
||||
// The row is gone from this list either way: it was resolved, or the
|
||||
// call failed and `sync.error` says so. Re-reading is what tells the
|
||||
// difference, rather than removing it here and hoping.
|
||||
await reload()
|
||||
|
||||
@@ -50,7 +50,7 @@ export function useConnectForm(
|
||||
): ConnectForm {
|
||||
const [values, setValues] = useState<Record<string, string>>({})
|
||||
// Null until touched, so a connection that arrives after the form opened is
|
||||
// still reflected — seeding from `existing` at mount showed a stored "allow
|
||||
// still reflected. Seeding from `existing` at mount showed a stored "allow
|
||||
// self-signed" as off and wrote that back on the next save.
|
||||
const [insecure, setInsecure] = useState<boolean | null>(null)
|
||||
|
||||
@@ -75,7 +75,7 @@ export function useConnectForm(
|
||||
// The address stays in here as well as in its own argument: the server walks
|
||||
// the provider's fields over `credentials` and would otherwise store no
|
||||
// `base_url` setting. It special-cases the key when checking completeness, so
|
||||
// dropping it changes nothing it needs — but it is an established request
|
||||
// dropping it changes nothing it needs, but it is an established request
|
||||
// shape and this is not the change to alter it in.
|
||||
const credentials = Object.fromEntries(
|
||||
Object.entries(values).filter(([k]) => k !== INSECURE_TLS_FIELD),
|
||||
|
||||
@@ -7,7 +7,7 @@ import React from 'react'
|
||||
* they sit in a row of lucide icons and in a list of addon toggles, where a
|
||||
* full-colour badge among line icons reads as the one thing that is switched
|
||||
* on. Following the text colour also means they invert with the theme without a
|
||||
* second asset — black on light, white on dark.
|
||||
* second asset: black on light, white on dark.
|
||||
*
|
||||
* Not in `public/brands/` beside AirTrail and Dawarich, because those are the
|
||||
* files each project ships, served unmodified. These are deliberately modified:
|
||||
|
||||
@@ -507,7 +507,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti
|
||||
}
|
||||
|
||||
/* Dokumentenabgleich: die aktive Bahn laeuft, WAEHREND ein Lauf laeuft.
|
||||
Bewegung als Antwort auf eine Handlung, nicht als Dekoration — sie hoert auf,
|
||||
Bewegung als Antwort auf eine Handlung, nicht als Dekoration: sie hoert auf,
|
||||
sobald der Lauf durch ist, und sagt in der Zwischenzeit, in welche Richtung
|
||||
gerade etwas unterwegs ist. */
|
||||
@keyframes trek-docsync-lane {
|
||||
@@ -526,7 +526,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti
|
||||
animation-direction: reverse;
|
||||
}
|
||||
|
||||
/* Die abgeschaltete Richtung bekommt eine Schraffur — dasselbe Zeichen, das eine
|
||||
/* Die abgeschaltete Richtung bekommt eine Schraffur, dasselbe Zeichen, das eine
|
||||
gesperrte Flaeche ueberall traegt. Es liest sich als "hier geht nichts durch",
|
||||
ohne dass die Bahn verschwindet und die Zeile zusammenklappt. */
|
||||
.trek-docsync-lane-off {
|
||||
@@ -636,7 +636,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti
|
||||
.trek-lowfuel {
|
||||
animation: none;
|
||||
}
|
||||
/* Die Bahn bleibt sichtbar, sie laeuft nur nicht mehr — die Aussage
|
||||
/* Die Bahn bleibt sichtbar, sie laeuft nur nicht mehr. Die Aussage
|
||||
"hier ist gerade etwas unterwegs" traegt auch im Stillstand. */
|
||||
.trek-docsync-lane-run {
|
||||
animation: none;
|
||||
|
||||
@@ -5,8 +5,8 @@ import { isEffectivelyOnline, onNetworkModeChange } from './networkMode'
|
||||
/**
|
||||
* How long pings are collected before one refetch goes out.
|
||||
*
|
||||
* Long enough to fold a burst into a single request — clearing twelve checked
|
||||
* items issues twelve deletes, and an import writes a whole list — short enough
|
||||
* Long enough to fold a burst into a single request (clearing twelve checked
|
||||
* items issues twelve deletes, and an import writes a whole list), short enough
|
||||
* that a single edit still reads as instant.
|
||||
*/
|
||||
const COALESCE_MS = 250
|
||||
@@ -19,7 +19,7 @@ const COALESCE_MS = 250
|
||||
* whose items this client may not see, and a document-sync run reports counts
|
||||
* that are only meaningful read back from the server. Every such ping is a
|
||||
* refetch, which is why this coalesces bursts and never lets two requests
|
||||
* overlap — the server pings the whole room including the originating socket, so
|
||||
* overlap: the server pings the whole room including the originating socket, so
|
||||
* a busy trip would otherwise have every client refetching once per written row.
|
||||
*
|
||||
* A ping sent while this client is disconnected is gone for good, so the two
|
||||
|
||||
Reference in New Issue
Block a user