-
Notifications
You must be signed in to change notification settings - Fork 15
DRYD-1993: Add SortBy to Search Result Pages #309
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
Open
mikejritter
wants to merge
22
commits into
collectionspace:develop
Choose a base branch
from
mikejritter:feature/dryd-1993-sort-by
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DRYD-1993: Add SortBy to Search Result Pages #309
mikejritter
wants to merge
22
commits into
collectionspace:develop
from
mikejritter:feature/dryd-1993-sort-by
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this do?
Why are we doing this? (with JIRA link)
Jira: https://collectionspace.atlassian.net/browse/DRYD-1993
With the addition of the new search result views for objects, we wanted additional functionality in order to sort on more fields. This adds that by creating a new configuration,
sort.js, which is used to specify the fields which a record uses for sorting. I chose this rather than trying to add the sort options in the existing configuration files as the new views are fairly different from the previouscolumns.js.How should this be tested? Do these changes have associated tests?
For testing the sort behavior, tests were added to
searchHelpers.spec.jswhich can be reviewed/tested withnpm run test.For testing the views:
npm run devserver --back-end=https://core.dev.collectionspace.orgDependencies for merging? Releasing to production?
This hasn't done any setting of preferred sortBy/sortDir in redux. If needed we can add that here.
In areas where
columns.jswas used, the code has been updated in order to prefersort.jsfirst then fallback if it isn't found. This might cause some issues with existing profiles as their configured fields for sorting on CollectionObjects.I also noticed that the table columns change width when changing direction. That's something I had been meaning to do, and will get a ticket of its own.
Has the application documentation been updated for these changes?
N/A
Did someone actually run this code to verify it works?
@mikejritter has been testing against core.dev