Fix bootstrap theme search top sort options to match the JSP search UI#3151
Merged
Conversation
The bootstrap theme's search top "Sort" dropdown diverged from the classic JSP search UI: - "Score" appeared twice. The sort_options list from /api/v2/ui/config starts with an empty-value entry labelled "Score", so rendering it as-is produced a duplicate Score option with no "- Sort -" placeholder. renderSortOptions() now drops the leading empty-value entry and prepends a single empty-value placeholder (labels.advance_search_sort_default), matching advance.js and searchOptions.jsp. - Japanese sort labels were out of sync. The asc/desc labels lacked the parentheses used by the JSP labels and the other locales (e.g. "ファイル名昇順" instead of "ファイル名 (昇順)") and used different wording for created / last_modified. Aligned messages.ja.json with fess_label_ja.properties.
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.
Summary
The bootstrap theme's search top Sort dropdown diverged from the classic JSP search UI in two ways. This PR brings it back in line.
1. Duplicate "Score" option
The
sort_optionslist built byUiConfigHandler(/api/v2/ui/config) starts with an empty-value entry labelled Score, followed by the realscore.descentry.renderSortOptions()insearch.jsrendered the list as-is, so:- Sort -placeholder.renderSortOptions()now drops the leading empty-value entry and prepends a single empty-value placeholder (labels.advance_search_sort_default), mirroring the existing logic inadvance.jsandsearchOptions.jsp.2. Japanese sort labels out of sync
The Japanese asc/desc labels were missing the parentheses used by the JSP labels and every other locale (e.g.
ファイル名昇順instead ofファイル名 (昇順)) and used different wording for the created / last-modified fields.messages.ja.jsonis now aligned withfess_label_ja.properties. Other locales already matched and are unchanged.Changes
src/main/webapp/themes/bootstrap/assets/search.js—renderSortOptions()placeholder + de-duplicationsrc/main/webapp/themes/bootstrap/i18n/messages.ja.json— Japanese sort labels aligned with the JSP themeBefore / After (ja)