Bug 40931 - Hold pickup location drop-down boxes not wide enough when placing multiple holds at the same time.
Summary: Hold pickup location drop-down boxes not wide enough when placing multiple ho...
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on: 39533
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-01 16:30 UTC by CJ Lynce
Modified: 2025-11-10 15:15 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.05
Circulation function:


Attachments
Example of hold pickup locations dropdown issue (30.79 KB, image/png)
2025-10-01 16:30 UTC, CJ Lynce
Details
Bug 40931: (bug 39533 follow-up) Isolate CSS changes to prevent side-effects (1.96 KB, patch)
2025-10-06 09:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Example of item edit page select2 boxes after testing patch (75.64 KB, image/png)
2025-10-07 20:10 UTC, CJ Lynce
Details
Bug 40931: (bug 39533 follow-up) More specific max-width CSS rule to prevent side-effects (1.28 KB, patch)
2025-10-09 10:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40931: (bug 39533 follow-up) More specific max-width CSS rule to prevent side-effects (1.33 KB, patch)
2025-10-09 22:29 UTC, CJ Lynce
Details | Diff | Splinter Review
Bug 40931: (bug 39533 follow-up) More specific max-width CSS rule to prevent side-effects (1.39 KB, patch)
2025-10-16 18:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description CJ Lynce 2025-10-01 16:30:30 UTC
Created attachment 187221 [details]
Example of hold pickup locations dropdown issue

When placing a patron hold on multiple items at the same time, the width of the pickup location drop-down boxes are not wide enough to fully display the name of the pickup location. For short location names, only one letter is show. (see screenshot)

This appears to have been introduced by bug 39533 in koha-tmpl/intranet-tmpl/prog/css/select2.css - '.select2.select2-container.select2-container--default' is set at 60%.
Comment 1 Jonathan Druart 2025-10-06 09:53:24 UTC
I didn't see your comment and I reached the same conclusion:

This is fixed if I remove the css changes from bug 39533

koha-tmpl/intranet-tmpl/prog/css/select2.css
.select2.select2-container.select2-container--default {
    flex-grow: 1;
    max-width: 60%;
}

fieldset.rows .select2 li {
    clear: none;
    width: unset;
}
Comment 2 Jonathan Druart 2025-10-06 09:59:27 UTC
Created attachment 187454 [details] [review]
Bug 40931: (bug 39533 follow-up) Isolate CSS changes to prevent side-effects

The changes made on bug 39533 for the export page have affected other
instance of select2.
eg. on the "place holds" view the select2 elements are too narrow.

This patch suggests to isolate the CSS changes so they will only affect
the export page.

Test plan:
Confirm that this patch does not affect the display of the select2
elements from the export page.

Confirm that the pickup locations are wider (and their values are
displayed) when placing multi holds
Comment 3 CJ Lynce 2025-10-07 20:08:50 UTC
Unfortunately this change impacts other items: for example, the item edit page has select2 boxes that now different sizes (see screenshot). This actually breaks what was fixed in bug_40897 (technically it now makes the select2 boxes shorter than the flatpickr boxes, which is opposite the original problem on that big)
Comment 4 CJ Lynce 2025-10-07 20:10:25 UTC
Created attachment 187551 [details]
Example of item edit page select2 boxes after testing patch
Comment 5 Jonathan Druart 2025-10-09 10:33:32 UTC
Created attachment 187649 [details] [review]
Bug 40931: (bug 39533 follow-up) More specific max-width CSS rule to prevent side-effects

The changes made on bug 39533 for the export page have affected other
instance of select2.
eg. on the "place holds" view the select2 elements are too narrow.

This patch suggests to reduce the elements on which the CSS rule
'max-width: 60%' is applied.

Test plan:
Confirm that this patch does not affect the display of the select2
elements on the export and item edition pages.

Confirm that the pickup locations are wider (and their values are
displayed) when placing multi holds
Comment 6 Jonathan Druart 2025-10-09 10:33:47 UTC
(In reply to CJ Lynce from comment #3)
> Unfortunately this change impacts other items: for example, the item edit
> page has select2 boxes that now different sizes (see screenshot). This
> actually breaks what was fixed in bug_40897 (technically it now makes the
> select2 boxes shorter than the flatpickr boxes, which is opposite the
> original problem on that big)

Good catch, thanks!
Comment 7 CJ Lynce 2025-10-09 22:29:07 UTC
Created attachment 187708 [details] [review]
Bug 40931: (bug 39533 follow-up) More specific max-width CSS rule to prevent side-effects

The changes made on bug 39533 for the export page have affected other
instance of select2.
eg. on the "place holds" view the select2 elements are too narrow.

This patch suggests to reduce the elements on which the CSS rule
'max-width: 60%' is applied.

Test plan:
Confirm that this patch does not affect the display of the select2
elements on the export and item edition pages.

Confirm that the pickup locations are wider (and their values are
displayed) when placing multi holds

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Comment 8 CJ Lynce 2025-10-09 22:33:26 UTC
This revised patch fixes the issue on the Multi-holds placement screen. It does not affect the select2 boxes on the item edit screen, and I checked a couple other places select2 is used, they are also unaffected.

Thank you!
Comment 9 Nick Clemens (kidclamp) 2025-10-16 18:19:42 UTC
Created attachment 188025 [details] [review]
Bug 40931: (bug 39533 follow-up) More specific max-width CSS rule to prevent side-effects

The changes made on bug 39533 for the export page have affected other
instance of select2.
eg. on the "place holds" view the select2 elements are too narrow.

This patch suggests to reduce the elements on which the CSS rule
'max-width: 60%' is applied.

Test plan:
Confirm that this patch does not affect the display of the select2
elements on the export and item edition pages.

Confirm that the pickup locations are wider (and their values are
displayed) when placing multi holds

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Lucas Gass (lukeg) 2025-10-20 16:14:27 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 11 Paul Derscheid 2025-10-29 09:10:06 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 12 Fridolin Somers 2025-11-10 15:15:28 UTC
Depends on Bug 39533 not in 24.11.x