-
Notifications
You must be signed in to change notification settings - Fork 439
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
Change - Metadata field selector, add infinite scroll for data paginated #3096
Conversation
this.input.valueChanges.pipe( | ||
debounceTime(this.debounceTime), | ||
startWith(''), | ||
tap( () => this.currentPage$.next(1) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a good idea to "perform work" in a tap. Taps are meant for debugging purposes, and shouldn't affect anything else. The main reason for that is that the code in the tap won't be executed if nothing is subscribed to the pipe in the end. Since you're subscribing immediately underneath this line that's not an issue here, but then there's also no good reason not to move this code to the subscribe as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@artlowel Hi, I changed this observable in the subscribe function
debounceTime(this.debounceTime), | ||
startWith(''), | ||
tap( () => this.currentPage$.next(1) ) | ||
).subscribe((valueChange) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add this subscribe to the subs array, so it can be unsubscribed onDestroy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@artlowel I aded to subs array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VictorHugoDuranS : We reviewed this as a team in our weekly DevMtg today. Some of the feedback can be found above. One other note to add is that we'd need to have a version of this PR built against main
, so that we can port it to 8.x and 9.0. If you could create a separate PR for main
, that'd be appreciated. (An alternative would be to update this PR to be against main
, and we can then just apply this fix in 9.0 and 8.x only). Thanks!
.../dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.html
Outdated
Show resolved
Hide resolved
# Conflicts: # src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.ts # src/app/dso-shared/dso-shared.module.ts
Hi @VictorHugoDuranS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @VictorHugoDuranS!
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3096-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3096-to-dspace-7_x
git switch --create backport-3096-to-dspace-7_x
git cherry-pick -x ee8e915695503debab6875af2d0ce938b0fb98cf ea4076af29dc4a9f5df2284fc0e170da6f9454fd 354675f06b6104868173c62f3d794203aa7a35f1 ad1c954984c39df32d3a4bd87b5fe3e713a05dcd |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-8_x
git worktree add -d .worktree/backport-3096-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-3096-to-dspace-8_x
git switch --create backport-3096-to-dspace-8_x
git cherry-pick -x ee8e915695503debab6875af2d0ce938b0fb98cf ea4076af29dc4a9f5df2284fc0e170da6f9454fd 354675f06b6104868173c62f3d794203aa7a35f1 ad1c954984c39df32d3a4bd87b5fe3e713a05dcd |
…ted (DSpace#3096) * Change - Metadata field selector add infinite scroll for data paginated * Update change on new BRANCH * Fix - LINT ERRORS * Fix - LINT ERRORS
…ted (DSpace#3096) * Change - Metadata field selector add infinite scroll for data paginated * Update change on new BRANCH * Fix - LINT ERRORS * Fix - LINT ERRORS
…ted (DSpace#3096) * Change - Metadata field selector add infinite scroll for data paginated * Update change on new BRANCH * Fix - LINT ERRORS * Fix - LINT ERRORS
Hi @tdonohue , I'm @jtimal partner, I like to share this PR with you:
References
Description
I changed metadata field selector add infinite scroll for pagination all data from metadata field service, this change load all options in the start
Instructions for Reviewers
To see the new implementation, I attch a video with the functionality: https://youtu.be/8D-EjhubABI
List of changes in this PR:
Checklist
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.