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

Display specific fields in the index and metadata configuration page only for Parker exhibit #2643

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

hudajkhan
Copy link
Contributor

Relates to #2622 .

What this PR does:

  • Create a new feature flag for parker specific index fields
  • Sets that flag to false in the main settings file.
  • In the catalog controller, only adds parker specific fields if that flag is set to true.

How to test this:

  • In local development, create an exhibit with the slug "parker".
  • Set up Solr. Add a single Solr document with the following fields indicating this is a parker exhibit:
("exhibit_parker_public_bsi": [
    true
  ],
  "spotlight_exhibit_slug_parker_bsi": [
    true
  ],
  "spotlight_exhibit_slugs_ssim": [
    "parker"
  ]
  • create a new settings.local.yml file (or similar).
    Set up:
    feature_flags:
    parker:
    add_parker_index_fields: true

You should still see Parker specific fields in the metadata configuration page as well as the actual search results view, and you should not see Parker specific fields in any exhibit that is not Parker.

I didn't see any specific feature flag tests around values i.e. add_parker_search_fields. If anyone has thoughts on any tests to add, please feel free to suggest them.

Next step once this is merged: Updating feature flags for parker and parker-test here https://github.com/sul-dlss/shared_configs/blob/exhibits-prod/config/settings/production.yml so that the right values are picked up

Copy link
Contributor

@corylown corylown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hudajkhan this will need configurations to enable these fields for parker set in shared_config before this can be deployed to production, right? I think these flags should be set before we merge this work.


# Parker specific fields we do not wish to show in other exhibits
# editor_ssim, university_ssim, range_labels_ssim, and related_document_id_ssim.
config.add_index_field 'book_title_ssim', if: lambda { |context, *_args|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hudajkhan does this also need the label configured? It was set to "Book Title" below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will add that

@corylown corylown merged commit 0ee6298 into main Nov 20, 2024
2 checks passed
@corylown corylown deleted the parkeronly branch November 20, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants