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

Default Collection image missing #76

Open
1 task
ndroark opened this issue Jun 9, 2024 · 9 comments
Open
1 task

Default Collection image missing #76

ndroark opened this issue Jun 9, 2024 · 9 comments
Assignees

Comments

@ndroark
Copy link
Collaborator

ndroark commented Jun 9, 2024

Summary

The standard default collection image (the stack of cubes) is missing, collections without a thumbnail set show a common file placeholder image.

Currently showing
Image

What should show
Image

Acceptance Criteria

  • the default thumbnail for collections is the stack of cubes image
@ndroark ndroark converted this from a draft issue Jun 9, 2024
@ShanaLMoore
Copy link
Contributor

Updated submodule

Tested on DEMO

DEFAULT COLLECTION IMAGE set:
Image

DEFAULT COLLECTION IMAGE rendered:

Image

@ShanaLMoore ShanaLMoore moved this to Client QA in PalsKnapsack Jun 20, 2024
@ShanaLMoore ShanaLMoore self-assigned this Jun 20, 2024
@ShanaLMoore ShanaLMoore mentioned this issue Jul 11, 2024
10 tasks
@ndroark
Copy link
Collaborator Author

ndroark commented Aug 28, 2024

I am now seeing the default collection image in some cases, but newly created collections are populating with the file image above. Example: https://demo.palni-palci-staging.notch8.cloud/dashboard/collections/2ae0d227-d53d-4957-b72f-18ee5e55e64b?locale=en

@ndroark ndroark moved this from Client QA to Ready for Development in PalsKnapsack Aug 28, 2024
@jillpe jillpe moved this from Ready for Development to Client QA in PalsKnapsack Aug 28, 2024
@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Aug 28, 2024

@ndroark for this tenant, the default collection image wasn't set.

Screenshot 2024-08-28 at 08-02-14 Show Appearance __ Hyku Commons

When I updated it from the Admin Dashboard > Settings > Appearances > Default Images. Save and refresh the collection page, the expected image appears. Once set, all new collections will use this default.

Otherwise it falls back to the icon defined by Hyrax or Hyku (I'd have to chase it down). Will this behavior suffice?

image

image

@ndroark
Copy link
Collaborator Author

ndroark commented Aug 28, 2024

Is this the icon defined by Hyrax?

Image

In our standard production repo, the three blocks icon is what collections show by default unless the default icon is updated manually by the user.

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Aug 28, 2024

In our standard production repo, the three blocks icon is what collections show by default unless the default icon is updated manually by the user.

Ah ok, so the true default is what we need to change. This should be the default even when the user hasn't set one.

Got it, we can re work this

@ShanaLMoore ShanaLMoore added the needs rework issue needs additional work label Aug 28, 2024
@ShanaLMoore ShanaLMoore moved this from Client QA to In Development in PalsKnapsack Aug 28, 2024
@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Aug 28, 2024

To report back, I can confirm the true default was coming from Hyrax. I'll override it with your request.

# app/helpers/application_helper.rb

  # Return collection thumbnail formatted for display:
  #  - use collection's branding thumbnail if it exists
  #  - use site's default collection image if one exists
  #  - fallback to Hyrax's default image
  def collection_thumbnail(document, _image_options = {}, url_options = {})
    view_class = url_options[:class]
    # The correct thumbnail SHOULD be indexed on the object
    return image_tag(document['thumbnail_path_ss'], class: view_class, alt: alttext_for(document)) if document['thumbnail_path_ss'].present?

    # If nothing is indexed, we just fall back to site default
    return image_tag(Site.instance.default_collection_image&.url, alt: alttext_for(document), class: view_class) if Site.instance.default_collection_image.present?

    # fall back to Hyrax default if no site default
    tag.span("", class: [Hyrax::ModelIcon.css_class_for(::Collection), view_class],
                 alt: alttext_for(document))
  end

ShanaLMoore pushed a commit to samvera/hyku that referenced this issue Aug 28, 2024
When a user sets a default image in Settings, it should override the true default image (that somes from Hyrax). Previously, the collection image did not change even after the user set one.

Issue:
- notch8/palni_palci_knapsack#76
ShanaLMoore pushed a commit that referenced this issue Aug 28, 2024
Pals wanted to use a different image for their application's default collection image.

Issue:
- #76

TODO: update submodule
@ShanaLMoore ShanaLMoore moved this from Deploy to Production to Ready for Development in PalsKnapsack Aug 28, 2024
@ShanaLMoore
Copy link
Contributor

@ndroark in the list of current priorities, where would this fit?

@ShanaLMoore ShanaLMoore moved this from Ready for Development to In Development in PalsKnapsack Aug 29, 2024
@ShanaLMoore ShanaLMoore removed their assignment Aug 29, 2024
@ShanaLMoore ShanaLMoore moved this from In Development to Ready for Development in PalsKnapsack Aug 29, 2024
@ShanaLMoore ShanaLMoore removed the needs rework issue needs additional work label Sep 3, 2024
@ShanaLMoore ShanaLMoore moved this from Ready for Development to SoftServ QA in PalsKnapsack Sep 3, 2024
@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Sep 3, 2024

QA: Please note, if it looks like pictures aren't updating after save, check to see that the reindex jobs have completed.

@laritakr
Copy link
Contributor

laritakr commented Sep 4, 2024

QA Results ✅

  • Default thumbnail shows
  • Custom thumbnail shows
  • Changing the tenant's default collection thumbnail works
  • Removing the tenant's default collection reverts to the stack of cubes overall default image

@laritakr laritakr moved this from SoftServ QA to Client QA in PalsKnapsack Sep 4, 2024
@laritakr laritakr moved this from Deploy to Production to Client Verification in PalsKnapsack Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Client Verification
Development

No branches or pull requests

3 participants