Bug 37841 - Switch OPAC language menu alignment in header and footer
Summary: Switch OPAC language menu alignment in header and footer
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 35402
Blocks: 36337
  Show dependency treegraph
 
Reported: 2024-09-05 10:52 UTC by Owen Leonard
Modified: 2024-09-13 10:08 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of the language selector in the footer for the OPAC. For longer language names (such as English United Kingdom), the name is misaligned and goes off the page to the left.
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37841: Switch OPAC language menu alignment in header and footer (2.54 KB, patch)
2024-09-05 11:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Screenshot - display issue after patch + English United Kingdom language selected (4.41 KB, image/png)
2024-09-06 22:36 UTC, David Nind
Details
Bug 37841: Switch OPAC language menu alignment in header and footer (2.59 KB, patch)
2024-09-09 19:22 UTC, David Nind
Details | Diff | Splinter Review
Bug 37841: Switch OPAC language menu alignment in header and footer (2.55 KB, patch)
2024-09-11 16:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37841: Switch OPAC language menu alignment in header and footer (2.62 KB, patch)
2024-09-12 07:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-09-05 10:52:32 UTC
(In reply to Jonathan Druart from Bug 36337 comment #6)
> Not sure if this is this patch that needs to fix it, but I found a bad
> display when en and en-GB are selected: https://snipboard.io/iBNjEn.jpg
> (bottom left)

The OPAC language menu needs to switch it's alignment relative to the trigger button based on whether it's appearing in the header or the footer.
Comment 1 Owen Leonard 2024-09-05 11:23:20 UTC Comment hidden (obsolete)
Comment 2 David Nind 2024-09-06 22:36:46 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2024-09-09 12:26:23 UTC
David did you update and install the en-GB translations after applying the patch? From the screenshot it looks like the en-GB templates don't have the patch's changes.
Comment 4 David Nind 2024-09-09 19:22:16 UTC
(In reply to Owen Leonard from comment #3)
> David did you update and install the en-GB translations after applying the
> patch? From the screenshot it looks like the en-GB templates don't have the
> patch's changes.

That was indeed the problem! Sign off on the way...
Comment 5 David Nind 2024-09-09 19:22:56 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2024-09-11 13:05:28 UTC
To test bug 36337 I need to apply bug 37833 and this one, but I get a conflict:

Bug 36337 Depends on bug 37833 (Signed Off)                                                               
Follow? [(y)es, (n)o]                                                                                     
Bug 37833 - Incorrect logic controlling display of OPAC language selection menus
                                                                                                          
171154 - Bug 37833: Incorrect logic controlling display of OPAC language selection menus                                                                                                                             
                                                                                                                                                                                                                     
Applying: Bug 37833: Incorrect logic controlling display of OPAC language selection menus                 
Apply? [(y)es, (n)o, (i)nteractive]                                                                       
Bug 36337 Depends on bug 37841 (Signed Off)                                                               
Follow? [(y)es, (n)o]                                                                                     
Bug 37841 - Switch OPAC language menu alignment in header and footer                                                                                                                                                 
                                                                                                          
171230 - Bug 37841: Switch OPAC language menu alignment in header and footer                                                                                                                                         
                                                                                                                                                                                                                     
Applying: Bug 37841: Switch OPAC language menu alignment in header and footer                                                                                                                                        
Using index info to reconstruct a base tree...                                                                                                                                                                       
M       koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc                                                                                                                                                       
Falling back to patching base and 3-way merge...                                                                                                                                                                     
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc                                       
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/includes/langmenu.inc
Comment 7 Owen Leonard 2024-09-11 16:05:05 UTC
Created attachment 171345 [details] [review]
Bug 37841: Switch OPAC language menu alignment in header and footer

The OPAC language menu is now generated by the same include file in both
the header and the footer. We have a switch for the menu's direction
based on this context, but we also need a switch for alignment: The menu
should extend left into the page from the header, and right into the
page from the footer.

To test you should have at least one additional language installed and
enabled. To reproduce the bug I recomment en-GB because the language
description is long enough to trigger the misalignment.

- Apply the patch and set the 'opaclanguagesdisplay' system preference
  to "Allow" and the 'OpacLangSelectorMode' preference to "both top and
  footer".
- Go to the OPAC and test the language selector menus in the header and
  footer.
  - The expanded menu in the header should extend to the left of the
    "Languages" menu trigger.
  - The expanded menu in the footer should extend to the right of the
    "Languages" menu trigger.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Jonathan Druart 2024-09-12 07:28:56 UTC
Created attachment 171356 [details] [review]
Bug 37841: Switch OPAC language menu alignment in header and footer

The OPAC language menu is now generated by the same include file in both
the header and the footer. We have a switch for the menu's direction
based on this context, but we also need a switch for alignment: The menu
should extend left into the page from the header, and right into the
page from the footer.

To test you should have at least one additional language installed and
enabled. To reproduce the bug I recomment en-GB because the language
description is long enough to trigger the misalignment.

- Apply the patch and set the 'opaclanguagesdisplay' system preference
  to "Allow" and the 'OpacLangSelectorMode' preference to "both top and
  footer".
- Go to the OPAC and test the language selector menus in the header and
  footer.
  - The expanded menu in the header should extend to the left of the
    "Languages" menu trigger.
  - The expanded menu in the footer should extend to the right of the
    "Languages" menu trigger.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Katrin Fischer 2024-09-13 10:08:13 UTC
Pushed for 24.11!

Well done everyone, thank you!