[Koha-bugs] [Bug 35908] There is no length limit for what's presented in datatables

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 26 13:42:25 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35908

--- Comment #7 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
(In reply to Anneli Österman from comment #6)
> Limiting the length of drop down menu in table would be a good enhancement.
> If the names are really long it makes the table wider and it doesn't fit in
> the screen anymore (usability).
> 
> I tested the patch and it limits the length of drop downs but it also cuts
> the name of the branch or category and adds dots to imply it continues (Name
> of the libra...). 

Yes, this is intentional in this patch. The added dots serve to convey the idea
that the text content is longer than what is being displayed.

> In the members-home page on the left there is the Search for patron section
> where the length of the drop down menu is limited but when you open it the
> name of the branch or category is shown in full. To me it looked a little
> bit better that way. See attachments (patronsearch.png and patrontable.png).
> I do not know how these two drop downs differ technically but I like the way
> Search for patrons section works.

This is a really good point. I don't see the attachments but having tested
myself I know what you're referring to.
That technique (fixed width) works well in that particular left filter because
the left filter component is of fixed width itself. This is not the case for
column headers in the datatables, for example, as pointed out by Jonathan's
comment at https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34574#c6
The same technique applied there causes the select width to become shorter than
its container. This relates to my attempts anyway, others may be more
successful than I was.

> When the branch or category is selected for a patron it also cuts the name
> with dots. Could the name be wrapped to several line instead? See attachment
> patronselected.png.

Please double-check that your picture attachments have been uploaded, I don't
see them here.

> There are lots of places in Koha where this kind of change would be nice.
> For instance 
> 
> - in memberentry.pl where you select branch and library for the patron
> - in moremember.pl where you can add message to patron and the preselected
> notice is reaaaaally long
> - in request.pl where table gets really wide if long branch name is selected 
> 
> 
> In moremember.pl and circulation.pl in holds tab and in request.pl for
> already existing hold, if the long branch name is selected for a hold, the
> drow down menu is really wide but it shrinks when shorter one is selected.
> I'm not sure how these menus should work. Maybe just cut it (without dots)
> so that the table does not get too wide and exits the screen?

Yes, the issue potentially comes up in many different places, thanks for
pointing some of them here. This is exactly what I wanted with this bug, have
some discussion about it.
My proposed solution currently is shortening the text to something I find
reasonable (first 50 characters of the string), but as I said it's just a proof
of concept, or others like returning the "shortened" content directly from the
API, would potentially fix the problem at its root (content too long) rather
than addressing each component's style throughout Koha, but I'm not against any
approach.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list