fix 5323 unexpected series list filter change from all to recent (#5337)

* fix to unexpected change from All to recent browser study lists because of the search order for the presence of the study in the tab groups and subsequent reset of the active tab state.
Minor comment in the study browser header.

Signed-off-by: Luis M. Santos <luis.santos2@nih.gov>

* chore Added type annotations and cleaned up stylistically.

Signed-off-by: Luis M. Santos <luis.santos2@nih.gov>

* Tighten up a bit of the code to make it easier to follow

* Fix warnings

---------

Signed-off-by: Luis M. Santos <luis.santos2@nih.gov>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>

Confirm that Alireza's requested change was included.
This commit is contained in:
Luis Miguel SantosandBill Wallace authored and GitHub committed 2025-10-16 21:55:31 -04:00
1 parent be6f3db1ce
commit 42aa2df626
4 files changed
+38 -22

No files matched your search

@@ -45,7 +45,8 @@ export type Customization =
| CommandCustomization
| CodeCustomization
| ComponentCustomization
| CallbackCustomization;
| CallbackCustomization
| string | number | boolean;
export default Customization;
@@ -1,5 +1,20 @@
import { useSystem } from '../contextProviders/SystemProvider';
/**
* Tab properties that drive which tab group is used for thumbnail display.
*/
export type TabProp = {
name: string,
label: string,
studies: any[],
}
/**
* Collection of tab properties with studies presorted depending on tab mod.
* This is used in deciding what thumbnails to show.
*/
export type TabsProps = TabProp[];
/**
*
* @param {string[]} primaryStudyInstanceUIDs
@@ -11,7 +26,7 @@ import { useSystem } from '../contextProviders/SystemProvider';
* @param {number} studyDisplayList.numInstances
* @param {object[]} displaySets
* @param {number} recentTimeframe - The number of milliseconds to consider a study recent
* @returns tabs - The prop object expected by the StudyBrowser component
* @returns {TabsProps} tabs - The prop object expected by the StudyBrowser component
*/
export function createStudyBrowserTabs(
@@ -19,7 +34,7 @@ export function createStudyBrowserTabs(
studyDisplayList,
displaySets,
recentTimeframeMS = 31536000000
) {
): TabsProps {
const { servicesManager } = useSystem();
const { displaySetService } = servicesManager.services;