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

405 Infinite Scrolling on Dataset Files #415

Merged
merged 27 commits into from
Jun 24, 2024

Conversation

g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Jun 5, 2024

What this PR does / why we need it:
Adds infinite scrolling to the files list in the files tab from a dataset.

Which issue(s) this PR closes:

Closes #405

Special notes for your reviewer:
I have created a configuration file to choose between normal pagination with buttons or infinite scroll.
Many components were reused and adapted with some new prop, others I preferred to make an alternative version specifically for this feature.
Many changes were necessary for the file selection but everything still maintains the same flows.
I also took the opportunity to improve the styles of the criteria form, some elements were collapsing or overflowing in mobile.

Suggestions on how to test this:
Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm run build.
  3. Return with cd ../../.
  4. Ensure you have a .env file similar to .env.example, with the variable VITE_DATAVERSE_BACKEND_URL=http://localhost:8000.
  5. Navigate with cd dev-env.
  6. Start the environment using ./run-env.sh unstable.
  7. To verify the environment, visit http://localhost:8000 and check your local Dataverse installation.

Step 2: Test the Files scrollable Table

  • Upload multiple files to a dataset in the JSF UI version.
  • Scroll to the bottom of the table to load more files.
  • Scroll to the bottom and then change any filter, you will be automatically scrolled to the top.
  • Load first 10 files, select 10 files and then click the Select All button, after that scroll to the bottom to load more files, these files should be checked as you have selected them before loading them.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Yes.

Screenshot 2024-06-06 at 09 53 51

How sticky positioning of all elements works with the infinite scrolling 👇🏼
Screenshot 2024-06-06 at 09 58 17

Criteria Form layout fixes & table header action buttons only icons for mobile 👇🏼 :
Old:
Screenshot 2024-06-05 at 15 17 48

New:
Screenshot 2024-06-05 at 15 17 59

Is there a release notes update needed for this change?:
No.

Additional documentation:
No.

@coveralls
Copy link

Coverage Status

coverage: 97.91% (+0.1%) from 97.809%
when pulling 0bcc951 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 98.403% (+0.6%) from 97.809%
when pulling 51c2675 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 98.403% (+0.6%) from 97.809%
when pulling 51c2675 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 98.403% (+0.6%) from 97.809%
when pulling 2fdb8d6 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 97.818% (+0.009%) from 97.809%
when pulling 2fdb8d6 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 98.403% (+0.6%) from 97.809%
when pulling f8fc984 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@g-saracca g-saracca changed the title Feature/405 files tab content infinite scrolling 405 Infinite Scrolling on Dataset Files Jun 5, 2024
@coveralls
Copy link

Coverage Status

coverage: 97.821% (+0.01%) from 97.809%
when pulling f8fc984 on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 98.403% (+0.6%) from 97.809%
when pulling 292d97d on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@g-saracca g-saracca added Size: 3 A percentage of a sprint. 2.1 hours. pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows SPA: Dataset page (View) labels Jun 5, 2024
@coveralls
Copy link

Coverage Status

coverage: 97.821% (+0.01%) from 97.809%
when pulling 292d97d on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 98.403% (+0.6%) from 97.809%
when pulling bf03d5f on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 97.821% (+0.01%) from 97.809%
when pulling bf03d5f on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@g-saracca g-saracca marked this pull request as ready for review June 6, 2024 13:29
Copy link
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for going over the code with me, just small comment below. Also it is not in the list of changed files, but in the pagination text, I think the word "viewed" sounds better than "seen".

@coveralls
Copy link

Coverage Status

coverage: 97.821% (+0.01%) from 97.809%
when pulling fd787cf on feature/405-files-tab-content-infinite-scrolling
into 2ec048c on develop.

@coveralls
Copy link

Coverage Status

coverage: 97.581% (+0.03%) from 97.547%
when pulling 821e5e7 on feature/405-files-tab-content-infinite-scrolling
into fa7497a on develop.

@g-saracca g-saracca assigned ekraffmiller and unassigned g-saracca Jun 20, 2024
Copy link
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

Looks good, approved! (FYI about the failing Github action - I ran the component test a second time because I think there was a glitch in the first run of the github action. The component test succeeded on the second run, but then the coverage report failed, but that is only because there was already a coverage report from the first test run. So I think it is all good.)

@ekraffmiller ekraffmiller removed their assignment Jun 21, 2024
@GPortas GPortas self-assigned this Jun 21, 2024
Copy link
Contributor

@GPortas GPortas left a comment

Choose a reason for hiding this comment

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

This is awesome. Congratulations for the great work on this! @GermanSaracca

I only found this detail about the scroll controller bar. The bar starts above the content of the files tab, instead of starting with the first file. Do you think this is a correct behavior?

I am wondering if the bar should start with the first file instead.

scrolltest.mov

@g-saracca
Copy link
Contributor Author

I only found this detail about the scroll controller bar. The bar starts above the content of the files tab, instead of starting with the first file. Do you think this is a correct behavior?
I am wondering if the bar should start with the first file instead.

That is indeed the expected behaviour as the scrollable container wraps the criteria form , the table and the rest of elements that may appear (as file selection count info, and download size info).
Everything sticks to the top as described here.

@GPortas GPortas merged commit 107aaca into develop Jun 24, 2024
19 of 20 checks passed
@GPortas GPortas deleted the feature/405-files-tab-content-infinite-scrolling branch June 24, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours. SPA: Dataset page (View)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite Scrolling on Files Tab content of a Dataset
4 participants