Bug 28611 - Incorrect Select2 width
Summary: Incorrect Select2 width
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-22 09:46 UTC by Jonathan Druart
Modified: 2021-08-16 21:07 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.02,20.11.09


Attachments
Bug 28611: Fix width to 50% for additem form elements (6.31 KB, patch)
2021-06-22 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28611: Fix width to 50% for additem form elements (6.36 KB, patch)
2021-06-24 14:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28611: Fix width to 50% for additem form elements (6.43 KB, patch)
2021-07-05 20:33 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28611: Fix width to 50% for additem form elements (6.43 KB, patch)
2021-07-05 20:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Screenshot of item form pull downs in 20.11 (11.66 KB, image/png)
2021-08-06 23:53 UTC, Katrin Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-06-22 09:46:06 UTC
The width picked by Select2 is not correct, the longest option's size is used but:
 * it is sometimes split on two lines
 * the close button hides the end of the value

https://snipboard.io/v4P7HN.jpg
Comment 1 Jonathan Druart 2021-06-22 09:47:57 UTC
Created attachment 122276 [details] [review]
Bug 28611: Fix width to 50% for additem form elements

This patch suggests to set the width of select and input to 50%
Comment 2 Jonathan Druart 2021-06-22 09:49:01 UTC
With this patch applied: https://snipboard.io/rME6z3.jpg
Comment 3 Owen Leonard 2021-06-24 14:00:06 UTC
Created attachment 122390 [details] [review]
Bug 28611: Fix width to 50% for additem form elements

This patch suggests to set the width of select and input to 50%

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Katrin Fischer 2021-07-05 20:33:35 UTC
Created attachment 122591 [details] [review]
Bug 28611: Fix width to 50% for additem form elements

This patch suggests to set the width of select and input to 50%

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2021-07-05 20:38:39 UTC
Created attachment 122592 [details] [review]
Bug 28611: Fix width to 50% for additem form elements

This patch suggests to set the width of select and input to 50%

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-07-05 20:42:58 UTC
We know this is not the perfect solution, but until Select2 works better, I think this will be an improvement.
Comment 7 Jonathan Druart 2021-07-06 09:06:21 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 8 Kyle M Hall 2021-07-09 17:51:56 UTC
Pushed to 21.05.x for 21.05.02
Comment 9 Fridolin Somers 2021-08-02 20:48:59 UTC
It is a big visual change on items editor.
I propose not to impact older versions.
Comment 10 Katrin Fischer 2021-08-06 23:46:43 UTC
I understand the argument, but the visual was already changed by the newer version of select2 that made the input fields too short in many cases. I have seen library pull downs only showing like 3 letters of the branch names :(
Comment 11 Katrin Fischer 2021-08-06 23:53:48 UTC
Created attachment 123590 [details]
Screenshot of item form pull downs in 20.11

(In reply to Katrin Fischer from comment #10)
> I understand the argument, but the visual was already changed by the newer
> version of select2 that made the input fields too short in many cases. I
> have seen library pull downs only showing like 3 letters of the branch names
> :(

To explain a bit more, it means that currently you can't figure out the library actually selected, if you have some starting with the same letters.

Also the X is too close to text, so I often have it happen that when I want to open the pull down, I actually empty the field. 

The screenshot shows the problematic classification source, home branch and holding branch selects on current 20.11.6
Comment 12 Fridolin Somers 2021-08-07 07:22:14 UTC
Oh crap, a real ergonomic bug then. I backport.

The backport on 20.11 actually fails because there is on select tag the attribute size="1".
This has been removed in 21.05.x by Bug 28066.

Should we keep it or remove it ?
Comment 13 Katrin Fischer 2021-08-07 14:07:30 UTC
(In reply to Fridolin Somers from comment #12)
> Oh crap, a real ergonomic bug then. I backport.
> 
> The backport on 20.11 actually fails because there is on select tag the
> attribute size="1".
> This has been removed in 21.05.x by Bug 28066.
> 
> Should we keep it or remove it ?

I believe removing it would be ok, but leaving it in probably won't cause issues right away either.
Comment 14 Fridolin Somers 2021-08-13 19:38:10 UTC
(In reply to Katrin Fischer from comment #13)
> (In reply to Fridolin Somers from comment #12)
> > Oh crap, a real ergonomic bug then. I backport.
> > 
> > The backport on 20.11 actually fails because there is on select tag the
> > attribute size="1".
> > This has been removed in 21.05.x by Bug 28066.
> > 
> > Should we keep it or remove it ?
> 
> I believe removing it would be ok, but leaving it in probably won't cause
> issues right away either.

Ok I choose to keep it.
Thanks for your help ;)
Comment 15 Fridolin Somers 2021-08-13 19:39:34 UTC
Pushed to 20.11.x for 20.11.09
Comment 16 Victor Grousset/tuxayo 2021-08-16 21:07:35 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.