Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e8b5f2b
WEB-4654 initial scaffolding for ActiveFiltersBar and AppliedFilters
henry-tp Jul 9, 2026
2680f37
WEB-4654 rename items to chips
henry-tp Jul 9, 2026
b54fc49
WEB-4654 refactor to get rid of one-off functions
henry-tp Jul 9, 2026
056fe0a
WEB-4654 update chip styling
henry-tp Jul 9, 2026
f583d39
WEB-4654 remove FilterResetBar and replace
henry-tp Jul 9, 2026
e4a29c1
WEB-4654 fix visual styling for applied filters
henry-tp Jul 9, 2026
b18c1f4
WEB-4654 fix Summarizing Period label and positioning
henry-tp Jul 9, 2026
8706f0b
WEB-4654 simplify Data Recency button
henry-tp Jul 9, 2026
ef612ae
WEB-4654 change order of filters in Pop Health
henry-tp Jul 9, 2026
e52b5af
WEB-4654 AppliedFilters takes search argument
henry-tp Jul 10, 2026
4ce23e7
WEB-4654 simplify chipgroup prefix
henry-tp Jul 10, 2026
9b2b4f4
WEB-4654 rename dropdown to Clinic Sites
henry-tp Jul 10, 2026
39f59b2
WEB-4654 AppliedFilters accepts rightContent
henry-tp Jul 13, 2026
cb8b216
WEB-4654 fix font sizing & spacing
henry-tp Jul 13, 2026
690abf4
WEB-4654 remove default case from AppliedFiltersAdapter
henry-tp Jul 13, 2026
8d3f1ec
WEB-4654 revert ordering
henry-tp Jul 14, 2026
7b8f0f5
WEB-4654 abstract ClearFilterButtons
henry-tp Jul 14, 2026
0c49625
WEB-4654 fix prop name bug
henry-tp Jul 14, 2026
bafce2c
Merge branch 'feat/filter-enhancements' into WEB-4654-filter-bar
henry-tp Jul 14, 2026
71310fd
WEB-4654 fix missing print fn
henry-tp Jul 14, 2026
46fdaae
WEB-4654 revert changes to SummaryPeriod filter
henry-tp Jul 15, 2026
c576f4e
WEB-4654 revert changes to SummaryPeriod filter
henry-tp Jul 15, 2026
68d4eb0
WEB-4654 rename to ActiveFiltersTray
henry-tp Jul 15, 2026
b932de2
WEB-4654 re-add comments for `SPECIAL_FILTER_STATES`
henry-tp Jul 15, 2026
84a9a30
WEB-4654 change directory for AppliedFiltersList
henry-tp Jul 15, 2026
14c5cbd
WEB-4654 put tray-hiding behaviour into adapter component instead of …
henry-tp Jul 15, 2026
14195bb
WEB-4654 remove unused tests
henry-tp Jul 15, 2026
40980f8
WEB-4654 move ClearFilterButtons rendering into AppliedFiltersList
henry-tp Jul 15, 2026
65c2d02
WEB-4654 write tests for AppliedFiltersList
henry-tp Jul 15, 2026
d4930a8
WEB-4654 write tests for ActiveFilterTray
henry-tp Jul 15, 2026
bf7d7ac
WEB-4654 update copy text for no tag / no site in ActiveFiltersTray
henry-tp Jul 16, 2026
df238e9
WEB-4654 add correct symbol for cgm us
henry-tp Jul 17, 2026
747ee5b
WEB-4654 rename reset filters button
henry-tp Jul 17, 2026
47b21f5
WEB-4654 clean up logic for label determination
henry-tp Jul 17, 2026
ff3be8d
WEB-4654 fix breaking test
henry-tp Jul 17, 2026
dac1fd5
WEB-4654 remove unused var
henry-tp Jul 20, 2026
23c9bc2
WEB-4654 add missing pluralization strings
henry-tp Jul 20, 2026
a150632
WEb-4654 sort tags/sites alphabetically in tray
henry-tp Jul 21, 2026
9e6056b
WEB-4654 remove unnecessary comments in tests
henry-tp Jul 21, 2026
30d791a
WEB-4654 fix missing CGM use clear case
henry-tp Jul 26, 2026
7ac0870
WEB-4654 update imports for consistency
henry-tp Jul 26, 2026
b5f2665
WEB-4654 fix render condition
henry-tp Jul 27, 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
3 changes: 3 additions & 0 deletions app/core/icons/tagIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions app/pages/clinicworkspace/AppliedFiltersAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import without from 'lodash/without';

import AppliedFilters from './components/AppliedFilters';
import { defaultFilterState } from './useClinicPatientsFilters';
Comment thread
henry-tp marked this conversation as resolved.
Outdated

const AppliedFiltersAdapter = ({ activeFilters, setActiveFilters }) => {
const { patientListSearchTextInput } = useSelector(({ blip }) => blip.patientListFilters);

const handleRemoveFilter = (filterKey, value) => {
switch (filterKey) {
case 'lastData':
setActiveFilters({
...activeFilters,
lastData: defaultFilterState.lastData,
lastDataType: defaultFilterState.lastDataType,
});
break;

case 'timeInRange':
setActiveFilters({
...activeFilters,
timeInRange: without(activeFilters.timeInRange, value),
});
break;

case 'patientTags':
setActiveFilters({
...activeFilters,
patientTags: without(activeFilters.patientTags, value),
});
break;

case 'clinicSites':
setActiveFilters({
...activeFilters,
clinicSites: without(activeFilters.clinicSites, value),
});
break;

default:
setActiveFilters({
...activeFilters,
[filterKey]: defaultFilterState[filterKey],
});
}
};

const hasSearchActive = !!patientListSearchTextInput;

return (
<AppliedFilters
hasSearchActive={hasSearchActive}
filters={activeFilters}
onRemoveFilter={handleRemoveFilter}
/>
);
};

export default AppliedFiltersAdapter;
Loading