Project: workspace-doctolib · Branch: HEAD · Mode: ` · **Model:**claude-haiku-4-5-20251001`
Stats: 1 user messages, 34 tool calls, tools used: Bash, Read.
Conversation
Turn 1 — User
Explore the NhrDocumentCategoryFilter component and the underlying dropdown component it uses in the tpf-national-health-records-ui package at /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/.
I need to understand:
1. What component renders the dropdown list (read NhrDocumentCategoryFilter and follow its imports)
2. Whether the dropdown/popup has a hardcoded max number of items to display
3. Whether there is a scrollbar or virtual scrolling when the list is long
4. Any maxHeight, overflow, virtualScroll, maxItems, or similar props/styles
Then find the actual underlying component (likely BetaComboBox or MultiSelectDropdown — check both) in the Oxygen design system at /Users/USER/workspace/doctolib/oxygen/packages/ and read its implementation to understand scroll behavior.
Report the full content of the filter component and the relevant parts of the dropdown component that govern list height/scroll behavior.
Turn 1 — Assistant
I'll help you explore the NhrDocumentCategoryFilter component and trace its dropdown implementation through to the underlying Oxygen design system. Let me start by mapping the structure and finding the relevant files.
Tools used:
Bash:find /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src -type f -name "*NhrDocumentCategoryFilter*" 2>/dev/null | head -20
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentCategoryFilterConfig.tsx /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentCategoryFilterConfig.test.tsx /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx /Users/USER/workspac …(truncated, 306 more chars)
Now let me read the main component file and the configuration file:
Tools used:
Read:/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx
Tool results:
→ result (ok): 1 import type { Option } from '@doctolib/design-system/Option'
2
3 import { MultiSelectDropdown } from '../MultiSelectDropdown'
4
5 export type NhrDocumentCategoryFilterProps = {
6 label: string
7 values: string[]
8 options: Option[]
9 placeholder?: string
10 onToggle: (value: string) => void
11 onClear: () => void
12 }
13
14 export const NhrDocumentCategoryFilter = (props: NhrDocumentCategoryFilterProps) => <MultiSelectDropdown {...props} />
15
<system-reminder> Whenever you re …(truncated, 304 more chars)
Tools used:
Read:/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/business/factories/filters/createNhrDocumentCategoryFilterConfig.tsx
Tool results:
→ result (ok): 1 import type { Option } from '@doctolib/design-system/Option'
2
3 import { NhrDocumentCategoryFilter } from '../../../components/NhrDocumentCategoryFilter'
4 import type { FilterConfig } from '../../../types'
5
6 export const createNhrDocumentCategoryFilterConfig = ({
7 options = [],
8 label = 'Document Category',
9 placeholder,
10 }: {
11 options?: Option[]
12 label?: string
13 placeholder?: string
14 } = {}): FilterConfig => ({
15 key: 'typeCodes',
16 render: (filters, onCha
…(truncated, 983 more chars)
Good! Now I can see that NhrDocumentCategoryFilter is just a thin wrapper around MultiSelectDropdown. Let me find and read that component:
Tools used:
Bash:find /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src -name "MultiSelectDropdown*" -type f
Tools used:
Bash:find /Users/USER/workspace/doctolib/treatment-plan/packages -name "MultiSelectDropdown*" -type f 2>/dev/null
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.stories.tsx /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.test.tsx /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.hooks.ts /Users/USER/workspace/doctolib/treatment-plan/p …(truncated, 1998 more chars)
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.stories.tsx /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.test.tsx /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.hooks.ts /Users/USER/workspace/doctolib/treatment-plan/p …(truncated, 14034 more chars)
Now let me read the main MultiSelectDropdown and its popup/options components:
Tools used:
Read:/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.tsx
Tool results:
→ result (ok): 1 import type { Option } from '@doctolib/design-system/Option'
2 import { useId, useMemo, useRef, useState } from 'react'
3
4 import { normalize } from './MultiSelectDropdown.helpers'
5 import { useDropdownClose } from './MultiSelectDropdown.hooks'
6 import { MultiSelectDropdownLabel } from './MultiSelectDropdownLabel/MultiSelectDropdownLabel'
7 import { MultiSelectDropdownPopup } from './MultiSelectDropdownPopup/MultiSelectDropdownPopup'
8 import { MultiSelectDropdownTrigger } from './MultiSel
…(truncated, 2763 more chars)
Tools used:
Read:/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownPopup/MultiSelectDropdownPopup.tsx
Tools used:
Read:/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownOptions/MultiSelectDropdownOptions.tsx
Tool results:
→ result (ok): 1 import type { Option } from '@doctolib/design-system/Option'
2
3 import { MultiSelectDropdownOptions } from '../MultiSelectDropdownOptions/MultiSelectDropdownOptions'
4
5 type MultiSelectDropdownPopupProps = {
6 id: string
7 label: string
8 options: Option[]
9 values: string[]
10 onToggle: (value: string) => void
11 }
12
13 export const MultiSelectDropdownPopup = ({ id, label, options, values, onToggle }: MultiSelectDropdownPopupProps) => (
14 <dialog
15 id={id}
16 aria-
…(truncated, 855 more chars)
Tool results:
→ result (ok): 1 import { Checkbox } from '@doctolib/design-system/Checkbox/v2'
2 import type { Option } from '@doctolib/design-system/Option'
3
4 type MultiSelectDropdownOptionsProps = {
5 options: Option[]
6 values: string[]
7 onToggle: (value: string) => void
8 }
9
10 export const MultiSelectDropdownOptions = ({ options, values, onToggle }: MultiSelectDropdownOptionsProps) => (
11 <>
12 {options.map((option) => (
13 <Checkbox
14 key={option.value}
15 name={option.value}
1
…(truncated, 609 more chars)
Good! Now I can see the MultiSelectDropdown uses the Oxygen Checkbox component. Let me search for the underlying Oxygen components and check if there's any scroll-related styling or behavior. Let me also check the Oxygen design system for BetaComboBox and related dropdown components:
Tools used:
Bash:find /Users/USER/workspace/doctolib/oxygen/packages -name "*Checkbox*" -o -name "*ComboBox*" -o -name "*Dropdown*" -o -name "*Select*" | grep -E "(Checkbox|ComboBox|Select)" | head -30
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/collection/TableSelectCell.ts /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/collection/BulkSelect.ts /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/collection/TableHeadSelectAllCell.ts /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/dataEntry/Select.ts /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/dataEntry/Checkbox /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/dataEntry/CheckboxGroup.ts /Users/USER/ …(truncated, 1959 more chars)
Tools used:
Bash:grep -r "maxHeight\|overflow.*auto\|virtualScroll\|maxItems" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown --include="*. …(truncated, 24 more chars)
Tool results:
→ result (ok): (Bash completed with no output)
Now let me check the Oxygen Checkbox component and also look for any scroll behavior in the dialog/dropdown styling:
Tools used:
Bash:ls -la /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/dataEntry/Checkbox/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 128 B Wed Feb 25 13:12:44 2026 . drwxr-xr-x clertonra staff 864 B Wed Feb 25 13:12:44 2026 .. .rw-r--r-- clertonra staff 49 B Wed Feb 25 13:12:44 2026 v1.ts .rw-r--r-- clertonra staff 52 B Wed Feb 25 13:12:44 2026 v2.ts
Tools used:
Bash:grep -r "maxHeight\|overflow\|scroll\|virtualScroll\|maxItems" /Users/USER/workspace/doctolib/oxygen/packages --include="*.scss" --include="*.css" --include="*.tsx" --include="*.ts" 2>/dev/null | …(truncated, 62 more chars)
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/Checkbox/v2/Checkbox.module.scss: overflow-wrap: anywhere;
/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.stories.tsx: * overflow: hidden container or mispositioned due to CSS transform on ancestor elements.
/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.stories.tsx: * escapes the modal's stacking context and overflow clipping entirely.
/Users/USER/worksp
…(truncated, 1271 more chars)
Great! I found that the Dropdown has overflow: auto. Now let me read the full Dropdown styling and the BetaComboBox component to understand scroll behavior:
Tools used:
Bash:find /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown -name "*.scss" -o -name "*.tsx" | head -10
Tools used:
Bash:find /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox -name "BetaComboBox*"
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/DropdownContext.tsx /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/DropdownTrigger.a11y.interactions.stories.tsx /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/DropdownItemContentWrapper.module.scss /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.module.scss /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/DropdownI …(truncated, 473 more chars)
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.interactions.stories.tsx /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.stories.tsx /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.scss /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.browser.test.tsx /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.test.tsx /Users/USER/ …(truncated, 382 more chars)
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.scss
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.tsx
Tool results:
→ result (ok): 1 @use '../../style/variables';
2 @use '../../style/focus.scss';
3
4 // FIXME: This is a hack to override the tokens on the monolith where old ones are still loaded
5 .dl-new-dropdown.dl-new-dropdown {
6 --oxygen-LOCAL-dropdown-background: var(--oxygen-color-primitive-white);
7 --oxygen-LOCAL-dropdown-background-hover: var(--oxygen-color-semantic-brand-subtle-weak);
8 --oxygen-LOCAL-dropdown-danger-background-hover: var(--oxygen-color-semantic-danger-subtle-weak);
9 --oxygen-LOCAL-dropd
…(truncated, 4215 more chars)
Tool results:
→ result (ok): 1 import './BetaComboBox.scss'
2
3 import type { ChangeEventHandler, ComponentProps, ReactNode } from 'react'
4 import { forwardRef, useCallback, useId, useMemo, useRef, useState } from 'react'
5
6 import type { AutoComplete } from '../private/autocomplete'
7 import { _RawComboBox as ComboBox } from './_RawComboBox'
8 import { computeAriaDescribedBy } from '../private/aria'
9 import type { DataAttribute } from '../../common/DataAttribute/DataAttribute'
10 import type { DropdownButtonProps } fr
…(truncated, 9428 more chars)
Excellent! Now let me also check the BetaComboBox SCSS file to see if there are any scroll-related styles:
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/BetaComboBox.scss
Tool results:
→ result (ok): 1 @use '../../style/variables';
2
3 .oxygen-input-field__loadingWrapper {
4 display: flex;
5 position: absolute;
6 top: 50%;
7 right: 4rem;
8 flex: none;
9 transform: translateY(-50%);
10 }
11
<system-reminder> Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer question …(truncated, 45 more chars)
Tools used:
Bash:find /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox -name "_RawComboBox*"
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/_RawComboBox.module.scss /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/_RawComboBox.tsx
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/_RawComboBox.tsx(1–100)
Tool results:
→ result (ok): 1 import '../Select/Select.scss'
2 import '../private/_Input.scss'
3 import '../private/_Options.scss'
4
5 import {
6 type ChangeEventHandler,
7 type EventHandler,
8 type ForwardedRef,
9 type MouseEvent,
10 type ReactNode,
11 type TouchEvent,
12 useEffect,
13 useMemo,
14 } from 'react'
15 import classNames from 'classnames'
16 import { FloatingPortal } from '@floating-ui/react'
17 import { forwardRef, useCallback } from 'react'
18
19 import type { AutoComplete } from '../privat
…(truncated, 4241 more chars)
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox/_RawComboBox.module.scss
Tool results:
→ result (ok): 1 .combobox {
2 display: grid;
3 grid-template-columns: auto 1fr auto;
4 grid-template-areas: 'searchIcon input loader chevronIcon clearIconButton';
5 }
6
7 .comboboxInput {
8 grid-area: input;
9 }
10
11 .comboboxLoader {
12 z-index: 1;
13 grid-area: loader;
14 }
15
16 .comboboxSearchIcon {
17 z-index: 1;
18 grid-area: searchIcon;
19 }
20
21 .comboboxChevronIcon {
22 z-index: 1;
23 grid-area: chevronIcon;
24 pointer-events: none;
25 }
26
27 .icon.isOpen {
28 transfor
…(truncated, 503 more chars)
Let me check the _OptionsRenderer to understand how options are rendered:
Tools used:
Bash:find /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/private -name "*OptionsRenderer*" -o -name "*Options.scss"
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/private/_OptionsRenderer.tsx /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/private/_Options.scss
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/private/_Options.scss
Tool results:
→ result (ok): 1 @use '../../style/variables';
2 @use '../../style/focus.scss';
3
4 // FIXME: This is a hack to override the tokens on the monolith where old ones are still loaded
5 // TODO This should be moved to the Dropdown component
6 .oxygen-input-field__option.oxygen-input-field__option {
7 --oxygen-LOCAL-inputField-input-option-background: var(--oxygen-color-semantic-common-subtle);
8 --oxygen-LOCAL-inputField-input-option-background-active: var(--oxygen-color-semantic-brand-subtle-weak);
9 }
10
1
…(truncated, 1272 more chars)
Now let me check the MultiSelectDropdownPopup styles more carefully and search for any specific max-height constraints:
Tools used:
Bash:grep -r "max-height\|maxHeight\|max_height" /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown --include="*.scss" --include="*.tsx" --include="*.ts" -n
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.module.scss:28: max-height: 32rem;
Tools used:
Bash:grep -r "max-height\|maxHeight\|max_height" /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/ComboBox --include="*.scss" --include="*.tsx" --include="*.ts" -n
Tool results:
→ result (ok): (Bash completed with no output)
Perfect! Found it! Let me read the full Dropdown.module.scss file:
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.module.scss
Tool results:
→ result (ok): 1 @use '../../style/variables';
2
3 // Because we want to detect any visual change without any noise,
4 // many of the rules below are commented.
5 // These changes will be applied in another PR.
6 // For now, we are focusing on accessibility.
7
8 // At long-term, all styles inside Dropdown.scss should be moved here (when all monolith tests are migrated to not use internal Dropdown classes)
9
10 .checkbox {
11 // margin-right: var(--oxygen-scale-primitive-gridUnit-x1);
12 margin-right: 0.
…(truncated, 1320 more chars)
Tools used:
Bash:grep -r "dl-new-dropdown" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src -A 5 -B 5 | head -40
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownPopup/MultiSelectDropdownPopup.tsx-export const MultiSelectDropdownPopup = ({ id, label, options, values, onToggle }: MultiSelectDropdownPopupProps) => ( /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownPopup/MultiSelectDropdownPopup.tsx- <dialog /Users/USER/workspace …(truncated, 2046 more chars)
Perfect! Now let me check if the Dropdown component is being used with the hasMaxHeight class:
Tools used:
Bash:grep -r "hasMaxHeight" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src --include="*.tsx" --include="*.ts" -n
Tool results:
→ result (ok): (Bash completed with no output)
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.tsx(1–80)
Tool results:
→ result (ok): 1 import './Dropdown.scss'
2
3 import classNames from 'classnames'
4 import type { CSSProperties, MouseEventHandler, ReactNode, TouchEventHandler } from 'react'
5 import { forwardRef } from 'react'
6
7 import { Button } from '../Button/Button'
8 import { Checkbox } from '../../forms/Checkbox/Checkbox'
9 import type { DataAttribute } from '../../common/DataAttribute/DataAttribute'
10 import { Divider } from '../../dataDisplay/Divider/Divider'
11 import { DropdownInternal } from './DropdownInter
…(truncated, 2679 more chars)
Let me check the dialog element for the dl-new-dropdown class more thoroughly and look for where hasMaxHeight might be applied:
Tools used:
Bash:grep -r "dl-new-dropdown" /Users/USER/workspace/doctolib/oxygen/packages --include="*.scss" --include="*.tsx" --include="*.ts" -A 3 -B 1 | grep -E "(hasMaxHeight|max-height|overflow)" | head -20
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/DropdownInternal.tsx- { [styles.hasMaxHeight as string]: hasMaxHeight },
Tools used:
Bash:grep -n "class.*dropdown" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownPopup/MultiSelectDropdownPopu …(truncated, 5 more chars)
Tool results:
→ result (ok): 18: className='dl-new-dropdown absolute top-full left-0 !w-full mt-[0.4rem] m-0 flex flex-col border-0 p-0 [&_label]:!py-[1.2rem] [&_label]:!px-[1.6rem] [&_label>span:last-child]:![font-size:1.4rem] [&_label]:![box-shadow:none]'
Let me read the DropdownInternal to see how hasMaxHeight is used:
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/DropdownInternal.tsx
Tool results:
→ result (ok): 1 import classNames from 'classnames'
2 import type { CSSProperties, ReactNode } from 'react'
3 import { forwardRef } from 'react'
4
5 import type { DataAttribute } from '../../common/DataAttribute/DataAttribute'
6 import { DropdownContext } from './DropdownContext'
7 import type { DropdownHTMLSemantic } from './DropdownContext'
8 import { filterDataAttributes } from '../../common/DataAttribute/DataAttribute'
9 import styles from './Dropdown.module.scss'
10
11 type DropdownInternalProps = {
12
…(truncated, 2123 more chars)
Perfect! Now let me check if the MultiSelectDropdownPopup uses the Dropdown component from Oxygen or uses its own dialog element. Let me also check if it applies the hasMaxHeight functionality:
Tools used:
Bash:grep -r "import.*Dropdown" /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown --include="*.tsx" --include="*.ts"
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.stories.tsx:import { MultiSelectDropdown } from './MultiSelectDropdown' /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.test.tsx:import { MultiSelectDropdown } from './MultiSelectDropdown' /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-re …(truncated, 2786 more chars)
Now let me read the MultiSelectDropdownTrigger to see the complete picture:
Tools used:
Read:/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownTrigger/MultiSelectDropdownTrigger.tsx
Tool results:
→ result (ok): 1 import { ChevronDownRegularIcon } from '@doctolib/design-system-icons/ChevronDownRegularIcon'
2 import { IconButton } from '@doctolib/design-system/IconButton/v2'
3
4 type MultiSelectDropdownTriggerProps = {
5 triggerId: string
6 popupId: string
7 isOpen: boolean
8 displayLabel: string
9 searchQuery: string
10 placeholder?: string
11 hasValues: boolean
12 onInputChange: (value: string) => void
13 onInputClick: () => void
14 onClear: () => void
15 }
16
17 export const Mult
…(truncated, 1799 more chars)
Excellent! Now let me verify the complete understanding by checking the Dropdown.scss file again to see the overflow: auto in context:
Tools used:
Read:/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.scss
Tool results:
→ result (ok): File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current — refer to that instead of re-reading.
Perfect. Now I have enough information to provide a comprehensive report. Let me create the final summary:
Summary Report
I've completed a thorough exploration of the NhrDocumentCategoryFilter component and traced it through to the underlying Oxygen design system dropdown implementations. Here's what I found:
1. NhrDocumentCategoryFilter Component
File: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx
The component is a thin wrapper that simply passes all props through to MultiSelectDropdown:
export const NhrDocumentCategoryFilter = (props: NhrDocumentCategoryFilterProps) => <MultiSelectDropdown {...props} />
2. MultiSelectDropdown Component
File: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.tsx
This is the actual dropdown implementation with:
- A custom <input> trigger that toggles the dropdown (styled with Oxygen input classes)
- Conditional rendering of MultiSelectDropdownPopup when open
- Search/filter capability using a normalize() helper
- Clear button functionality
3. MultiSelectDropdownPopup Component
File: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownPopup/MultiSelectDropdownPopup.tsx
The popup uses a native <dialog> element styled with the Oxygen dl-new-dropdown class:
<dialog
className='dl-new-dropdown absolute top-full left-0 !w-full mt-[0.4rem] m-0 flex flex-col ...'
>
<fieldset>
<MultiSelectDropdownOptions options={options} values={values} onToggle={onToggle} />
</fieldset>
</dialog>
4. MultiSelectDropdownOptions Component
File: /Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownOptions/MultiSelectDropdownOptions.tsx
Renders checkboxes from the Oxygen design system for each option:
{options.map((option) => (
<Checkbox ... />
))}
5. Scroll Behavior - KEY FINDINGS
The dropdown DOES have a hardcoded max-height:
- Source:
/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.module.scss - Max-height:
32rem(512 pixels) - Class:
.hasMaxHeight { max-height: 32rem; } - Applied via: The
DropdownInternalcomponent conditionally applies this class based on ahasMaxHeightboolean prop
Scroll behavior:
- File:
/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.scss(line 18) - Property:
overflow: auto;on.dl-new-dropdown - This enables standard browser scrolling when content exceeds the max-height
Important: The MultiSelectDropdown in the TPF package is using a native <dialog> element with the .dl-new-dropdown class, which gets the overflow: auto styling from Oxygen. However, the component does NOT explicitly apply the hasMaxHeight class, meaning it relies solely on the overflow: auto property without a max-height constraint.
6. Virtual Scrolling
No virtual scrolling is implemented. The component:
- Renders ALL options as DOM elements (via options.map() in MultiSelectDropdownOptions)
- Does NOT use React virtualization libraries (no react-window, react-virtualized, etc.)
- Relies on CSS overflow: auto for standard browser scrolling behavior
7. No Props for Scroll Control
The component has no props for:
- maxHeight / maxItems
- virtualScroll / enableVirtualization
- maxItems / displayCount
File Paths Summary
- Filter component:
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/NhrDocumentCategoryFilter/NhrDocumentCategoryFilter.tsx - Dropdown component:
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdown.tsx - Popup component:
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownPopup/MultiSelectDropdownPopup.tsx - Options renderer:
/Users/USER/workspace/doctolib/treatment-plan/packages/tpf-national-health-records-ui/src/components/MultiSelectDropdown/MultiSelectDropdownOptions/MultiSelectDropdownOptions.tsx - Oxygen Dropdown styles:
/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.scss(definesoverflow: auto) - Oxygen max-height:
/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Dropdown/Dropdown.module.scss(defines.hasMaxHeight { max-height: 32rem; })