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

Add search branding option #20902

Merged
merged 2 commits into from Apr 29, 2024
Merged

Add search branding option #20902

merged 2 commits into from Apr 29, 2024

Conversation

benhalpern
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This adds the ability to turn on the "Powered by Algolia" if partnership is enabled. You can use Algolia search without this turned on, but if it is turned on, you see the Algolia logo.

Key part: When this is not turned on, nothing should be different.

Related Tickets & Documents

@benhalpern benhalpern requested review from a team as code owners April 29, 2024 14:07
@benhalpern benhalpern requested review from maestromac and lightalloy and removed request for a team April 29, 2024 14:07
Copy link
Contributor

github-actions bot commented Apr 29, 2024

Uffizzi Ephemeral Environment Deploying

☁️ https://app.uffizzi.com/github.com/forem/forem/pull/20902

⚙️ Updating now by workflow run 8880570223.

What is Uffizzi? Learn more!

Copy link
Member

@maestromac maestromac left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -148,6 +148,7 @@ class General < Base
setting :algolia_application_id, type: :string, default: ApplicationConfig["ALGOLIA_APPLICATION_ID"]
setting :algolia_api_key, type: :string, default: ApplicationConfig["ALGOLIA_API_KEY"]
setting :algolia_search_only_api_key, type: :string, default: ApplicationConfig["ALGOLIA_SEARCH_ONLY_API_KEY"]
setting :display_algolia_branding, type: :boolean, default: ApplicationConfig["ALGOLIA_DISPLAY_BRANDING"] == "true"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
setting :display_algolia_branding, type: :boolean, default: ApplicationConfig["ALGOLIA_DISPLAY_BRANDING"] == "true"
setting :display_algolia_branding, type: :boolean, default: ApplicationConfig["ALGOLIA_DISPLAY_BRANDING"]

The matching is unnecessary because this class will do automatic conversion and only "true" will be considered a true bool

@benhalpern benhalpern added this pull request to the merge queue Apr 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 29, 2024
@benhalpern benhalpern merged commit 1287c34 into main Apr 29, 2024
32 checks passed
@benhalpern benhalpern deleted the ben/add-algolia-logo branch April 29, 2024 18:02
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.

None yet

2 participants