From 79a741ccc27b37bcb3e08b78fd57c78ba1e32758 Mon Sep 17 00:00:00 2001 From: Guido Doumen Date: Sat, 14 Nov 2026 16:40:20 +0100 Subject: [PATCH 1/4] feat: render the apps dialog from the list provided by the apps service Remove the hardcoded list of apps from the apps dialog. Entries come from the apps service (name, key, connection status), so newly supported apps show up without changes in the app. The OAuth settings use the name provided by the service for the title and the connect button (Strava keeps its official button) and pass the expiration of the access token on to the service, like all other credentials. Remove the unused iconUrl and intervals.png. --- src/assets/intervals.png | Bin 12635 -> 0 bytes .../AppsDialog/AppsDialog.stories.tsx | 24 +++--- src/components/AppsDialog/AppsDialog.test.tsx | 6 +- .../AppsDialog/AppsDialogView.test.tsx | 44 ++++++++-- src/components/AppsDialog/AppsDialogView.tsx | 27 +++--- src/components/AppsSettings/types.ts | 1 - .../OAuthAppSettings.credentials.test.tsx | 77 ++++++++++++++++++ .../OAuthAppSettings.generic.test.tsx | 58 +++++++++++++ .../OAuthAppSettings/OAuthAppSettings.tsx | 29 ++++--- src/components/OAuthAppSettings/types.ts | 5 +- 10 files changed, 217 insertions(+), 54 deletions(-) delete mode 100644 src/assets/intervals.png create mode 100644 src/components/OAuthAppSettings/OAuthAppSettings.credentials.test.tsx create mode 100644 src/components/OAuthAppSettings/OAuthAppSettings.generic.test.tsx diff --git a/src/assets/intervals.png b/src/assets/intervals.png deleted file mode 100644 index 4289e66ff72b640964f753d5bd9358d9bcc9e3ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12635 zcmch;^;=Zm7dE_S7`ht?K|&CbkPcyxRLVq3Kt(`6x^n;lX%H2pyOoxfp(G`wdnoDd zn)A%(`My8Af5CHIb6sb4%)Qoq?>PIcvnKSBwi-DJGYJ5I{DHdi695pnuP{J_hr2Le z95Mia2OeoYQ^6HGsFmvL>(2%z^Yin~Zi+8Ia^Cw=bbNgL_3PJsR)sm%Ct=*u+I)Ny z6BFA($z^3_eSLknrlZQXUySz`78bU)wj6oIBO@cby1Le_Lg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#S{9NKLuXxuh;f4sXVzFT#N?Vd*I z3tpNt@8fp||NbPMPukQ9@Jmgbi;emGSiG1zlf6mOvclUpHN5m|W7uUAYDhasi@$P9 zs=tWlbE#NsbQ#*82#cKfwf1VvFuwS3{pD3UK%}ds8cfQ#UwuoP^_^)LJjgY6TYDN` znfhz4x2Dza401C*ncQ+q{v%mP*nhaw?`gKyAkOu3bi{>K#B+9B!%gmK`X~Csm+5w@ z7aCqhrq~#Vw_(7A^Y6dDHx^SRs8*C>Hd@r+^oX8+* zTAt=2R@yA|;Yx~Vfv>fjj0!6DAi_jcvjf%{0uVriSJZl6ZTtN+-R5v_^-rL8o!}wW z2TFoT=SgW&>tyHmGScq`Wu~wS!kdJ+>^`2X;`8^d=_#Veg8XGzY&6M*2rk#Kd+le6 zB=}$A;b8aSRLeGYaLOQP3Zcjv>pVf_2+dI`(>)5{xZJy6LsII`3Wzv0@3Y|zoTPEw z&(&~uMNQ>Hw94a~#MXB(&V$z`5sGwFvVNdx;9NnGj!;+LU;YN95WvS!e2jk@a0wA- zy05;fk{wTIu7sjF!a^B~IX^Ht;@`nx#J*zW=|zM=Dpc(q20eI6V%KQLVE~tQs&3MA z0I#fpI>R6>Dm5w(cErF+8b{c*sW_!&gbS8ek?JgChS6gKYl3jbO5#dcn_CUeP<2m> zEt4XZjAoA#l=i<|((InwFgNIh<%*DEC1;%`sjZ@Euh=>kF*wP0Asn*}-S~4woca9k zw$#S9AFDo=IP>U<>nD{Rg;051pKgzz2T8v?p`?^F^7?h0U+C0wx84POGT*!iIF`DN zTDiV2>u?nRcf`8pfp35me68Gdl5av9&Z4SisBzmD;h;QpGF<)+ucUE5f&9(1NAv$L o5jV%@*ZpRl8e@TD`D%#3F?wbbuA7c8g1poj5 diff --git a/src/components/AppsDialog/AppsDialog.stories.tsx b/src/components/AppsDialog/AppsDialog.stories.tsx index 161de15f..f2d32f02 100644 --- a/src/components/AppsDialog/AppsDialog.stories.tsx +++ b/src/components/AppsDialog/AppsDialog.stories.tsx @@ -57,9 +57,9 @@ const meta: Meta = { visible: true, onClose: fn(), apps: [ - { name: 'Strava', key: 'strava', iconUrl: '', isConnected: true }, - { name: 'Intervals.icu', key: 'intervals', iconUrl: '', isConnected: false }, - { name: 'Komoot', key: 'komoot', iconUrl: '', isConnected: false }, + { name: 'Strava', key: 'strava', isConnected: true }, + { name: 'Intervals.icu', key: 'intervals', isConnected: false }, + { name: 'Komoot', key: 'komoot', isConnected: false }, ], renderApp: (key) => , }, @@ -74,9 +74,9 @@ export const Default: Story = {}; export const AllDisconnected: Story = { args: { apps: [ - { name: 'Strava', key: 'strava', iconUrl: '', isConnected: false }, - { name: 'Intervals.icu', key: 'intervals', iconUrl: '', isConnected: false }, - { name: 'Komoot', key: 'komoot', iconUrl: '', isConnected: false }, + { name: 'Strava', key: 'strava', isConnected: false }, + { name: 'Intervals.icu', key: 'intervals', isConnected: false }, + { name: 'Komoot', key: 'komoot', isConnected: false }, ], renderApp: (key) => , }, @@ -85,9 +85,9 @@ export const AllDisconnected: Story = { export const AllConnected: Story = { args: { apps: [ - { name: 'Strava', key: 'strava', iconUrl: '', isConnected: true }, - { name: 'Intervals.icu', key: 'intervals', iconUrl: '', isConnected: true }, - { name: 'Komoot', key: 'komoot', iconUrl: '', isConnected: true }, + { name: 'Strava', key: 'strava', isConnected: true }, + { name: 'Intervals.icu', key: 'intervals', isConnected: true }, + { name: 'Komoot', key: 'komoot', isConnected: true }, ], renderApp: (key) => , }, @@ -96,9 +96,9 @@ export const AllConnected: Story = { export const StravaConnected: Story = { args: { apps: [ - { name: 'Strava', key: 'strava', iconUrl: '', isConnected: true }, - { name: 'Intervals.icu', key: 'intervals', iconUrl: '', isConnected: false }, - { name: 'Komoot', key: 'komoot', iconUrl: '', isConnected: false }, + { name: 'Strava', key: 'strava', isConnected: true }, + { name: 'Intervals.icu', key: 'intervals', isConnected: false }, + { name: 'Komoot', key: 'komoot', isConnected: false }, ], renderApp: (key) => , }, diff --git a/src/components/AppsDialog/AppsDialog.test.tsx b/src/components/AppsDialog/AppsDialog.test.tsx index 7b5f42c8..87857e33 100644 --- a/src/components/AppsDialog/AppsDialog.test.tsx +++ b/src/components/AppsDialog/AppsDialog.test.tsx @@ -9,9 +9,9 @@ jest.mock('incyclist-services', () => { connected: Record = { strava: false, intervals: false, komoot: false }; openSettings = jest.fn(() => ([ - { name: 'Strava', key: 'strava', iconUrl: 's.svg', isConnected: this.connected.strava }, - { name: 'Intervals.icu', key: 'intervals', iconUrl: 'i.svg', isConnected: this.connected.intervals }, - { name: 'Komoot', key: 'komoot', iconUrl: 'k.svg', isConnected: this.connected.komoot }, + { name: 'Strava', key: 'strava', isConnected: this.connected.strava }, + { name: 'Intervals.icu', key: 'intervals', isConnected: this.connected.intervals }, + { name: 'Komoot', key: 'komoot', isConnected: this.connected.komoot }, ])); } diff --git a/src/components/AppsDialog/AppsDialogView.test.tsx b/src/components/AppsDialog/AppsDialogView.test.tsx index e31c9d0f..189725a8 100644 --- a/src/components/AppsDialog/AppsDialogView.test.tsx +++ b/src/components/AppsDialog/AppsDialogView.test.tsx @@ -17,9 +17,9 @@ jest.mock("../KomootSettings/KomootSettings", () => ({ })) const MOCK_APPS: AppDisplayProps[] = [ - { name: "Strava", key: "strava", iconUrl: "https://example.com/s.svg", isConnected: true }, - { name: "Intervals.icu", key: "intervals", iconUrl: "https://example.com/i.svg", isConnected: false }, - { name: "Komoot", key: "komoot", iconUrl: "https://example.com/k.svg", isConnected: false }, + { name: "Strava", key: "strava", isConnected: true }, + { name: "Intervals.icu", key: "intervals", isConnected: false }, + { name: "Komoot", key: "komoot", isConnected: false }, ] const MOCK_PROPS: AppsDialogViewProps = { @@ -44,9 +44,43 @@ describe('AppsDialogView', () => { expect(getByText('Strava')).toBeTruthy(); }); - it('renders with empty apps array without crashing', () => { - const { getByText } = render(); + it('renders no entries for an empty apps array', () => { + const { queryByText } = render(); + expect(queryByText('Strava')).toBeNull(); + expect(queryByText('Intervals.icu')).toBeNull(); + expect(queryByText('Komoot')).toBeNull(); + }); + + it('renders exactly the apps provided by the service', () => { + const apps: AppDisplayProps[] = [ + { name: 'Strava', key: 'strava', isConnected: true }, + { name: 'TrainingPeaks', key: 'trainingpeaks', isConnected: false }, + ]; + const { getByText, queryByText } = render(); expect(getByText('Strava')).toBeTruthy(); + expect(getByText('TrainingPeaks')).toBeTruthy(); + expect(queryByText('Intervals.icu')).toBeNull(); + expect(queryByText('Komoot')).toBeNull(); + }); + + it('renders the entries in the order provided by the service', () => { + const apps: AppDisplayProps[] = [ + { name: 'Komoot', key: 'komoot', isConnected: false }, + { name: 'Strava', key: 'strava', isConnected: false }, + ]; + const { getAllByText } = render(); + const names = getAllByText(/Komoot|Strava/).map(n => n.props.children); + expect(names).toEqual(['Komoot', 'Strava']); + }); + + it('expands an app that is not known to the app (generic OAuth settings) with its name', () => { + const apps: AppDisplayProps[] = [{ name: 'TrainingPeaks', key: 'trainingpeaks', isConnected: false }]; + const renderApp = jest.fn(() => null); + const { getByText } = render(); + + fireEvent.press(getByText('TrainingPeaks')); + + expect(renderApp).toHaveBeenCalledWith('trainingpeaks', MOCK_PROPS.onClose, false); }); it('renders with all sections collapsed without crashing', () => { diff --git a/src/components/AppsDialog/AppsDialogView.tsx b/src/components/AppsDialog/AppsDialogView.tsx index 022a424b..e236d03f 100644 --- a/src/components/AppsDialog/AppsDialogView.tsx +++ b/src/components/AppsDialog/AppsDialogView.tsx @@ -6,13 +6,6 @@ import { colors, textSizes } from '../../theme'; import { AppSettingsContext } from '../AppSettingsView/AppSettingsView'; import { OAuthAppSettings } from '../OAuthAppSettings/OAuthAppSettings'; import { KomootSettings } from '../KomootSettings/KomootSettings'; -import { OAuthAppKey } from '../OAuthAppSettings/types'; - -const APP_SECTIONS = [ - { key: 'strava', name: 'Strava' }, - { key: 'intervals', name: 'Intervals.icu' }, - { key: 'komoot', name: 'Komoot' }, -]; // Stable reference so AppSettingsContext.Provider (rendered inside a .map() below, where // useMemo can't be used) doesn't re-trigger consumers on every render — see SonarCloud @@ -35,8 +28,9 @@ export const AppsDialogView = ({ if (key === 'komoot') { return ; } - return ; - }, []); + const name = apps.find(a => a.key === key)?.name; + return ; + }, [apps]); const renderApp = renderAppProp || defaultRenderApp; @@ -53,12 +47,11 @@ export const AppsDialogView = ({ buttons={dialogButtons} > - {APP_SECTIONS.map((section) => { - const appData = apps.find(a => a.key === section.key); - const isConnected = appData?.isConnected ?? false; - const isExpanded = expandedKey === section.key; + {apps.map((app) => { + const isConnected = app.isConnected ?? false; + const isExpanded = expandedKey === app.key; - const handlePress = () => handleToggle(section.key); + const handlePress = () => handleToggle(app.key); const badgeStyle = [ styles.badge, @@ -66,14 +59,14 @@ export const AppsDialogView = ({ ]; return ( - + - {section.name} + {app.name} @@ -84,7 +77,7 @@ export const AppsDialogView = ({ {isExpanded && ( - {renderApp(section.key, onClose, false)} + {renderApp(app.key, onClose, false)} )} diff --git a/src/components/AppsSettings/types.ts b/src/components/AppsSettings/types.ts index ec249798..a71485b7 100644 --- a/src/components/AppsSettings/types.ts +++ b/src/components/AppsSettings/types.ts @@ -1,6 +1,5 @@ export interface AppDisplayProps { name: string; key: string; - iconUrl: string; isConnected: boolean; } diff --git a/src/components/OAuthAppSettings/OAuthAppSettings.credentials.test.tsx b/src/components/OAuthAppSettings/OAuthAppSettings.credentials.test.tsx new file mode 100644 index 00000000..2774e667 --- /dev/null +++ b/src/components/OAuthAppSettings/OAuthAppSettings.credentials.test.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import { render, fireEvent, waitFor } from '@testing-library/react-native'; +import { TouchableOpacity } from 'react-native'; +import InAppBrowser from 'react-native-inappbrowser-reborn'; +import { OAuthAppSettings } from './OAuthAppSettings'; + +const mockConnect = jest.fn().mockResolvedValue(true); + +jest.mock('incyclist-services', () => ({ + useAppsService: () => ({ + openAppSettings: jest.fn().mockReturnValue({ isConnected: false, operations: [] }), + connect: (...args: unknown[]) => mockConnect(...args), + disconnect: jest.fn(), + enableOperation: jest.fn().mockReturnValue([]), + }), +})); + +jest.mock('../AppSettingsView', () => ({ + AppSettingsView: ({ connectButton }: { connectButton: () => React.ReactNode }) => connectButton(), +})); + +jest.mock('../../assets/btn_strava_connectwith_orange.svg', () => ({ + __esModule: true, + default: () => null, +})); + +/** simulates the auth-server redirecting back to the app, echoing the state that the app sent */ +const mockCallback = (query: Record) => { + (InAppBrowser.openAuth as jest.Mock).mockImplementation(async (url: string) => { + const state = new URL(url).searchParams.get('state') as string; + const params = new URLSearchParams({ ...query, state }); + return { type: 'success', url: `incyclist://oauth/callback?${params.toString()}` }; + }); +}; + +afterEach(() => { + jest.clearAllMocks(); +}); + +describe('OAuthAppSettings - credentials handed to the AppsService', () => { + + const connectWith = async (appKey: string, query: Record) => { + mockCallback(query); + const { UNSAFE_getByType } = render(); + fireEvent.press(UNSAFE_getByType(TouchableOpacity)); + await waitFor(() => expect(mockConnect).toHaveBeenCalled()); + }; + + it('passes tokens, id and expiration on, in the same way for every app', async () => { + for (const appKey of ['strava', 'intervals', 'trainingpeaks']) { + mockConnect.mockClear(); + await connectWith(appKey, { accesstoken: 'at', refreshtoken: 'rt', id: '42', expiration: '1767261600000' }); + + expect(mockConnect).toHaveBeenCalledWith(appKey, { + accesstoken: 'at', + refreshtoken: 'rt', + id: '42', + expiration: '1767261600000', + }); + } + }); + + it('passes expiration as null if the auth-server does not provide one (Strava, Intervals)', async () => { + await connectWith('strava', { accesstoken: 'at', refreshtoken: 'rt', id: '42' }); + + expect(mockConnect).toHaveBeenCalledWith('strava', expect.objectContaining({ accesstoken: 'at', expiration: null })); + }); + + it('does not connect if the auth-server reports an error', async () => { + mockCallback({ error: 'aborted' }); + const { UNSAFE_getByType } = render(); + fireEvent.press(UNSAFE_getByType(TouchableOpacity)); + + await waitFor(() => expect(InAppBrowser.openAuth).toHaveBeenCalled()); + expect(mockConnect).not.toHaveBeenCalled(); + }); +}); diff --git a/src/components/OAuthAppSettings/OAuthAppSettings.generic.test.tsx b/src/components/OAuthAppSettings/OAuthAppSettings.generic.test.tsx new file mode 100644 index 00000000..c881ff7f --- /dev/null +++ b/src/components/OAuthAppSettings/OAuthAppSettings.generic.test.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import { render } from '@testing-library/react-native'; +import { OAuthAppSettings } from './OAuthAppSettings'; + +jest.mock('incyclist-services', () => ({ + useAppsService: jest.fn(() => ({ + openAppSettings: jest.fn().mockReturnValue({ isConnected: false, operations: [] }), + connect: jest.fn().mockResolvedValue(true), + disconnect: jest.fn(), + enableOperation: jest.fn().mockReturnValue([]), + })), +})); + +const mockAppSettingsView = jest.fn((_props: Record) => null); +jest.mock('../AppSettingsView', () => ({ + AppSettingsView: (props: Record) => mockAppSettingsView(props), +})); + +jest.mock('../../assets/btn_strava_connectwith_orange.svg', () => ({ + __esModule: true, + default: () => null, +})); + +const lastProps = () => mockAppSettingsView.mock.calls.at(-1)![0] as { + title: string; + connectButton: () => React.ReactElement; +}; + +describe('OAuthAppSettings - apps provided by the service', () => { + beforeEach(() => { + mockAppSettingsView.mockClear(); + }); + + it('uses the display name of the app as title and in the connect button', () => { + render(); + + expect(lastProps().title).toBe('TrainingPeaks'); + + const button = render(lastProps().connectButton()); + expect(button.getByText('Connect with TrainingPeaks')).toBeTruthy(); + }); + + it('falls back to the key if no name is provided', () => { + render(); + + expect(lastProps().title).toBe('trainingpeaks'); + const button = render(lastProps().connectButton()); + expect(button.getByText('Connect with trainingpeaks')).toBeTruthy(); + }); + + it('keeps the official Connect-with-Strava button for Strava', () => { + render(); + + expect(lastProps().title).toBe('Strava'); + const button = render(lastProps().connectButton()); + expect(button.queryByText('Connect with Strava')).toBeNull(); + }); +}); diff --git a/src/components/OAuthAppSettings/OAuthAppSettings.tsx b/src/components/OAuthAppSettings/OAuthAppSettings.tsx index 0736fc6c..41769ad8 100644 --- a/src/components/OAuthAppSettings/OAuthAppSettings.tsx +++ b/src/components/OAuthAppSettings/OAuthAppSettings.tsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useCallback, useEffect } from 'react'; -import { Linking, StyleSheet, TouchableOpacity } from 'react-native'; +import { Linking, StyleSheet, Text, TouchableOpacity } from 'react-native'; import InAppBrowser from 'react-native-inappbrowser-reborn'; import { useAppsService } from 'incyclist-services'; import type { AppsOperation } from 'incyclist-services'; @@ -14,7 +14,7 @@ import type { OAuthAppSettingsProps } from './types'; const OAUTH_BASE = 'https://auth.incyclist.com'; const REDIRECT_URI = 'incyclist://oauth/callback'; -const OAuthAppSettings = ({ appKey, onBack }: OAuthAppSettingsProps) => { +const OAuthAppSettings = ({ appKey, name, onBack }: OAuthAppSettingsProps) => { const service = useAppsService(); const { logEvent, logError } = useLogging('OAuthAppSettings'); @@ -100,6 +100,8 @@ const OAuthAppSettings = ({ appKey, onBack }: OAuthAppSettingsProps) => { accesstoken: parsed.searchParams.get('accesstoken'), refreshtoken: parsed.searchParams.get('refreshtoken'), id: parsed.searchParams.get('id'), + // same contract for all apps: whatever the auth-server provides is passed on, services handles the formats + expiration: parsed.searchParams.get('expiration'), }; await service.connect(appKey, credentials); @@ -146,22 +148,19 @@ const OAuthAppSettings = ({ appKey, onBack }: OAuthAppSettingsProps) => { [onConnect, isConnecting], ); - const intervalsConnectButton = useCallback( + const title = name ?? appKey; + + const genericConnectButton = useCallback( () => ( - - {React.createElement( - require('react-native').Text, - { style: styles.intervalsButtonText }, - 'Connect with Intervals.icu', - )} + + {`Connect with ${title}`} ), - [onConnect, isConnecting], + [onConnect, isConnecting, title], ); - const connectButton = appKey === 'strava' ? stravaConnectButton : intervalsConnectButton; - - const title = appKey === 'strava' ? 'Strava' : 'Intervals.icu'; + // Strava requires its official "Connect with Strava" button + const connectButton = appKey === 'strava' ? stravaConnectButton : genericConnectButton; return ( { }; const styles = StyleSheet.create({ - intervalsButton: { + connectButton: { backgroundColor: colors.buttonPrimary, paddingHorizontal: 16, paddingVertical: 10, borderRadius: 4, alignItems: 'center', }, - intervalsButtonText: { + connectButtonText: { color: colors.text, fontSize: textSizes.normalText, fontWeight: '600', diff --git a/src/components/OAuthAppSettings/types.ts b/src/components/OAuthAppSettings/types.ts index eb6db45b..3beb1cf7 100644 --- a/src/components/OAuthAppSettings/types.ts +++ b/src/components/OAuthAppSettings/types.ts @@ -1,9 +1,12 @@ import type { AppsOperation } from 'incyclist-services'; -export type OAuthAppKey = 'strava' | 'intervals'; +/** Key of an app as provided by the AppsService (e.g. 'strava', 'intervals', 'trainingpeaks') */ +export type OAuthAppKey = string; export interface OAuthAppSettingsProps { appKey: OAuthAppKey; + /** Display name of the app, as provided by the AppsService. Falls back to the key */ + name?: string; onBack?: () => void; } From b06f270057ece90caf1776e0df3d12fd7c6252f2 Mon Sep 17 00:00:00 2001 From: Guido Doumen Date: Sun, 15 Nov 2026 11:00:11 +0100 Subject: [PATCH 2/4] feat: accessibility of the apps dialog An entry of the apps dialog is announced as button with its state (expanded) and a label that contains the name of the app and its connection state, as the status is only shown as colour. The chevron is hidden from screen readers. --- .../AppsDialog/AppsDialogView.test.tsx | 47 +++++++++++++++++++ src/components/AppsDialog/AppsDialogView.tsx | 12 ++++- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/components/AppsDialog/AppsDialogView.test.tsx b/src/components/AppsDialog/AppsDialogView.test.tsx index 189725a8..2d0b400e 100644 --- a/src/components/AppsDialog/AppsDialogView.test.tsx +++ b/src/components/AppsDialog/AppsDialogView.test.tsx @@ -94,4 +94,51 @@ describe('AppsDialogView', () => { // If it doesn't crash, the test passes. expect(getByText('Strava')).toBeTruthy(); }); + + describe('accessibility', () => { + it('every entry is a button that tells the name of the app and its connection state', () => { + const { getByRole } = render(); + + expect(getByRole('button', { name: 'Strava, connected' })).toBeTruthy(); + expect(getByRole('button', { name: 'Intervals.icu, not connected' })).toBeTruthy(); + expect(getByRole('button', { name: 'Komoot, not connected' })).toBeTruthy(); + }); + + it('the entry tells whether it is expanded', () => { + const { getByLabelText } = render(); + + expect(getByLabelText('Strava, connected').props.accessibilityState).toMatchObject({ expanded: false }); + + fireEvent.press(getByLabelText('Strava, connected')); + + expect(getByLabelText('Strava, connected').props.accessibilityState).toMatchObject({ expanded: true }); + expect(getByLabelText('Komoot, not connected').props.accessibilityState).toMatchObject({ expanded: false }); + }); + + it('collapsing an entry is reported as well', () => { + const { getByLabelText } = render(); + + fireEvent.press(getByLabelText('Strava, connected')); + fireEvent.press(getByLabelText('Strava, connected')); + + expect(getByLabelText('Strava, connected').props.accessibilityState).toMatchObject({ expanded: false }); + }); + + it('the label follows a change of the connection state', () => { + const { getByLabelText, rerender } = render(); + const connectedKomoot = MOCK_APPS.map(a => a.key === 'komoot' ? { ...a, isConnected: true } : a); + + rerender(); + + expect(getByLabelText('Komoot, connected')).toBeTruthy(); + }); + + it('the chevron is not read by screen readers', () => { + const { queryAllByText } = render(); + + // one chevron per entry, none of them is visible to screen readers + expect(queryAllByText('>', { includeHiddenElements: false })).toHaveLength(0); + expect(queryAllByText('>', { includeHiddenElements: true })).toHaveLength(MOCK_APPS.length); + }); + }); }); diff --git a/src/components/AppsDialog/AppsDialogView.tsx b/src/components/AppsDialog/AppsDialogView.tsx index e236d03f..605bcf46 100644 --- a/src/components/AppsDialog/AppsDialogView.tsx +++ b/src/components/AppsDialog/AppsDialogView.tsx @@ -53,6 +53,9 @@ export const AppsDialogView = ({ const handlePress = () => handleToggle(app.key); + // the status is only shown as colour of the badge: screen readers get it as part of the label + const accessibilityLabel = `${app.name}, ${isConnected ? 'connected' : 'not connected'}`; + const badgeStyle = [ styles.badge, { backgroundColor: isConnected ? colors.success : colors.disabled } @@ -64,12 +67,19 @@ export const AppsDialogView = ({ style={styles.header} onPress={handlePress} activeOpacity={0.7} + accessibilityRole="button" + accessibilityLabel={accessibilityLabel} + accessibilityState={{ expanded: isExpanded }} > {app.name} - + {'>'} From 270cac5c90f1e0a9c76e7b1fd90af12e25680e4b Mon Sep 17 00:00:00 2001 From: Guido Doumen Date: Sun, 15 Nov 2026 11:49:32 +0100 Subject: [PATCH 3/4] chore: bump incyclist-services to 1.9.27 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4fa8809a..823dd954 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "axios": "^1.17.0", "events": "^3.3.0", "gd-eventlog": "^0.1.27", - "incyclist-services": "^1.9.26", + "incyclist-services": "^1.9.27", "mqtt": "^5.15.2", "path-browserify": "^1.0.1", "process": "^0.11.10", @@ -12907,9 +12907,9 @@ } }, "node_modules/incyclist-services": { - "version": "1.9.26", - "resolved": "https://registry.npmjs.org/incyclist-services/-/incyclist-services-1.9.26.tgz", - "integrity": "sha512-hxSE5Vw3verEIzhw9qxkCDdKTiY+LlfELOVGryFSkAh7zCrLm3N1Eczs/hRZzPsZP9+UGxTaMAvMJjfycVc6mA==", + "version": "1.9.27", + "resolved": "https://registry.npmjs.org/incyclist-services/-/incyclist-services-1.9.27.tgz", + "integrity": "sha512-MTQbfiX95uHyahK8jR1Jn7+TrckHaUQ8cxJrxx1VU4Ogit7zmqhKqQXtYNAtRV+VVvwvtJyyTICI6xP5sQm9JQ==", "dependencies": { "@garmin/fitsdk": "^21.221.0", "axios": "^1.21.0", diff --git a/package.json b/package.json index f2033de0..57a58d79 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "axios": "^1.17.0", "events": "^3.3.0", "gd-eventlog": "^0.1.27", - "incyclist-services": "^1.9.26", + "incyclist-services": "^1.9.27", "mqtt": "^5.15.2", "path-browserify": "^1.0.1", "process": "^0.11.10", From 26dd14c96ee03736735a46bbdafbb10d8d382887 Mon Sep 17 00:00:00 2001 From: Guido Doumen Date: Sun, 15 Nov 2026 19:22:45 +0100 Subject: [PATCH 4/4] refactor: drop redundant OAuthAppKey alias --- src/components/OAuthAppSettings/index.ts | 2 +- src/components/OAuthAppSettings/types.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/OAuthAppSettings/index.ts b/src/components/OAuthAppSettings/index.ts index d7311f3d..dc8ca2fe 100644 --- a/src/components/OAuthAppSettings/index.ts +++ b/src/components/OAuthAppSettings/index.ts @@ -1,2 +1,2 @@ export { OAuthAppSettings } from './OAuthAppSettings'; -export type { OAuthAppSettingsProps, OAuthAppKey } from './types'; \ No newline at end of file +export type { OAuthAppSettingsProps } from './types'; \ No newline at end of file diff --git a/src/components/OAuthAppSettings/types.ts b/src/components/OAuthAppSettings/types.ts index 3beb1cf7..a34704b9 100644 --- a/src/components/OAuthAppSettings/types.ts +++ b/src/components/OAuthAppSettings/types.ts @@ -1,10 +1,8 @@ import type { AppsOperation } from 'incyclist-services'; -/** Key of an app as provided by the AppsService (e.g. 'strava', 'intervals', 'trainingpeaks') */ -export type OAuthAppKey = string; - export interface OAuthAppSettingsProps { - appKey: OAuthAppKey; + /** Key of the app as provided by the AppsService (e.g. 'strava', 'intervals', 'trainingpeaks') */ + appKey: string; /** Display name of the app, as provided by the AppsService. Falls back to the key */ name?: string; onBack?: () => void;