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

Ability to sort works and collections on dashboard #748

Closed
2 tasks
Tracked by #903
jillpe opened this issue Aug 22, 2023 · 14 comments
Closed
2 tasks
Tracked by #903

Ability to sort works and collections on dashboard #748

jillpe opened this issue Aug 22, 2023 · 14 comments
Assignees

Comments

@jillpe
Copy link

jillpe commented Aug 22, 2023

Summary

Pals would like the ability to sort works and collections on the dashboard. They would like to be able to sort both by:

  • date uploaded
  • date modified
  • date created
  • depositor (a-z)
  • creator (a-z)
Screenshots

Image

Image

Accepted Criteria

  • As a user, I can sort works on the 'Works' dashboard page by date uploaded, date modified, date created, depositor (a-z), and creator (a-z)
  • As a user, I can sort collections on the 'Collections' dashboard page by date uploaded, date modified, date created, depositor (a-z), and creator (a-z)
@jillpe
Copy link
Author

jillpe commented Aug 23, 2023

Do you have a preference on where the sort button should go? Or do you want a developer to decide?

@ndroark
Copy link
Collaborator

ndroark commented Oct 6, 2023

I think the space between Show # per page and Search makes sense, if that's an option

@kirkkwang kirkkwang self-assigned this Oct 16, 2023
kirkkwang added a commit that referenced this issue Oct 17, 2023
This commit will add the ability to sort collections on the dashboard.
The collections work differently than the works so we have to make sure
the sort field is added to the search builder.  Because when you click
into a collection can view the works attached to the collection, we have
to approach it differently because otherwise the sort fields from the
dashboard index page will also be applied to the show page.  We decorate
Blacklight helpers to check the controller action name as our
conditional.

Ref:
  - #748
@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Oct 18, 2023

QA RESULTS: Pass ✅

Tested on: https://dev.commons-archive.org/dashboard/my/collections?locale=en

COLLECTIONS

  • As a user, I can sort collections on the 'Collections' dashboard page by:

[ ] - date uploaded ⚠️ @kirkkwang The collection dashboard seems to be missing the date uploaded field.

  • UPDATE: this was an intentional decision- See the next comment

[x] - date modified
[x] - date created
[x] - depositor (a-z)
[x] - creator (a-z)

Demo: https://share.zight.com/o0uKe9nO

Image

WORKS

  • As a user, I can sort works on the 'Works' dashboard page by date uploaded, date modified, date created, depositor (a-z), and creator (a-z)

DEMO: https://share.zight.com/Wnupx9Zl

Image

@ShanaLMoore
Copy link
Contributor

Why is date uploaded missing from the collection dashboard?

Per @kirkkwang -

        # Collections don't seem to have a date_uploaded_dtsi nor date_modified_dtsi
        # we can at least use the system_modified_dtsi instead of date_modified_dtsi
        # but we will omit date_uploaded_dtsi

ref: https://github.com/scientist-softserv/palni-palci/blob/main/app/helpers/blacklight/configuration_helper_behavior_decorator.rb#L23-L25

@ShanaLMoore
Copy link
Contributor

Requires re-indexing prod. Hold on client verification until that task is complete.

@ndroark
Copy link
Collaborator

ndroark commented Oct 31, 2023

Sort by Depositor and Creator aren't working in production tenants I've tested. Depositor sorts by title, and Creator seems to sort by some combination of file type and title.

@ShanaLMoore
Copy link
Contributor

Apologies for dropping the ball with removing the ON HOLD label. According to this comment the prod data was re-indexed. So I'll take a few mins to look into what may be going on. @ndroark

@kirkkwang
Copy link
Contributor

@ShanaLMoore I don't think we ever did a reindex on prod did we?

@laritakr
Copy link
Contributor

@ShanaLMoore I don't think we ever did a reindex on prod did we?

Shana said we did reindex prod, and it's also not working right on staging.

@ShanaLMoore
Copy link
Contributor

@ndroark Could you provide a screenshot or url, that shows the sort behaving incorrectly? Could you also specify your expectation in comparison to what your screenshot shows?
We could huddle too if you are available. We just want to make sure we understand expectations vs behaviors in order to fix whatever issue there may be.

@ShanaLMoore
Copy link
Contributor

@ndroark Could you provide a screenshot or url, that shows the sort behaving incorrectly? Could you also specify your expectation in comparison to what your screenshot shows? We could huddle too if you are available. We just want to make sure we understand expectations vs behaviors in order to fix whatever issue there may be.

Update after a huddle meeting: Creator is OK but depositor is not. Depositor had a typo in the app indexer so we will fix this, redeploy and reindex prod to resolve this.

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Nov 1, 2023

deployed hotfix to prod.

Don't client verify this until the reindex has been completed.

Since it's not urgent I may wait until the weekend to reindex cc @ndroark

kirkkwang added a commit that referenced this issue Nov 1, 2023
This commit will allow us to override the CollectionsController instead
of the Blacklight::ConfigurationHelperBehavior.  A bug was noticed when
switching the sort fields that the field selected wouldn't stick in the
UI even though the fields were actually sorting correctly.  Overriding
the CollectionsController will be a better pattern since we override the
WorksController in the same way.  The reason why we didn't do that in
the first place was because it caused the show page to have the same
sort fields as the index page.  In this commit, we are also modifying
the show page to reconfigure the sort fields to address the issue.

Ref:
  - #748
@ShanaLMoore
Copy link
Contributor

Reindex complete ✅

@kirkkwang to review work in prod then let @ndroark know to do the same if everything functions ok.

@ShanaLMoore
Copy link
Contributor

@laritakr confirmed that the misspelling of the solr property depositor has been corrected.

cc @ndroark this is ready for re review

@jeremyf jeremyf closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

6 participants