Conversation
Why these changes are being introduced: UXWS has requested a few related changes to normalize page titles. See ticket for details. Relevant ticket(s): - [USE-621](https://mitlibraries.atlassian.net/browse/USE-621) How this addresses that need: This makes the requested changes. Side effects of this change: - Removed use of ternary in `index_page_title` for readability - Removed redundant title method - Updated record page titles (though technically not in scope of USE, it made sense to fix them as part of this change)
Coverage Report for CI Build 27988369575Coverage decreased (-0.003%) to 98.35%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR normalizes HTML <title> strings across the index, results, record, and “About Natural Language Search” pages by making titles consistently incorporate the platform/index title.
Changes:
- Update
index_page_titledefault and simplify title composition by reusingindex_page_titlefor results/record pages. - Ensure
results_page_titleignores the newqueryModeparam and update helper tests for the new title formats. - Update the “About Natural Language Search” static page to include the normalized title format.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
app/helpers/application_helper.rb |
Adjusts index/results/record title helpers and updates ignored params list (adds queryMode). |
app/views/static/about_natural_language_search.html.erb |
Updates static page to set a normalized composite <title>. |
test/helpers/application_helper_test.rb |
Updates expectations for new title formats and adds coverage for the About NLS title format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+23
to
24
| ignored_terms = %i[page advanced geobox geodistance booleanType tab queryMode] | ||
| terms = query.reject { |term| ignored_terms.include? term }.values.join(' ') |
Contributor
Author
There was a problem hiding this comment.
This seems to be correct in theory, but it's incorrect in practice. The terms are filtered out as expected, including the newly added queryMode.
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.
Why these changes are being introduced:
UXWS has requested a few related changes to
normalize page titles. See ticket for details.
Relevant ticket(s):
How this addresses that need:
This makes the requested changes.
Side effects of this change:
index_page_titlefor readabilitypart of this change)
Developer
Accessibility
New ENV
Approval beyond code review
Additional context needed to review
E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.
Code Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing