Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve paging of search results (DEV-2468) #1995

Merged
merged 21 commits into from
Jan 27, 2025

Conversation

domsteinbach
Copy link
Contributor

@domsteinbach domsteinbach commented Dec 10, 2024

resolves DEV-2468, DEV-4504

Copy link

linear bot commented Dec 10, 2024

@domsteinbach domsteinbach changed the title Feature/dev 2468 improve paging of search results feat: improve paging of search results (DEV-2468) Dec 10, 2024
@domsteinbach domsteinbach marked this pull request as ready for review January 15, 2025 10:52
Copy link
Collaborator

@derschnee68 derschnee68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to talk about it with everybody to think about using a lib to do this

Copy link

linear bot commented Jan 20, 2025

@@ -93,7 +93,10 @@ import { sortByKeys } from './sortByKeys';
<app-incoming-standoff-link-value
*ngIf="(incomingLinks$ | async)?.length > 0"
[links]="incomingLinks$ | async"></app-incoming-standoff-link-value>
<dasch-swiss-app-pager #pager (pageChanged)="pageChanged()"></dasch-swiss-app-pager>
<dasch-swiss-app-incoming-resource-pager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dasch-swiss-app-incoming-resource-pager

why don't you call it app-incoming-resource-pager ? or dasch-swiss-incoming-resource-pager?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I only added the "incoming-resource" to be more precise. The "dasch-swiss" was once the convention and I simply kept it.

@@ -145,7 +148,7 @@ export class PropertiesDisplayComponent implements OnChanges, OnDestroy {
@Output() afterResourceDeleted = new EventEmitter();

@ViewChild('pager', { static: false })
pagerComponent: PagerComponent | undefined;
pagerComponent: IncomingResourcePagerComponent | undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could say that it IS defined (remove undefined), right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, that component was not of my concern.

return this.lastItemOfPage ? this.lastItemOfPage : this.pageSize * (this._pageIndex + 1);
}

turnPage(dir: 1 | -1) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changePage rather than turnPage ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

<!-- container with search results -->
<div class="list-view-container">
<dasch-swiss-app-progress-indicator *ngIf="loading"></dasch-swiss-app-progress-indicator>
<div *ngIf="!loading && (numberOfAllResults > 0 && resources)">
<dasch-swiss-app-pager (pageIndexChanged)="doSearch($event)" [numberOfAllResults]="numberOfAllResults">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the one tag version

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also why not call it dasch-swiss-pager

@domsteinbach domsteinbach merged commit 8c9d77c into main Jan 27, 2025
14 checks passed
@domsteinbach domsteinbach deleted the feature/dev-2468-improve-paging-of-search-results branch January 27, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants