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

220 - Fix: Filters disappear when the filters results is 1 file #226

Merged

Conversation

MellyGray
Copy link
Contributor

@MellyGray MellyGray commented Nov 9, 2023

What this PR does / why we need it:

This PR fixes an incorrect behaviour that hides the filters and search bar when the filters results in just 1 file.

The expected behaviour is that after using the filters, if the result is just 1 file, you still can see and use the filters and search bar.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Step 1: Run the development environment

  1. Run npm I
  2. cd packages/design-system && npm run build
  3. cd ../../
  4. Check that you have a .env file such as the .env.example, with the VITE_DATAVERSE_BACKEND_URL=http://localhost:8000 variable
  5. cd dev-env
  6. ./run-env.sh unstable
  7. To check the environment go to http://localhost:8000 and check your local dataverse installation

Step 2: Test Dataset View mode

  1. Go to http://localhost:8000
  2. Login as admin using username: dataverseAdmin and password: admin1
  3. Create a new Dataset and add different type of files.
  4. From the dataset view mode copy the search parameters from the url. Ex.: ?persistentId=doi:10.5072/FK2/LHGRHP&version=DRAFT
  5. Go to http://localhost:8000/spa/datasets and paste the search parameters. Ex.: http://localhost:8000/spa/datasets?persistentId=doi:10.5072/FK2/LHGRHP&version=DRAFT
  6. You are seeing now the same Dataset in the SPA. Use the filters to show just 1 result and check that the filters are still available so you can use them to again show All the files

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

No

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

No

Additional documentation:

Video from the incorrect behaviour:

bugfilters

@MellyGray MellyGray changed the title 220 - Fix: Filters disappear when the filters result in one 1 file 220 - Fix: Filters disappear when the filters results is 1 file Nov 9, 2023
@MellyGray MellyGray marked this pull request as ready for review November 9, 2023 13:06
@MellyGray MellyGray added the Size: 3 A percentage of a sprint. 2.1 hours. label Nov 9, 2023
@MellyGray MellyGray added the bug Something isn't working label Dec 4, 2023
@GPortas GPortas self-assigned this Dec 11, 2023
@GPortas
Copy link
Contributor

GPortas commented Dec 11, 2023

@MellyGray Please can you resolve the conflicts?

…into fix/220-filtering-on-files-tab-and-there-is-only-one-file
@coveralls
Copy link

coveralls commented Dec 11, 2023

Coverage Status

coverage: 98.278% (-0.01%) from 98.29%
when pulling 240a4fc on fix/220-filtering-on-files-tab-and-there-is-only-one-file
into 1acebdf on develop.

@MellyGray
Copy link
Contributor Author

@GPortas conflicts resolved

@MellyGray MellyGray removed their assignment Dec 11, 2023
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.

Works as expected!

fixx

@GPortas GPortas merged commit 9f73f62 into develop Dec 11, 2023
6 checks passed
@GPortas GPortas deleted the fix/220-filtering-on-files-tab-and-there-is-only-one-file branch December 11, 2023 13:52
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…and-there-is-only-one-file

220 - Fix: Filters disappear when the filters results is 1 file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Size: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix - Bug when filtering on files tab and there is only one result file
3 participants