Skip to content
Snippets Groups Projects
Commit 6193d688 authored by mateusz-winiarczyk's avatar mateusz-winiarczyk
Browse files

Merge branch 'MIN-272-incomplete-scrolling-and-visibility-search-results' into 'development'

fix(search): fix incomplete scrolling and visibility (MIN-272)

See merge request !139
parents 2fdb9af4 7abe2ff2
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!139fix(search): fix incomplete scrolling and visibility (MIN-272)
Pipeline #86800 passed
...@@ -7,7 +7,7 @@ interface BioEntitiesPinsListProps { ...@@ -7,7 +7,7 @@ interface BioEntitiesPinsListProps {
export const BioEntitiesPinsList = ({ bioEnititesPins }: BioEntitiesPinsListProps): JSX.Element => { export const BioEntitiesPinsList = ({ bioEnititesPins }: BioEntitiesPinsListProps): JSX.Element => {
return ( return (
<ul className="h-[calc(100vh-198px)] overflow-auto px-6 py-2"> <ul className="h-[calc(100%-224px)] max-h-[calc(100%-224px)] overflow-auto px-6 py-2">
{bioEnititesPins && {bioEnititesPins &&
bioEnititesPins.map(result => ( bioEnititesPins.map(result => (
<BioEntitiesPinsListItem <BioEntitiesPinsListItem
......
...@@ -16,7 +16,7 @@ export const BioEntitiesResultsList = (): JSX.Element => { ...@@ -16,7 +16,7 @@ export const BioEntitiesResultsList = (): JSX.Element => {
}; };
return ( return (
<div> <div className="h-full">
<DrawerHeadingBackwardButton backwardFunction={navigateToGroupedSearchResults}> <DrawerHeadingBackwardButton backwardFunction={navigateToGroupedSearchResults}>
{mapName} {mapName}
</DrawerHeadingBackwardButton> </DrawerHeadingBackwardButton>
......
...@@ -7,7 +7,10 @@ export const CLOSE_BUTTON_ROLE = 'close-drawer-button'; ...@@ -7,7 +7,10 @@ export const CLOSE_BUTTON_ROLE = 'close-drawer-button';
export const GroupedSearchResults = (): JSX.Element => { export const GroupedSearchResults = (): JSX.Element => {
return ( return (
<div className="flex flex-col" data-testid="grouped-search-results"> <div
className="flex h-[calc(100%-124px)] max-h-[calc(100%-124px)] flex-col overflow-auto"
data-testid="grouped-search-results"
>
<div className="px-6"> <div className="px-6">
<Accordion allowZeroExpanded> <Accordion allowZeroExpanded>
<BioEntitiesAccordion /> <BioEntitiesAccordion />
......
...@@ -12,7 +12,7 @@ export const PinsList = ({ pinsList, type }: PinsListProps): JSX.Element => { ...@@ -12,7 +12,7 @@ export const PinsList = ({ pinsList, type }: PinsListProps): JSX.Element => {
switch (type) { switch (type) {
case 'drugs': case 'drugs':
return ( return (
<div className="h-[calc(100vh-198px)] overflow-auto"> <div className="h-[calc(100%-214px)] max-h-[calc(100%-214px)] overflow-auto">
<AccordionsDetails pinsList={pinsList} type={type} /> <AccordionsDetails pinsList={pinsList} type={type} />
<ul className="px-6 py-2" data-testid="pins-list"> <ul className="px-6 py-2" data-testid="pins-list">
{pinsList.map(result => { {pinsList.map(result => {
...@@ -27,7 +27,7 @@ export const PinsList = ({ pinsList, type }: PinsListProps): JSX.Element => { ...@@ -27,7 +27,7 @@ export const PinsList = ({ pinsList, type }: PinsListProps): JSX.Element => {
return <div />; return <div />;
case 'chemicals': case 'chemicals':
return ( return (
<div className="h-[calc(100vh-198px)] overflow-auto"> <div className="h-[calc(100%-214px)] max-h-[calc(100%-214px)] overflow-auto">
<AccordionsDetails pinsList={pinsList} type={type} /> <AccordionsDetails pinsList={pinsList} type={type} />
<ul className="px-6 py-2" data-testid="pins-list"> <ul className="px-6 py-2" data-testid="pins-list">
{pinsList.map(result => { {pinsList.map(result => {
......
...@@ -15,7 +15,7 @@ export const ResultsList = (): JSX.Element => { ...@@ -15,7 +15,7 @@ export const ResultsList = (): JSX.Element => {
}; };
return ( return (
<div> <div className="h-full">
<DrawerHeadingBackwardButton backwardFunction={navigateToGroupedSearchResults}> <DrawerHeadingBackwardButton backwardFunction={navigateToGroupedSearchResults}>
<span className="capitalize" data-testid="drawer-heading-text"> <span className="capitalize" data-testid="drawer-heading-text">
{stepType} {stepType}
......
...@@ -22,18 +22,18 @@ export const SearchDrawerWrapper = (): JSX.Element => { ...@@ -22,18 +22,18 @@ export const SearchDrawerWrapper = (): JSX.Element => {
<> <>
<SearchDrawerHeader /> <SearchDrawerHeader />
<SearchDrawerTabs /> <SearchDrawerTabs />
<div data-testid="search-drawer-content"> <div data-testid="search-drawer-content" className="h-full max-h-full">
{/* first step for displaying search results, drawers etc */} {/* first step for displaying search results, drawers etc */}
{currentStep === STEP.FIRST && <GroupedSearchResults />} {currentStep === STEP.FIRST && <GroupedSearchResults />}
{/* 2nd step for bioEntities aka content */} {/* 2nd step for bioEntities aka content */}
{currentStep === STEP.SECOND && isBioEntityType && ( {currentStep === STEP.SECOND && isBioEntityType && (
<div data-testid="search-second-step"> <div data-testid="search-second-step" className="h-full">
<BioEntitiesResultsList /> <BioEntitiesResultsList />
</div> </div>
)} )}
{/* 2nd step for drugs,chemicals */} {/* 2nd step for drugs,chemicals */}
{currentStep === STEP.SECOND && isChemicalsOrDrugsType && ( {currentStep === STEP.SECOND && isChemicalsOrDrugsType && (
<div data-testid="search-second-step"> <div data-testid="search-second-step" className="h-full">
<ResultsList /> <ResultsList />
</div> </div>
)} )}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment