Bug 34575 - Patron search results: Add a CSS class to patron email to ease customization
Summary: Patron search results: Add a CSS class to patron email to ease customization
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Pedro Amorim
QA Contact: Victor Grousset/tuxayo
URL:
Keywords:
Depends on: 35629
Blocks:
  Show dependency treegraph
 
Reported: 2023-08-18 13:09 UTC by Sally
Modified: 2024-04-19 17:55 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Demo patron long e-mail (219.57 KB, image/png)
2023-12-21 14:55 UTC, Pedro Amorim
Details
Bug 34575: Add a CSS class to patron email (1.40 KB, patch)
2023-12-22 10:37 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34575: Add a CSS class to patron email (1.46 KB, patch)
2023-12-22 17:11 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 34575: Add a CSS class to patron email (1.52 KB, patch)
2024-03-06 20:13 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sally 2023-08-18 13:09:48 UTC
Since the staff interface redesign, the search patron results table is prone to breaking the width of the screen, causing a horizontal scrollbar to display.

The Name column displays the following content:

Patron name 
Patron address
Email address

The column is flexible, because the filter is a search.

As there are spaces in the name/address content, the column can be a very small width on smaller monitors.  

But the email address is often very long - and this causes the Name column to be very wide.

On our system, two of our own council email address domains are 30 characters in length - that's before you've added the prefix, so email addresses can easily be 50+ characters, making for a very wide column.

Is it possible to create a setting where we can choose not to include the email address in the search results?
Comment 1 Pedro Amorim 2023-12-21 14:55:05 UTC
Created attachment 160207 [details]
Demo patron long e-mail

Hi Sally, I've added an attachment with a patron in the table with an e-mail address of 50 characters.

At a glance, the table looks okay. Please note that in this screenshot I have bug 34574 applied, i.e. the issue with the library and patron categories column does not happen here.

Are you able to confirm if this still requires looking into? Or are you able to provide a new/different example?

Thank you!
Comment 2 Sally 2023-12-22 10:06:35 UTC
(In reply to Pedro Amorim from comment #1)
> Created attachment 160207 [details]
> Demo patron long e-mail
> 
> Hi Sally, I've added an attachment with a patron in the table with an e-mail
> address of 50 characters.
> 
> At a glance, the table looks okay. Please note that in this screenshot I
> have bug 34574 applied, i.e. the issue with the library and patron
> categories column does not happen here.
> 
> Are you able to confirm if this still requires looking into? Or are you able
> to provide a new/different example?
> 
> Thank you!

Hi Pedro,

It's still an issue for us.

As a simple solution, could we just add a class to email?  

For Henry in the test data, this is what's in the table:  

<div class="address">
<ul>
<li class="patronaddress1"> 4345 Library Rd. </li>
<li class="patroncity">Springfield, MA 44224</li>
<li>Email: <a href="mailto:example@test.com">example@test.com</a>
</li>
</ul>
</div>

Note that address1 and city both have classes, but email doesn't.  

If a class was added to email, as it is for the other address lines:

<div class="address">
<ul>
<li class="patronaddress1"> 4345 Library Rd. </li>
<li class="patroncity">Springfield, MA 44224</li>
<li class="patronemail">Email: <a href="mailto:example@test.com">example@test.com</a>
</li>
</ul>
</div>

Then I can just hide it with CSS - and nobody else is affected by the change?

What do you think?
Comment 3 Pedro Amorim 2023-12-22 10:37:00 UTC
Created attachment 160229 [details] [review]
Bug 34575: Add a CSS class to patron email

Adds a CSS class to the patron email section in the 'name-address' column of search results in members-home.pl
No functional behaviour change.
Comment 4 Pedro Amorim 2023-12-22 10:38:36 UTC
(In reply to Sally from comment #2)
> Hi Pedro,
> 
> It's still an issue for us.
> 
> As a simple solution, could we just add a class to email?  

I love this suggestion, submitted the patch, new HTML should now be:

<ul>
   <li class="patronaddress1">31 4345 Library Rd. </li>
   <li class="patroncity">City in address zip postal, test</li>
   <li class="patronemail">Email: <a href="mailto:randomlongemailstringtobeusedasanexample%40koha.com">randomlongemailstringtobeusedasanexample@koha.com</a></li>
</ul>

Thank you.
Comment 5 Biblibre Sandboxes 2023-12-22 17:11:35 UTC
Created attachment 160264 [details] [review]
Bug 34575: Add a CSS class to patron email

Adds a CSS class to the patron email section in the 'name-address' column of search results in members-home.pl
No functional behaviour change.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 6 Sally 2023-12-22 17:12:21 UTC
Brilliant, thanks so much, Pedro - exactly what I needed!  :)
Comment 7 Victor Grousset/tuxayo 2024-03-06 19:59:08 UTC
Tried to rename the ticket, feel free to improve if I misunderstood.
Comment 8 Victor Grousset/tuxayo 2024-03-06 20:12:30 UTC
We have classes like patron_name and patroncity. If the style is already inconsistent, let's go for the more readable one for new classes.

So patron_email. Patch amended.

Feel free to comment if that doesn't look like a good change.
Comment 9 Victor Grousset/tuxayo 2024-03-06 20:13:44 UTC
Created attachment 162854 [details] [review]
Bug 34575: Add a CSS class to patron email

Adds a CSS class to the patron email section in the 'name-address' column of search results in members-home.pl
No functional behaviour change.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 10 Victor Grousset/tuxayo 2024-03-06 20:15:50 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 11 Katrin Fischer 2024-04-19 17:55:53 UTC
Pushed for 24.05!

Well done everyone, thank you!