Add LanguageSelector to pages that do not render the Header component (PP-5158) - #201
Merged
Merged
Conversation
tdilauro
approved these changes
Sep 25, 2026
tdilauro
left a comment
Contributor
There was a problem hiding this comment.
This looks great! 🎉
One suggestion below to reduce code duplication and possible divergence, but this can go in as is.
Comment on lines
+25
to
+42
| <div | ||
| sx={{ | ||
| display: "flex", | ||
| flexDirection: ["column", "row"], | ||
| justifyContent: "space-between" | ||
| }} | ||
| > | ||
| <h1 sx={{ order: [2, 1] }}> | ||
| {t("itemLandingPage.findLibrary", "Find a Library")} | ||
| </h1> | ||
| <LanguageSelector | ||
| sx={{ | ||
| order: [1, 2], | ||
| width: "fit-content", | ||
| alignSelf: ["end", "unset"] | ||
| }} | ||
| /> | ||
| </div> |
Contributor
There was a problem hiding this comment.
It looks like this is exactly duplicated in MultiLibraryHome.tsx ll. 60-77. Might be worth making a helper component to keep them from diverging.
Coverage Report for CI Build 36155433474Coverage decreased (-0.3%) to 29.819%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
Description
The
LanguageSelectormenu has been added to several pages:A small update was also made to the library filter search input width that improved its spacing on smaller screens:
Motivation and Context
When the CPW was first internationalized, the
LanguageSelectorwas only added to theHeadercomponent, as this was a component that rendered on many of the main screens available to a user. However, theHeaderis only rendered within pages wrapped with theLayoutcomponent - which is used to provide theHeaderandFootercomponents to pages that are used for "site-wide navigation." This change excluded the above-mentioned pages. No visual indicator rendered to alert a user that they could change the locale for that catalog instance. This led to a poorer user experience for users who might a) end up on a page in a locale other than their own, and/or b) be unaware that their catalog could be navigated in a familiar language.Jira PP-5158
How Has This Been Tested?
LanguageSelectorrenders based onappConfig.enableLanguageSelectorflagChecklist: