From 91e5ace25af87297d476bb1f68d9662c2d76e1c0 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Tue, 12 Nov 2024 14:56:01 -0500 Subject: [PATCH 01/21] Bump viz and platform-client --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index a06d6dd0e3..229109ff16 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@storybook/react": "7.5.0", "@storybook/react-webpack5": "7.5.0", "@testing-library/react-hooks": "8.0.1", - "@tidepool/viz": "1.43.0-develop.2", + "@tidepool/viz": "1.43.0-rc.1", "async": "2.6.4", "autoprefixer": "10.4.16", "babel-core": "7.0.0-bridge.0", @@ -181,7 +181,7 @@ "terser-webpack-plugin": "5.3.9", "theme-ui": "0.16.1", "tideline": "1.30.0", - "tidepool-platform-client": "0.61.0-web-3178-tide-connection-status.1", + "tidepool-platform-client": "0.61.0-rc.1", "tidepool-standard-action": "0.1.1", "ua-parser-js": "1.0.36", "url-loader": "4.1.1", diff --git a/yarn.lock b/yarn.lock index 57fd9fe0b3..bf7a9eab7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5278,9 +5278,9 @@ __metadata: languageName: node linkType: hard -"@tidepool/viz@npm:1.43.0-develop.2": - version: 1.43.0-develop.2 - resolution: "@tidepool/viz@npm:1.43.0-develop.2" +"@tidepool/viz@npm:1.43.0-rc.1": + version: 1.43.0-rc.1 + resolution: "@tidepool/viz@npm:1.43.0-rc.1" dependencies: bluebird: 3.7.2 bows: 1.7.2 @@ -5340,7 +5340,7 @@ __metadata: react-dom: 16.x react-redux: 8.x redux: 4.x - checksum: 15c7230fa2a7ca1ea07cf0249c768291356cc932a2fbe3f122e475a1af4ccf68a1cb5c0db4ee0160f5c6b69df579757592578911aadd23a28c12d3038932c5eb + checksum: b18d529e28bf0d5d7bbcbbb43884f86f5b8631b270cc7e988f6194f9749788757ef55ccf55eea4e7d862bd95ba6cb92537423781fd3dd6d7a5aa4d0a0523d572 languageName: node linkType: hard @@ -7305,7 +7305,7 @@ __metadata: "@storybook/react": 7.5.0 "@storybook/react-webpack5": 7.5.0 "@testing-library/react-hooks": 8.0.1 - "@tidepool/viz": 1.43.0-develop.2 + "@tidepool/viz": 1.43.0-rc.1 async: 2.6.4 autoprefixer: 10.4.16 babel-core: 7.0.0-bridge.0 @@ -7429,7 +7429,7 @@ __metadata: terser-webpack-plugin: 5.3.9 theme-ui: 0.16.1 tideline: 1.30.0 - tidepool-platform-client: 0.61.0-web-3178-tide-connection-status.1 + tidepool-platform-client: 0.61.0-rc.1 tidepool-standard-action: 0.1.1 ua-parser-js: 1.0.36 url-loader: 4.1.1 @@ -20184,15 +20184,15 @@ __metadata: languageName: node linkType: hard -"tidepool-platform-client@npm:0.61.0-web-3178-tide-connection-status.1": - version: 0.61.0-web-3178-tide-connection-status.1 - resolution: "tidepool-platform-client@npm:0.61.0-web-3178-tide-connection-status.1" +"tidepool-platform-client@npm:0.61.0-rc.1": + version: 0.61.0-rc.1 + resolution: "tidepool-platform-client@npm:0.61.0-rc.1" dependencies: async: 0.9.0 lodash: 4.17.21 superagent: 5.2.2 uuid: 3.1.0 - checksum: 0b7254503ba7ec9c880da9e47e69273a24d250a5b7ff2f4b15d424bc59780631d11a73e5024a4c348cb6e3b8985b4591e402217d7f8c9c5cb72a3e931ab20756 + checksum: cae4da8054aaccc90e1e37d6e513b693558c789f7e78799627957745422056abce434b634e6d08689d3a4927c0f85112e9a24242690545964f8a9b8baa3b2e32 languageName: node linkType: hard From 0b50e0ca8b597bcfa9a6e9918270b492541d5a5a Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Tue, 12 Nov 2024 14:56:18 -0500 Subject: [PATCH 02/21] v1.82.0-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 229109ff16..bdf94a5f54 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.82.0-web-3178-tide-connection-status.1", + "version": "1.82.0-rc.1", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From efe72b3d6bec53c082fdb8825a39625da39223c5 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 13 Nov 2024 13:04:30 -0500 Subject: [PATCH 03/21] Disable mouse wheel value updates while scrolling on number inputs --- app/core/hooks.js | 31 +++++++++++++++++++ .../prescription/therapySettingsFormStep.js | 3 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/app/core/hooks.js b/app/core/hooks.js index df04bb9ca3..bb1a04a999 100644 --- a/app/core/hooks.js +++ b/app/core/hooks.js @@ -183,3 +183,34 @@ export const useIsFirstRender = () => { return isFirstRenderRef.current; }; + +// +/** + * Disables triggering the increment/decrememnt inputs on active number inputs while scrolling + * c.f https://stackoverflow.com/a/56250826 + * + * There are a few different approaches, but this seems to be the best. + * Some approaches blur for a frame then refocus, which causes the outline to flicker, and could potentially trigger onBlur validations + * Some approaches simple cancel out mousewheel events on active number inputs, but this means that a user can't scroll out of an active, hovered input + * This approach has a very small flicker on the increment/decrement controls while scrolling on an active number input, but it seems to be the most minor of compromises + * + * Note: it may be prudent to at some point stop using number inputs altogther, switch to using + * plain text that mimic number fields without the scroll handlers built in: + * + * https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/ + */ +export const useDisableScrollOnNumberInput = () => { + useEffect(() => { + function handleScroll(e) { + if (e.target.tagName.toLowerCase() === 'input' + && (e.target.type === 'number') + && (e.target === document.activeElement) + && !e.target.readOnly + ) { + e.target.readOnly = true; + setTimeout(function(el){ el.readOnly = false; }, 0, e.target); + } + } + document.addEventListener('wheel', function(e){ handleScroll(e); }); + }, []); +}; diff --git a/app/pages/prescription/therapySettingsFormStep.js b/app/pages/prescription/therapySettingsFormStep.js index e3e9c4cadf..296a4dda3c 100644 --- a/app/pages/prescription/therapySettingsFormStep.js +++ b/app/pages/prescription/therapySettingsFormStep.js @@ -12,7 +12,7 @@ import { default as _values } from 'lodash/values'; import { getFieldError, getThresholdWarning, onChangeWithDependantFields } from '../../core/forms'; import utils from '../../core/utils'; -import { useInitialFocusedInput } from '../../core/hooks'; +import { useInitialFocusedInput, useDisableScrollOnNumberInput } from '../../core/hooks'; import { Paragraph2, Body2, Headline, Title } from '../../components/elements/FontStyles'; import RadioGroup from '../../components/elements/RadioGroup'; import PopoverLabel from '../../components/elements/PopoverLabel'; @@ -554,6 +554,7 @@ export const InsulinSettings = props => { InsulinSettings.propTypes = fieldsetPropTypes; export const TherapySettings = withTranslation()(props => { + useDisableScrollOnNumberInput(); const formikContext = useFormikContext(); const { From 633a93f85b1a0275791f7ab5fef8eb6e3393756c Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 13 Nov 2024 13:10:31 -0500 Subject: [PATCH 04/21] v1.81.3-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b641cbedc8..b6767e08f3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.81.2", + "version": "1.81.3-rc.1", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From d76d2f0c2a6ec31de51ea880efec007bfe54f4f0 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 13 Nov 2024 13:11:02 -0500 Subject: [PATCH 05/21] Small comment cleanup --- app/core/hooks.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/core/hooks.js b/app/core/hooks.js index bb1a04a999..428a82c3fa 100644 --- a/app/core/hooks.js +++ b/app/core/hooks.js @@ -184,7 +184,6 @@ export const useIsFirstRender = () => { return isFirstRenderRef.current; }; -// /** * Disables triggering the increment/decrememnt inputs on active number inputs while scrolling * c.f https://stackoverflow.com/a/56250826 From 309297821103a74c7424ffc22093002270763f0b Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Thu, 14 Nov 2024 09:36:12 -0500 Subject: [PATCH 06/21] v1.81.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6767e08f3..3cde2e574a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.81.3-rc.1", + "version": "1.81.3", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From ac5fa9e83cb9b0c9eec73afe176d83b9339c812f Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Mon, 18 Nov 2024 10:31:14 -0500 Subject: [PATCH 07/21] Show pendingExpired state correctly in TIDE dash + fix overflow ellipsis on long patient names --- app/pages/dashboard/TideDashboard.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/pages/dashboard/TideDashboard.js b/app/pages/dashboard/TideDashboard.js index 0ef87e14ae..38834b3a3a 100644 --- a/app/pages/dashboard/TideDashboard.js +++ b/app/pages/dashboard/TideDashboard.js @@ -303,10 +303,12 @@ const TideDashboardSection = React.memo(props => { {patient?.fullName} @@ -435,12 +437,15 @@ const TideDashboardSection = React.memo(props => { const renderDexcomConnectionStatus = useCallback(({ patient }) => { const dexcomDataSource = find(patient?.dataSources, { providerName: 'dexcom' }); + const dexcomAuthInviteExpired = dexcomDataSource?.expirationTime < moment.utc().toISOString(); let dexcomConnectState; if (dexcomDataSource) { dexcomConnectState = includes(keys(dexcomConnectStateUI), dexcomDataSource?.state) ? dexcomDataSource.state : 'unknown'; + + if (includes(['pending', 'pendingReconnect'], dexcomConnectState) && dexcomAuthInviteExpired) dexcomConnectState = 'pendingExpired'; } else { dexcomConnectState = 'noPendingConnections'; } From bc72819f38e3724622a606508e8ab95f4ccb9dcf Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Mon, 18 Nov 2024 10:56:02 -0500 Subject: [PATCH 08/21] Update tests --- test/fixtures/mockTideDashboardPatients.json | 8 +++----- test/unit/pages/TideDashboard.test.js | 13 +++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/test/fixtures/mockTideDashboardPatients.json b/test/fixtures/mockTideDashboardPatients.json index b2432acf78..1b279c986e 100644 --- a/test/fixtures/mockTideDashboardPatients.json +++ b/test/fixtures/mockTideDashboardPatients.json @@ -590,9 +590,7 @@ "63d811e11710f10c0422ce6d", "645a9c5dd59edded4e573495" ], - "dataSources": [ - { "providerName": "dexcom", "state": "noPendingConnections" } - ] + "dataSources": [] } }, { @@ -615,7 +613,7 @@ "646f7ed708e23bc18d91caa4" ], "dataSources": [ - { "providerName": "dexcom", "state": "pendingExpired" } + { "providerName": "dexcom", "state": "pending", "expirationTime": "2024-11-17T15:17:20.159+00:00" } ] } }, @@ -640,7 +638,7 @@ "646f7f0408e23bc18d91caa7" ], "dataSources": [ - { "providerName": "dexcom", "state": "unknown" } + { "providerName": "dexcom", "state": "pending" } ] } } diff --git a/test/unit/pages/TideDashboard.test.js b/test/unit/pages/TideDashboard.test.js index 6d1bdb61ad..ff4f260701 100644 --- a/test/unit/pages/TideDashboard.test.js +++ b/test/unit/pages/TideDashboard.test.js @@ -660,6 +660,19 @@ describe('TideDashboard', () => { expect(getTableRow(6, 0).find('th').at(2).text()).contains('Days Since Last Data'); expect(getTableRow(6, 1).find('td').at(1).text()).contains('200'); + + // Verify that various connection statuses are rendering correctly + expect(getTableRow(6, 2).find('th').at(0).text()).contains('Willie Gambles'); + expect(getTableRow(6, 2).find('td').at(0).text()).contains('Invite Sent'); + + expect(getTableRow(6, 3).find('th').at(0).text()).contains('Denys Ickov'); + expect(getTableRow(6, 3).find('td').at(0).text()).contains('Patient Disconnected'); + + expect(getTableRow(6, 4).find('th').at(0).text()).contains('Johna Slatcher'); + expect(getTableRow(6, 4).find('td').at(0).text()).contains('No Pending Connections'); + + expect(getTableRow(6, 5).find('th').at(0).text()).contains('Emelda Stangoe'); + expect(getTableRow(6, 5).find('td').at(0).text()).contains('Invite Expired'); }); it('should show empty text for a section without results', () => { From 59ef1e7d62eaeb66c2373b582a0bd86b1a6ddf43 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Mon, 18 Nov 2024 10:56:58 -0500 Subject: [PATCH 09/21] v1.82.0-rc.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79d80b7a97..87ea74b140 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.82.0-rc.2", + "version": "1.82.0-rc.3", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From 6d49759303ac928347675ec3a377667edd92f991 Mon Sep 17 00:00:00 2001 From: Henry Liang Date: Tue, 19 Nov 2024 23:46:20 -0800 Subject: [PATCH 10/21] remove min char FE validation --- app/core/clinicUtils.js | 2 +- test/unit/pages/ClinicPatients.test.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/core/clinicUtils.js b/app/core/clinicUtils.js index 7c835ee7a0..17170e6c22 100644 --- a/app/core/clinicUtils.js +++ b/app/core/clinicUtils.js @@ -398,7 +398,7 @@ export const clinicPatientTagSchema = yup.object().shape({ export const patientSchema = config => { let mrnSchema = yup .string() - .matches(/^$|^[A-Z0-9]{4,25}$/, () => ( + .matches(/^$|^[A-Z0-9]{0,25}$/, () => (
{t('Patient\'s MRN is invalid. MRN must meet the following criteria:')}
    diff --git a/test/unit/pages/ClinicPatients.test.js b/test/unit/pages/ClinicPatients.test.js index 1c03ab6887..dfaaec5084 100644 --- a/test/unit/pages/ClinicPatients.test.js +++ b/test/unit/pages/ClinicPatients.test.js @@ -796,12 +796,6 @@ describe('ClinicPatients', () => { expect(dialog().find('Button#addPatientConfirm').prop('disabled')).to.be.true; - expect(patientForm().find('input[name="mrn"]').prop('value')).to.equal(''); - patientForm().find('input[name="mrn"]').simulate('change', { persist: noop, target: { name: 'mrn', value: 'mr2' } }); - expect(patientForm().find('input[name="mrn"]').prop('value')).to.equal('MR2'); - - expect(dialog().find('Button#addPatientConfirm').prop('disabled')).to.be.true; - patientForm().find('input[name="mrn"]').simulate('change', { persist: noop, target: { name: 'mrn', value: 'mrn876thiswillexceedthelengthlimit' } }); expect(patientForm().find('input[name="mrn"]').prop('value')).to.equal('MRN876THISWILLEXCEEDTHELENGTHLIMIT'); From 7db1bf904aad8720410f3b8b64cc6eefe67a6d14 Mon Sep 17 00:00:00 2001 From: Henry Liang Date: Fri, 22 Nov 2024 09:35:30 -0800 Subject: [PATCH 11/21] re-add test to check vailidity of 1-digit mrn --- test/unit/pages/ClinicPatients.test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/pages/ClinicPatients.test.js b/test/unit/pages/ClinicPatients.test.js index dfaaec5084..4fbbed9b67 100644 --- a/test/unit/pages/ClinicPatients.test.js +++ b/test/unit/pages/ClinicPatients.test.js @@ -796,6 +796,12 @@ describe('ClinicPatients', () => { expect(dialog().find('Button#addPatientConfirm').prop('disabled')).to.be.true; + expect(patientForm().find('input[name="mrn"]').prop('value')).to.equal(''); + patientForm().find('input[name="mrn"]').simulate('change', { persist: noop, target: { name: 'mrn', value: 'm' } }); + expect(patientForm().find('input[name="mrn"]').prop('value')).to.equal('M'); + + expect(dialog().find('Button#addPatientConfirm').prop('disabled')).to.be.false; + patientForm().find('input[name="mrn"]').simulate('change', { persist: noop, target: { name: 'mrn', value: 'mrn876thiswillexceedthelengthlimit' } }); expect(patientForm().find('input[name="mrn"]').prop('value')).to.equal('MRN876THISWILLEXCEEDTHELENGTHLIMIT'); From 601053629d8db14ca107388496282e7598e07599 Mon Sep 17 00:00:00 2001 From: Henry Liang Date: Mon, 25 Nov 2024 14:02:30 -0800 Subject: [PATCH 12/21] remove validation text for mrn count --- app/core/clinicUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/core/clinicUtils.js b/app/core/clinicUtils.js index 17170e6c22..1e3f35e33f 100644 --- a/app/core/clinicUtils.js +++ b/app/core/clinicUtils.js @@ -403,7 +403,6 @@ export const patientSchema = config => { {t('Patient\'s MRN is invalid. MRN must meet the following criteria:')}
    • {t('All upper case letters or numbers')}
    • -
    • {t('Minimum length: 4 characters')}
    • {t('Maximum length: 25 characters')}
    • {t('No spaces')}
    From ebe52bbd6f2dc49f54a3101ef7dba36fd0af59a4 Mon Sep 17 00:00:00 2001 From: Henry Liang Date: Mon, 25 Nov 2024 14:07:19 -0800 Subject: [PATCH 13/21] v1.81.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3cde2e574a..ae66e5bffc 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.81.3", + "version": "1.81.4", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From 630a7d12ca74e0de24b7851bf09cf1c5c8222d17 Mon Sep 17 00:00:00 2001 From: Henry Liang Date: Mon, 25 Nov 2024 14:09:59 -0800 Subject: [PATCH 14/21] v1.81.4-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae66e5bffc..6686c48459 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.81.4", + "version": "1.81.4-rc.1", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From 1e73462bb8b9ae17d0e370b7ec4f52864351e559 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Tue, 26 Nov 2024 12:51:47 -0500 Subject: [PATCH 15/21] Ensure patient data connection state is updated after resending invites --- app/components/clinic/PatientForm.js | 8 +++++++- app/redux/reducers/misc.js | 3 ++- .../reducers/tideDashboardPatients.test.js | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/components/clinic/PatientForm.js b/app/components/clinic/PatientForm.js index 306f098898..14698c24fc 100644 --- a/app/components/clinic/PatientForm.js +++ b/app/components/clinic/PatientForm.js @@ -227,7 +227,9 @@ export const PatientForm = (props) => { if (!isFirstRender && !inProgress) { if (completed) { + // Close the resend email modal and refetch patient details to update the connection status setShowResendDexcomConnectRequest(false); + fetchPatientDetails(); setToast({ message: successMessage, @@ -309,7 +311,7 @@ export const PatientForm = (props) => { // Pull the patient on load to ensure the most recent dexcom connection state is made available useEffect(() => { - if ((action === 'edit') && selectedClinicId && patient?.id) dispatch(actions.async.fetchPatientFromClinic.bind(null, api, selectedClinicId, patient.id)()) + if ((action === 'edit') && selectedClinicId && patient?.id) fetchPatientDetails(); }, []); useEffect(() => { @@ -329,6 +331,10 @@ export const PatientForm = (props) => { dispatch(actions.async.sendPatientDexcomConnectRequest(api, selectedClinicId, patient.id)); } + function fetchPatientDetails() { + dispatch(actions.async.fetchPatientFromClinic.bind(null, api, selectedClinicId, patient.id)()); + } + function renderRegionalNote() { return ( diff --git a/app/redux/reducers/misc.js b/app/redux/reducers/misc.js index ed9430b96d..59b540283a 100644 --- a/app/redux/reducers/misc.js +++ b/app/redux/reducers/misc.js @@ -1149,8 +1149,9 @@ export const tideDashboardPatients = (state = initialState.tideDashboardPatients case types.FETCH_TIDE_DASHBOARD_PATIENTS_SUCCESS: return action?.payload?.results || initialState.tideDashboardPatients; case types.UPDATE_CLINIC_PATIENT_SUCCESS: + case types.FETCH_PATIENT_FROM_CLINIC_SUCCESS: const patient = _.get(action.payload, 'patient'); - const patientId = _.get(action.payload, 'patientId'); + const patientId = patient.id; const newResults = _.reduce(state.results, (results, value, key) => { const matchingPatientIndex = _.findIndex(value, ({ patient }) => patient?.id === patientId); diff --git a/test/unit/redux/reducers/tideDashboardPatients.test.js b/test/unit/redux/reducers/tideDashboardPatients.test.js index 43306aeb6a..0647927e81 100644 --- a/test/unit/redux/reducers/tideDashboardPatients.test.js +++ b/test/unit/redux/reducers/tideDashboardPatients.test.js @@ -69,4 +69,23 @@ describe('tideDashboardPatients', () => { ] } }); }); }); + + describe('fetchPatientFromClinicSuccess', () => { + it('should set state to initial empty state', () => { + const patients = { results: { 'foo': [ + { patient: {id: 'bar' } }, + { patient: { id: 'baz'} } + ] } }; + + const updatedPatient = { id: 'baz', updated: true } + let initialStateForTest = patients; + let action = actions.sync.fetchPatientFromClinicSuccess('clinicId123', updatedPatient); + let state = reducer(initialStateForTest, action); + + expect(state).to.eql({ results: { 'foo': [ + { patient: {id: 'bar' } }, + { patient: { id: 'baz', updated: true } } + ] } }); + }); + }); }); From ca1b2a934fbd555c6abc5059f60b138593c4f0d4 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Tue, 26 Nov 2024 12:52:44 -0500 Subject: [PATCH 16/21] v1.82.0-rc.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87ea74b140..f8ad0bb319 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.82.0-rc.3", + "version": "1.82.0-rc.4", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From 2e73f4a05aa9c3f85f6f2b752ce0339563f3e044 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 27 Nov 2024 12:08:59 -0500 Subject: [PATCH 17/21] Update incorrect test descriptions --- test/unit/redux/reducers/tideDashboardPatients.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/redux/reducers/tideDashboardPatients.test.js b/test/unit/redux/reducers/tideDashboardPatients.test.js index 0647927e81..6784bb5668 100644 --- a/test/unit/redux/reducers/tideDashboardPatients.test.js +++ b/test/unit/redux/reducers/tideDashboardPatients.test.js @@ -52,7 +52,7 @@ describe('tideDashboardPatients', () => { }); describe('updateClinicPatientSuccess', () => { - it('should set state to initial empty state', () => { + it('should update matching patient in state', () => { const patients = { results: { 'foo': [ { patient: {id: 'bar' } }, { patient: { id: 'baz'} } @@ -71,7 +71,7 @@ describe('tideDashboardPatients', () => { }); describe('fetchPatientFromClinicSuccess', () => { - it('should set state to initial empty state', () => { + it('should update matching patient in state', () => { const patients = { results: { 'foo': [ { patient: {id: 'bar' } }, { patient: { id: 'baz'} } From 7fe63dc863e82a3ce30c6747a5fbb4dc65342956 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 27 Nov 2024 12:09:27 -0500 Subject: [PATCH 18/21] Dispatch fetchPatientFromClinic directly instead of binding. --- app/components/clinic/PatientForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/clinic/PatientForm.js b/app/components/clinic/PatientForm.js index 14698c24fc..4342731e81 100644 --- a/app/components/clinic/PatientForm.js +++ b/app/components/clinic/PatientForm.js @@ -332,7 +332,7 @@ export const PatientForm = (props) => { } function fetchPatientDetails() { - dispatch(actions.async.fetchPatientFromClinic.bind(null, api, selectedClinicId, patient.id)()); + dispatch(actions.async.fetchPatientFromClinic(api, selectedClinicId, patient.id)); } function renderRegionalNote() { From f3d9177da418b20b17b8b41b641a9924b0087a97 Mon Sep 17 00:00:00 2001 From: Henry Liang Date: Fri, 29 Nov 2024 08:18:41 -0800 Subject: [PATCH 19/21] v1.81.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6686c48459..ae66e5bffc 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.81.4-rc.1", + "version": "1.81.4", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start", From 9bb02d47fe66eb0fa018c37e5700acc44fe2464c Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 4 Dec 2024 21:13:02 -0500 Subject: [PATCH 20/21] Bump viz and platform-client --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 860e921c88..19e46636f5 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@storybook/react": "7.5.0", "@storybook/react-webpack5": "7.5.0", "@testing-library/react-hooks": "8.0.1", - "@tidepool/viz": "1.43.0-rc.1", + "@tidepool/viz": "1.43.0", "async": "2.6.4", "autoprefixer": "10.4.16", "babel-core": "7.0.0-bridge.0", @@ -181,7 +181,7 @@ "terser-webpack-plugin": "5.3.9", "theme-ui": "0.16.1", "tideline": "1.30.0", - "tidepool-platform-client": "0.61.0-rc.1", + "tidepool-platform-client": "0.61.0", "tidepool-standard-action": "0.1.1", "ua-parser-js": "1.0.36", "url-loader": "4.1.1", diff --git a/yarn.lock b/yarn.lock index bf7a9eab7a..87e7e4e69e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5278,9 +5278,9 @@ __metadata: languageName: node linkType: hard -"@tidepool/viz@npm:1.43.0-rc.1": - version: 1.43.0-rc.1 - resolution: "@tidepool/viz@npm:1.43.0-rc.1" +"@tidepool/viz@npm:1.43.0": + version: 1.43.0 + resolution: "@tidepool/viz@npm:1.43.0" dependencies: bluebird: 3.7.2 bows: 1.7.2 @@ -5340,7 +5340,7 @@ __metadata: react-dom: 16.x react-redux: 8.x redux: 4.x - checksum: b18d529e28bf0d5d7bbcbbb43884f86f5b8631b270cc7e988f6194f9749788757ef55ccf55eea4e7d862bd95ba6cb92537423781fd3dd6d7a5aa4d0a0523d572 + checksum: 52917dca69e84c76c8e740aad76d221e9111ee6e6b1b7ee8bc77361018b31d4b99f6a8f4aac915aae39c0bfa8bcfc4764d43a236e0ec0bed449eda570d813c0c languageName: node linkType: hard @@ -7305,7 +7305,7 @@ __metadata: "@storybook/react": 7.5.0 "@storybook/react-webpack5": 7.5.0 "@testing-library/react-hooks": 8.0.1 - "@tidepool/viz": 1.43.0-rc.1 + "@tidepool/viz": 1.43.0 async: 2.6.4 autoprefixer: 10.4.16 babel-core: 7.0.0-bridge.0 @@ -7429,7 +7429,7 @@ __metadata: terser-webpack-plugin: 5.3.9 theme-ui: 0.16.1 tideline: 1.30.0 - tidepool-platform-client: 0.61.0-rc.1 + tidepool-platform-client: 0.61.0 tidepool-standard-action: 0.1.1 ua-parser-js: 1.0.36 url-loader: 4.1.1 @@ -20184,15 +20184,15 @@ __metadata: languageName: node linkType: hard -"tidepool-platform-client@npm:0.61.0-rc.1": - version: 0.61.0-rc.1 - resolution: "tidepool-platform-client@npm:0.61.0-rc.1" +"tidepool-platform-client@npm:0.61.0": + version: 0.61.0 + resolution: "tidepool-platform-client@npm:0.61.0" dependencies: async: 0.9.0 lodash: 4.17.21 superagent: 5.2.2 uuid: 3.1.0 - checksum: cae4da8054aaccc90e1e37d6e513b693558c789f7e78799627957745422056abce434b634e6d08689d3a4927c0f85112e9a24242690545964f8a9b8baa3b2e32 + checksum: 96e221a65b7a003523e03d9ba357b0c1aa371b779ffd363c325ba015b893462955188662587b502193aaf269d6784577c8d24b8c764ba4ad759d4b0ba511c8ae languageName: node linkType: hard From d7d95573b15122937a7fa9999f41b8ba4e89c982 Mon Sep 17 00:00:00 2001 From: clintonium-119 Date: Wed, 4 Dec 2024 21:14:12 -0500 Subject: [PATCH 21/21] v1.82.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19e46636f5..f8d6c4c79a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": "20.8.0" }, "packageManager": "yarn@3.6.4", - "version": "1.82.0-rc.5", + "version": "1.82.0", "private": true, "scripts": { "test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start",