Skip to content

Colota - Android GPS Location tracker

refactor(ui): cut six field hints to one line each (#868)

Max Dietrich9ed43c947345
diff --git a/apps/docs/docs/configuration/server-settings.md b/apps/docs/docs/configuration/server-settings.md
index 2dcef562..20cb2eea 100644
--- a/apps/docs/docs/configuration/server-settings.md
+++ b/apps/docs/docs/configuration/server-settings.md
@@ -15,7 +15,7 @@ Found under **Settings → Connection**. The Server card opens with a line that
## Endpoint URL
-Your server endpoint must accept HTTP or HTTPS requests (POST or GET depending on your HTTP method setting). The field's helper shows the shape the chosen backend template expects. The address is saved when you leave the field, not on every keystroke, and only when it passes: an address without `http://` or `https://` and a host is refused, and plain `http://` to a public host is refused with "http is refused for a public host. Use https." Plain `http://` to a private host (`192.168.x`, `10.x`, `172.16-31.x`, `100.64.x`, `localhost`) is saved with a warning that it is not encrypted, and an address carrying a key in its query string is saved with a warning that the key is stored with settings, not encrypted, and included in setup links.
+Your server endpoint must accept HTTP or HTTPS requests (POST or GET depending on your HTTP method setting). The field's placeholder shows the shape the chosen backend template expects. The address is saved when you leave the field, not on every keystroke, and only when it passes: an address without `http://` or `https://` and a host is refused, and plain `http://` to a public host is refused with "http is refused for a public host. Use https." Plain `http://` to a private host (`192.168.x`, `10.x`, `172.16-31.x`, `100.64.x`, `localhost`) is saved with a warning that it is not encrypted, and an address carrying a key in its query string is saved with a warning that the key is stored with settings, not encrypted, and included in setup links.
Self-signed and private-CA certificates are supported via three trust paths (system CAs, user-installed device CAs, or an in-app imported CA). Servers that require client-certificate authentication (mTLS) are also supported. See the [mTLS guide](./mtls) for setup.
diff --git a/apps/mobile/src/components/features/settings/ConnectionSettings.tsx b/apps/mobile/src/components/features/settings/ConnectionSettings.tsx
index f3880061..73e1176f 100644
--- a/apps/mobile/src/components/features/settings/ConnectionSettings.tsx
+++ b/apps/mobile/src/components/features/settings/ConnectionSettings.tsx
@@ -270,7 +270,7 @@ export function ConnectionSettings({
}, [testBlocker, commitDraft, draft, settings])
const example = endpointExample(settings.apiTemplate, settings.dawarichMode)
- const helper = `Example: ${example}. https for public hosts, http only on a private host (192.168.x, 10.x, 172.16-31.x, 100.64.x, localhost). %DATE, %YEAR, %MONTH, %DAY and %TIMESTAMP expand when sending.`
+ const helper = "https for public hosts, http only for private hosts."
const ServerGlyph = SERVER_ICONS[server.icon]
return (
@@ -289,10 +289,7 @@ export function ConnectionSettings({
testID="server-state"
/>
<Divider tight />
- <SettingRow
- label="Offline mode"
- hint="On: locations stay on this device and nothing is sent. Off: they sync to the server below."
- >
+ <SettingRow label="Offline mode" hint="Locations stay on this device and nothing is sent.">
<Toggle
accessibilityLabel="Offline mode"
value={settings.isOfflineMode}
diff --git a/apps/mobile/src/components/features/settings/SyncStrategySettings.tsx b/apps/mobile/src/components/features/settings/SyncStrategySettings.tsx
index 8f79155b..d4eba9aa 100644
--- a/apps/mobile/src/components/features/settings/SyncStrategySettings.tsx
+++ b/apps/mobile/src/components/features/settings/SyncStrategySettings.tsx
@@ -284,7 +284,7 @@ export function SyncStrategySettings({
onBlur={() => handleNumericBlur("distance")}
unit={unit}
placeholder="2"
- hint="0 keeps every fix. Both the interval and this distance must pass before a fix is kept; higher saves storage and sync data, not battery. Not applied in a pause zone or by a stationary profile."
+ hint="Skips a fix closer than this to the last one. 0 keeps every fix. Saves storage, not battery."
error={wholeNumberError(distanceInput, NUMERIC_MIN.distance, unit)}
message={clampNote("distance")}
/>
diff --git a/apps/mobile/src/components/features/settings/__tests__/ConnectionSettings.test.tsx b/apps/mobile/src/components/features/settings/__tests__/ConnectionSettings.test.tsx
index 940adb5a..2fbbfb05 100644
--- a/apps/mobile/src/components/features/settings/__tests__/ConnectionSettings.test.tsx
+++ b/apps/mobile/src/components/features/settings/__tests__/ConnectionSettings.test.tsx
@@ -145,10 +145,11 @@ describe("ConnectionSettings", () => {
expect(queryByTestId("nav-auth-settings")).toBeNull()
})
- it("shows the template's endpoint shape as the persistent helper", () => {
- const { getByText } = renderComponent({ apiTemplate: "traccar" })
+ it("shows the transport rule as the helper and the template's shape as the placeholder", () => {
+ const { getByText, getByTestId } = renderComponent({ apiTemplate: "traccar" })
- expect(getByText(/^Example: http:\/\/192\.168\.1\.10:5055\./)).toBeTruthy()
+ expect(getByText("https for public hosts, http only for private hosts.")).toBeTruthy()
+ expect(getByTestId("endpoint-input").props.placeholder).toMatch(/^http:\/\/192\.168\.1\.10:5055/)
})
it("lists the three server details as rows whose sub is the stored value", () => {
diff --git a/apps/mobile/src/screens/AutoExportScreen.tsx b/apps/mobile/src/screens/AutoExportScreen.tsx
index 2848c2d7..28dd0c93 100644
--- a/apps/mobile/src/screens/AutoExportScreen.tsx
+++ b/apps/mobile/src/screens/AutoExportScreen.tsx
@@ -554,8 +554,8 @@ export function AutoExportScreen(_props: ScreenProps) {
min={0}
hint={
filenameTemplate.includes("{device}")
- ? "Set to 0 for unlimited. Counts only exports named for this device model, so other models sharing the folder are untouched."
- : "Set to 0 for unlimited. Counts every Colota export in the folder. Add {device} to the file name to keep files per device instead."
+ ? "0 keeps every file. Counts only this device's exports in the chosen folder."
+ : "0 keeps every file. Counts the Colota exports in the chosen folder."
}
/>
</Card>
diff --git a/apps/mobile/src/screens/ProfileEditorScreen.tsx b/apps/mobile/src/screens/ProfileEditorScreen.tsx
index bc9bb539..bdce1cb3 100644
--- a/apps/mobile/src/screens/ProfileEditorScreen.tsx
+++ b/apps/mobile/src/screens/ProfileEditorScreen.tsx
@@ -391,8 +391,8 @@ export function ProfileEditorScreen({ navigation, route }: RootScreenProps<"Prof
placeholder={String(defaultProfileDelays(type).activationDelay)}
hint={
isStationary
- ? "At least 0 s. How long every fix must read as still first; 0 switches at the first still fix. Moving again ends the profile at once through the motion sensor."
- : "At least 0 s. How long the condition must hold first. 0 switches at once, longer ignores a brief plug or unplug."
+ ? "How long every fix must read as still; 0 switches at the first still fix. Moving again ends the profile at once."
+ : "How long the condition must hold first. 0 switches at once, longer ignores a brief plug or unplug."
}
error={errorOf("activationDelay")}
message={noteOf("activationDelay")}
@@ -406,7 +406,7 @@ export function ProfileEditorScreen({ navigation, route }: RootScreenProps<"Prof
onBlur={() => handleBlur("deactivationDelay")}
unit="s"
placeholder={String(defaultProfileDelays(type).deactivationDelay)}
- hint="At least 0 s. How long after the condition ends before Tracking & sync applies again. Longer rides out a brief gap so the profile does not flap."
+ hint="How long the profile stays on after its condition ends. Longer rides out a brief gap."
error={errorOf("deactivationDelay")}
message={noteOf("deactivationDelay")}
/>
diff --git a/apps/mobile/src/screens/__tests__/AutoExportScreen.test.tsx b/apps/mobile/src/screens/__tests__/AutoExportScreen.test.tsx
index c3190c2c..4472288c 100644
--- a/apps/mobile/src/screens/__tests__/AutoExportScreen.test.tsx
+++ b/apps/mobile/src/screens/__tests__/AutoExportScreen.test.tsx
@@ -529,7 +529,7 @@ describe("AutoExportScreen", () => {
const { getByTestId, getByText } = render(<AutoExportScreen {...mockProps} />)
await waitFor(() => {
- expect(getByText(/Set to 0 for unlimited/)).toBeTruthy()
+ expect(getByText("0 keeps every file. Counts the Colota exports in the chosen folder.")).toBeTruthy()
})
const input = getByTestId("numeric-input-Files to keep")
@@ -630,7 +630,7 @@ describe("AutoExportScreen", () => {
const { getByText } = render(<AutoExportScreen {...mockProps} />)
await waitFor(() => {
- expect(getByText(/Counts only exports named for this device model/)).toBeTruthy()
+ expect(getByText("0 keeps every file. Counts only this device's exports in the chosen folder.")).toBeTruthy()
})
})
diff --git a/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx b/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx
index c964f74f..f470a9c2 100644
--- a/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx
+++ b/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx
@@ -222,7 +222,11 @@ describe("ProfileEditorScreen", () => {
expect(getByText("0 m")).toBeTruthy()
expect(queryByTestId("distance-input")).toBeNull()
expect(queryByTestId("deactivation-delay-input")).toBeNull()
- expect(getByText(/How long every fix must read as still first/)).toBeTruthy()
+ expect(
+ getByText(
+ "How long every fix must read as still; 0 switches at the first still fix. Moving again ends the profile at once."
+ )
+ ).toBeTruthy()
})
it("warns above 60 s without blocking Save", () => {