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/561 add collection sort #573

Open
wants to merge 13 commits into
base: feat/562-add-collection-facets
Choose a base branch
from

Conversation

ekraffmiller
Copy link
Contributor

@ekraffmiller ekraffmiller commented Dec 17, 2024

What this PR does / why we need it:

Adds the Sort button to the Collection page, for sorting collection items.

Which issue(s) this PR closes:

Special notes for your reviewer:

In the Story and the ItemsSortBy component test, the style is not being applied to the selected option, even though it works in the app and in the CollectionItemsPanel Story.

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm i && 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 feature

  1. Create some collections and datasets in the root collection. Add one or multiple files in one of those created datasets.
  2. When first navigating to http://localhost:8000/spa/collections, check that the Sort button has ' Newest' highlighted, and the 'Relevance' sort option doesn't exist.
  3. Choose another sorting option. Check that the url is updated with the correct sort parameters.
  4. Submit a search. Check that the sort button now has 'Relevance' highlighted, and the url only has the 'q=searchtext' param.
  5. Choose another sorting option. Check that 'Relevance' is still visible, but not highlighted. Check that the items are sorted in the correct order.

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

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

Additional documentation:

@coveralls
Copy link

coveralls commented Dec 17, 2024

Coverage Status

coverage: 97.276% (-0.2%) from 97.5%
when pulling a83e526 on feat/561-add-collection-sort
into d170bc8 on feat/562-add-collection-facets.

@ekraffmiller ekraffmiller force-pushed the feat/561-add-collection-sort branch from 73d67d6 to 683b587 Compare December 18, 2024 19:36
@ekraffmiller ekraffmiller added the GREI Re-arch GREI re-architecture-related label Dec 19, 2024
@ekraffmiller ekraffmiller marked this pull request as ready for review December 19, 2024 15:23
@ekraffmiller ekraffmiller added SPA.Q4.1 Collection Page: All Filtering Options Size: 3 A percentage of a sprint. 2.1 hours. labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GREI Re-arch GREI re-architecture-related Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q4.1 Collection Page: All Filtering Options
Projects
Status: Ready for Review ⏩
Development

Successfully merging this pull request may close these issues.

2 participants