Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9fef7a9
WEB-4460 add cells for each value
henry-tp Mar 12, 2026
c236e78
WEB-4460 use selector function for period
henry-tp Mar 12, 2026
7c36c05
WEB-4460 abstract tableColumns to easier to maintain format
henry-tp Mar 13, 2026
239c672
WEB-4460 abstract column sets
henry-tp Mar 13, 2026
f90e3d3
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Mar 13, 2026
b0a7e8c
WEB-4460 use correct summary period
henry-tp Mar 13, 2026
f27955d
WEB-4460 use resolvedCategory to prevent visual glitch
henry-tp Mar 13, 2026
12d9581
WEB-4460 improve comment for visual glitch fix
henry-tp Mar 13, 2026
03b3d40
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Mar 13, 2026
3f6710a
WEB-4460 create high columns
henry-tp Mar 13, 2026
5e2d580
WEB-4460 make column headers unit-specific
henry-tp Mar 13, 2026
438039a
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Mar 13, 2026
548afe3
WEB-4460 add patient drawer
henry-tp Mar 16, 2026
b399e42
WEB-4460 fix scroll issue
henry-tp Mar 17, 2026
17698bf
WEB-4460 update drawer to use url params
henry-tp Mar 17, 2026
e157429
WEB-4460 add link when no patient drawer perms
henry-tp Mar 17, 2026
d0470f4
WEB-4460 add flag cell
henry-tp Mar 31, 2026
2040be2
WEB-4460 update flag cell to use category priority
henry-tp Mar 31, 2026
5bf9d47
WEB-4460 pass category through hook to remove jitter
henry-tp Mar 31, 2026
d0fb180
WEb-4460 fix missing flag colors
henry-tp Mar 31, 2026
e0ec99b
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp May 6, 2026
5794798
Merge branch 'WEB-4460-cells' into WEB-4460-drawer
henry-tp May 6, 2026
f749060
WEB-4460 hide value it TimeInTargetPercent not shown
henry-tp May 12, 2026
19b35b5
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp May 15, 2026
fe46266
Merge branch 'WEB-4460-cells' into WEB-4460-drawer
henry-tp May 15, 2026
2e55cd1
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Jun 23, 2026
15d17cd
Merge branch 'WEB-4460-cells' into WEB-4460-drawer
henry-tp Jun 23, 2026
f16f767
WEB-4460 remove needed flag from PatientDrawer access
henry-tp Jun 24, 2026
e32df21
WEB-4460 remove category for cgm params
henry-tp Jun 29, 2026
c5262c9
WEB-4460 make cell changes for compact view
henry-tp Jun 30, 2026
0c579b8
WEB-4460 fix flag wrap
henry-tp Jun 30, 2026
3590964
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Jul 6, 2026
9a24cfc
Merge branch 'WEB-4460-cells' into WEB-4460-drawer
henry-tp Jul 6, 2026
5cdc1c0
Merge branch 'WEB-4460-setup' into WEB-4460-cells
henry-tp Jul 8, 2026
8e72b0b
Merge branch 'WEB-4460-cells' into WEB-4460-drawer
henry-tp Jul 8, 2026
bbec988
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Jul 8, 2026
bc5f9f5
Merge pull request #1893 from tidepool-org/WEB-4460-drawer
henry-tp Jul 8, 2026
dbccfc1
WEB-4460 fix flag definitions
henry-tp Aug 11, 2026
e1393d9
WEB-4460 fix flag ordering
henry-tp Aug 11, 2026
5f1da58
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Aug 12, 2026
6114a38
Merge branch 'WEB-4460-data-recency' into WEB-4460-cells
henry-tp Aug 13, 2026
4742fb9
WEB-4460 fix rebase issues
henry-tp Aug 13, 2026
ffc6b54
Merge branch 'WEB-4460-filters' into WEB-4460-cells
henry-tp Aug 13, 2026
0b3e04b
Merge branch 'WEB-4460-filters' into WEB-4460-cells
henry-tp Aug 13, 2026
beb266d
WEB-4460 use resolved category in TableCategoryHeader
henry-tp Aug 13, 2026
05a2b78
WEB-4460 use global trackMetric fn
henry-tp Aug 13, 2026
9e179c9
WEB-4460 remove unused trackMetric in patientdrawer
henry-tp Aug 13, 2026
738fdf5
Merge branch 'WEB-4460-filters' into WEB-4460-cells
henry-tp Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { utils as vizUtils, colors as vizColors } from '@tidepool/viz';
import styled from '@emotion/styled';
const { bankersRound } = vizUtils.stat;
const { getTimezoneFromTimePrefs } = vizUtils.datetime;
import { MS_IN_HOUR } from '../../../../core/constants';
import { MS_IN_HOUR } from '../../../core/constants';

import getReportDaysText from '../getReportDaysText';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Flex, Box, Text } from 'theme-ui';
import { utils as vizUtils } from '@tidepool/viz';
const { formatDatum, bankersRound } = vizUtils.stat;
const { getTimezoneFromTimePrefs } = vizUtils.datetime;
import { MGDL_UNITS } from '../../../../core/constants';
import { MGDL_UNITS } from '../../../core/constants';
import getReportDaysText from '../getReportDaysText';

const TableRow = ({ label, sublabel, value, units, id }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useState, useMemo } from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next';
import Button from '../../../../components/elements/Button';
import { MS_IN_HOUR } from '../../../../core/constants';
import Button from '../../../components/elements/Button';
import { MS_IN_HOUR } from '../../../core/constants';
import { Box, Flex } from 'theme-ui';
import { utils as vizUtils } from '@tidepool/viz';
const { agpCGMText } = vizUtils.text;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import * as actions from '../../../../redux/actions';
import * as actions from '../../../redux/actions';
import { useSelector, useDispatch } from 'react-redux';
import { useTranslation } from 'react-i18next';
import { push } from 'connected-react-router';
import { Flex, Box, Text } from 'theme-ui';
import { colors as vizColors } from '@tidepool/viz';
import Button from '../../../../components/elements/Button';
import Button from '../../../components/elements/Button';
import moment from 'moment';
import PatientLastReviewed from '../../../../components/clinic/PatientLastReviewed';
import PatientLastReviewed from '../../../components/clinic/PatientLastReviewed';
import { useFlags } from 'launchdarkly-react-client-sdk';
import CGMClipboardButton from './CGMClipboardButton';
import api from '../../../../core/api';
import api from '../../../core/api';
import { map, keys } from 'lodash';
import copyIcon from '../../../../core/icons/copyIcon.svg';
import viewIcon from '../../../../core/icons/viewIcon.svg';
import copyIcon from '../../../core/icons/copyIcon.svg';
import viewIcon from '../../../core/icons/viewIcon.svg';
import { trackMetric } from '../../../core/metricUtils';

export const OVERVIEW_TAB_INDEX = 0;
export const STACKED_DAILY_TAB_INDEX = 1;
Expand All @@ -32,7 +33,7 @@ const tabs = {
},
};

const MenuBar = ({ patientId, onClose, onSelectTab, selectedTab, trackMetric }) => {
const MenuBar = ({ patientId, onClose, onSelectTab, selectedTab }) => {
const dispatch = useDispatch();
const { t } = useTranslation();
const { showTideDashboardLastReviewed } = useFlags();
Expand Down Expand Up @@ -157,7 +158,6 @@ MenuBar.propTypes = {
onClose: PropTypes.func.isRequired,
onSelectTab: PropTypes.func.isRequired,
selectedTab: PropTypes.number.isRequired,
trackMetric: PropTypes.func.isRequired,
};

export default MenuBar;
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import React from 'react';
import Icon from '../../../components/elements/Icon';
import Icon from '../../components/elements/Icon';
import { useLocation, useHistory } from 'react-router-dom';
import Drawer from '@material-ui/core/Drawer';
import styled from '@emotion/styled';
import { makeStyles } from '@material-ui/core/styles';
import CloseRoundedIcon from '@material-ui/icons/CloseRounded';
import { Box } from 'theme-ui';
import { useFlags } from 'launchdarkly-react-client-sdk';

import Overview from './Overview';
import StackedDaily from './StackedDaily';
import MenuBar, { OVERVIEW_TAB_INDEX, STACKED_DAILY_TAB_INDEX } from './MenuBar';
import useAgpCGM from './useAgpCGM';
import { shadows } from '../../../themes/baseTheme';
import { useScrollToTop } from '../../../core/hooks';
import { shadows } from '../../themes/baseTheme';

const StyledCloseButton = styled(Icon)`
position: absolute;
Expand Down Expand Up @@ -53,7 +51,7 @@ const getAgpPeriodInDays = (period) => {
}
};

const DrawerContent = ({ patientId, onClose, api, trackMetric, period }) => {
const DrawerContent = ({ patientId, onClose, api, period }) => {
// Only rendered when patient is selected and isOpen is true
// this will also allow the hook to dismount and for the cleanup to be called
const location = useLocation();
Expand All @@ -64,7 +62,6 @@ const DrawerContent = ({ patientId, onClose, api, trackMetric, period }) => {
const agpPeriodInDays = getAgpPeriodInDays(period);
const agpCGMData = useAgpCGM(api, patientId, agpPeriodInDays);
const contentRef = React.useRef(undefined);
useScrollToTop(contentRef?.current, [selectedTab]);

function setDrawerTabParam(tabIndex) {
const { search, pathname } = location;
Expand All @@ -76,16 +73,17 @@ const DrawerContent = ({ patientId, onClose, api, trackMetric, period }) => {
function handleSelectTab(tabIndex) {
setSelectedTab(parseInt(tabIndex, 10));
setDrawerTabParam(tabIndex);
contentRef?.current?.scrollTo(0, 0);
}

const handleContentScroll = (e) => {
setScrolledToTop((e.target.scrollTop || 0) <= 5);
}
};

return (
<>
<Box sx={{ flexShrink: 0 }}>
<MenuBar patientId={patientId} trackMetric={trackMetric} onClose={onClose} selectedTab={selectedTab} onSelectTab={handleSelectTab} />
<MenuBar patientId={patientId} onClose={onClose} selectedTab={selectedTab} onSelectTab={handleSelectTab} />

<Box className='sticky-shadow' sx={{ height: '8px', position: 'sticky', zIndex: 1, visibility: scrolledToTop ? 'hidden' : 'visible', boxShadow: shadows.large }} />
</Box>
Expand All @@ -108,12 +106,10 @@ const DrawerContent = ({ patientId, onClose, api, trackMetric, period }) => {
)
}

const PatientDrawer = ({ patientId, onClose, api, trackMetric, period }) => {
const PatientDrawer = ({ patientId, onClose, api, period }) => {
const classes = useStyles();
const { showTideDashboardPatientDrawer } = useFlags();
const isOpen = !!patientId && isValidAgpPeriod(period);

if (!showTideDashboardPatientDrawer) return null;
const isOpen = !!patientId && isValidAgpPeriod(period);

return (
<StyledDrawer
Expand All @@ -133,7 +129,7 @@ const PatientDrawer = ({ patientId, onClose, api, trackMetric, period }) => {
flexDirection: 'column',
}}
>
{isOpen && <DrawerContent patientId={patientId} onClose={onClose} api={api} trackMetric={trackMetric} period={period} />}
{isOpen && <DrawerContent patientId={patientId} onClose={onClose} api={api} period={period} />}
</Box>
</StyledDrawer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ const { getLocalizedCeiling } = vizUtils.datetime;
import tidelineBlip from 'tideline/plugins/blip';
const chartDailyFactory = tidelineBlip.oneday;

import { MS_IN_DAY } from '../../../core/constants';
import { MS_IN_DAY } from '../../core/constants';
import { NoPatientData } from './Overview';
import { STATUS } from './useAgpCGM';
import { Body1, Body2 } from '../../../components/elements/FontStyles';
import Button from '../../../components/elements/Button';
import { Body1, Body2 } from '../../components/elements/FontStyles';
import Button from '../../components/elements/Button';
import { STACKED_DAILY_TAB_INDEX } from './MenuBar';
import BgLegend from '../../../components/chart/BgLegend';
import BgLegend from '../../components/chart/BgLegend';

const CHART_HEIGHT = 200;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import moment from 'moment';
import { MS_IN_MIN } from '../../../core/constants';
import { MS_IN_MIN } from '../../core/constants';
import isNumber from 'lodash/isNumber';
import { utils as vizUtils } from '@tidepool/viz';
const { getOffset, formatDateRange } = vizUtils.datetime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import moment from 'moment-timezone';
import _ from 'lodash';
import get from 'lodash/get';
import { utils as vizUtils } from '@tidepool/viz';
import utils from '../../../../core/utils';
import { getMostRecentDatumTimeByChartType } from '../../../../core/dataViewUtils';
import utils from '../../../core/utils';
import { getMostRecentDatumTimeByChartType } from '../../../core/dataViewUtils';

const getTimezoneFromTimePrefs = vizUtils.datetime.getTimezoneFromTimePrefs;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import _ from 'lodash';
import { utils as vizUtils } from '@tidepool/viz';
const { commonStats } = vizUtils.stat;

import utils from '../../../../core/utils';
import { DEFAULT_GLYCEMIC_RANGES } from '../../../../core/glycemicRangesUtils';
import utils from '../../../core/utils';
import { DEFAULT_GLYCEMIC_RANGES } from '../../../core/glycemicRangesUtils';

const getQueries = (
data,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import * as actions from '../../../../redux/actions';
import * as actions from '../../../redux/actions';
import moment from 'moment';

import getOpts from './getOpts';
import getQueries from './getQueries';
import { cloneDeep } from 'lodash';
import { useGenerateAGPImages } from '../../../../core/agpUtils';
import { useGenerateAGPImages } from '../../../core/agpUtils';

export const STATUS = {
// States in order of happy path AGP generation sequence
Expand Down Expand Up @@ -134,8 +134,8 @@ const useAgpCGM = (
return {
status: lastCompletedStep,
svgDataURLS: isCorrectPatientInState ? pdf.opts?.svgDataURLS : null,
agpCGM: isCorrectPatientInState ? cloneDeep(pdf.data?.agpCGM) : null,
offsetAgpCGM: isCorrectPatientInState ? cloneDeep(pdf.data?.offsetAgpCGM) : null,
agpCGM: isCorrectPatientInState ? pdf.data?.agpCGM : null,
offsetAgpCGM: isCorrectPatientInState ? pdf.data?.offsetAgpCGM : null,
};
};

Expand Down
4 changes: 2 additions & 2 deletions app/core/navutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ export const getPatientListLink = (clinicFlowActive, selectedClinicId, query, pa
const drawerTab = query?.drawerTab;

if (dashboard && drawerTab !== undefined && patientId) {
return `/dashboard/${dashboard}?drawerPatientId=${patientId}&drawerTab=${drawerTab}`;
return `/clinic-workspace/tide-dashboard?drawerPatientId=${patientId}&drawerTab=${drawerTab}`;
}

if (dashboard) {
return `/dashboard/${dashboard}`;
return '/clinic-workspace/tide-dashboard';
}

if (clinicFlowActive && selectedClinicId) {
Expand Down
Loading
Loading