-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #342 from IQSS/feature/322-support-infinite-scrolling
Feature/322 support infinite scrolling
- Loading branch information
Showing
41 changed files
with
829 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VITE_DATAVERSE_BACKEND_URL=http://localhost:8080 | ||
VITE_DATAVERSE_BACKEND_URL=http://localhost:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
{ | ||
"results_one": "1 {{item}}", | ||
"results_other": "{{start}} to {{end}} of {{count}} {{item}}s", | ||
"accumulated": { | ||
"one": "{{count}} {{item}}", | ||
"lessThanPageSize": "{{count}} {{item}}s", | ||
"moreThanPageSize": "{{accumulated}} of {{count}} {{item}}s seen" | ||
}, | ||
"pageSize": "{{item}}s per page" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { DatasetPreview } from '../../domain/models/DatasetPreview' | ||
import { TotalDatasetsCount } from './TotalDatasetsCount' | ||
|
||
export interface DatasetsWithCount { | ||
datasetPreviews: DatasetPreview[] | ||
totalCount: TotalDatasetsCount | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { DatasetRepository } from '../repositories/DatasetRepository' | ||
import { DatasetPaginationInfo } from '../models/DatasetPaginationInfo' | ||
import { DatasetsWithCount } from '../models/DatasetsWithCount' | ||
|
||
export async function getDatasetsWithCount( | ||
datasetRepository: DatasetRepository, | ||
collectionId: string, | ||
paginationInfo: DatasetPaginationInfo | ||
): Promise<DatasetsWithCount> { | ||
return datasetRepository.getAllWithCount(collectionId, paginationInfo).catch((error: Error) => { | ||
throw new Error(error.message) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const INFINITE_SCROLL_ENABLED = true |
43 changes: 40 additions & 3 deletions
43
src/sections/collection/datasets-list/DatasetsList.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,50 @@ | ||
@import "node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module"; | ||
@import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; | ||
|
||
.container { | ||
min-height: calc(100vh + 100px); | ||
padding:15px; | ||
padding: 15px; | ||
border: 1px solid #ddd; | ||
border-radius: 4px; | ||
} | ||
|
||
.empty-message-container { | ||
padding: .5em 1em; | ||
padding: 0.5em 1em; | ||
background: $dv-warning-box-color; | ||
} | ||
|
||
// Infinite scroll enabled | ||
.scrollable-container { | ||
--inline-padding: 1rem; | ||
|
||
height: 650px; | ||
max-height: 650px; | ||
padding-inline: var(--inline-padding); | ||
overflow-x: hidden; | ||
overflow-y: auto; | ||
border: 1px solid #ddd; | ||
border-radius: 4px; | ||
|
||
@media screen and (max-width: 768px) { | ||
--inline-padding: 8px; | ||
} | ||
|
||
@media screen and (min-width: 1280px) { | ||
height: 60vh; | ||
max-height: 60vh; | ||
} | ||
|
||
&--empty-or-error { | ||
padding-block: 1rem; | ||
} | ||
|
||
.sticky-pagination-results { | ||
position: sticky; | ||
top: 0; | ||
z-index: 10; | ||
width: calc(100% + (var(--inline-padding) * 2)); | ||
padding: 1rem var(--inline-padding) 0.5rem; | ||
background-color: var(--bs-white); | ||
box-shadow: 0 0 10px 0 rgba(0 0 0 / 30%); | ||
transform: translateX(calc(var(--inline-padding) * -1)); | ||
} | ||
} |
Oops, something went wrong.