Bug 35554

Summary: Authority search popup is only 700px
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: CatalogingAssignee: Fridolin Somers <fridolin.somers>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: anneli.osterman, barbara.petritsch, lucas, m.de.rooy, pedro.amorim, phan-tung.bui
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36143
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.04,23.05.10
Circulation function:
Attachments: Bug 35554: Authority search popup width 800px
Bug 35554: Authority search popup width 800px
Screenshot with patch
Bug 35554: Authority search popup width 800px
Bug 35554: Authority search popup width 800px

Description Fridolin Somers 2023-12-12 19:56:17 UTC
Authority search popup is only 700 pixels width.
Most popups use 800 pixels, like the z3950 one :

 > git grep 'width=' koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt:        window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes');
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt:            window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber | html %]"+strQuery,"z3950search",'width=800,height=550,location=yes,toolbar=no,scrollbars=yes,resize=yes');
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt:                window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber | html %]"+strQuery,"z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt:            window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber | html %]"+strQuery,"z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
Comment 1 Fridolin Somers 2023-12-12 19:59:57 UTC
Created attachment 159778 [details] [review]
Bug 35554: Authority search popup width 800px

Authority search popup is only 700 pixels width.
Most popups use 800 pixels, like the z3950 one.

Test plan :
1) Edit a biblio record
2) Click on value builder in a field linked to authority (ie 700)
3) Check popup is 800 pixels wide
Comment 2 Barbara Petritsch 2023-12-14 10:59:28 UTC
After Applying the patch the value still doesn't change in the pop up window/Value builder of the field 700 a . Please can I get more instructions or if I did everything right the patch might not work.
Comment 3 Anneli Österman 2023-12-15 12:22:07 UTC
I had the same test results as Barbara in PTFS Europe's sandbox. Pop up doesn't get any wider.
Comment 4 Fridolin Somers 2024-01-08 15:50:49 UTC
Created attachment 160640 [details] [review]
Bug 35554: Authority search popup width 800px

Authority search popup is only 700 pixels width.
Most popups use 800 pixels, like the z3950 one.

Test plan :
1) Edit a biblio record
2) Click on value builder in a field linked to authority (ie 700)
3) Check popup is 800 pixels wide
4) Same with advanced editor
Comment 5 Fridolin Somers 2024-01-08 15:51:54 UTC
(In reply to Anneli Österman from comment #3)
> I had the same test results as Barbara in PTFS Europe's sandbox. Pop up
> doesn't get any wider.

Indeed ^^

Code to impact is in JS file, basic and advanced editors.
Comment 6 Matthias Le Gac 2024-01-08 20:32:26 UTC
Failed QA

The authority search popup remains at a width of 700 pixels after the patch is applied.
Comment 7 Phan Tung Bui 2024-01-08 20:54:44 UTC
Failed QA
The width of the popup remains 700px
Comment 8 Fridolin Somers 2024-01-25 09:56:14 UTC
Created attachment 161387 [details]
Screenshot with patch

Here is how I see it with patch
Firefox inspector with mouse on body shows the size at top of the page
Comment 9 Fridolin Somers 2024-01-25 09:57:33 UTC
(In reply to Matthias Le Gac from comment #6)
> Failed QA
> 
> The authority search popup remains at a width of 700 pixels after the patch
> is applied.

(In reply to Phan Tung Bui from comment #7)
> Failed QA
> The width of the popup remains 700px

Since this is a change in a javascript file, can you try clearing cache after applying patch (Ctrl+F5) ?

Can you also try building koha-testing-docker with the patch ?
Comment 10 PTFS Europe Sandboxes 2024-02-20 14:15:57 UTC
Created attachment 162295 [details] [review]
Bug 35554: Authority search popup width 800px

Authority search popup is only 700 pixels width.
Most popups use 800 pixels, like the z3950 one.

Test plan :
1) Edit a biblio record
2) Click on value builder in a field linked to authority (ie 700)
3) Check popup is 800 pixels wide
4) Same with advanced editor

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 11 Pedro Amorim 2024-02-20 16:04:07 UTC
git grep 'width=1000,height' | wc -l
35
git grep 'width=800,height' | wc -l
15
git grep 'width=700,height' | wc -l
27

I'm not sure about "most popups use 800 pixels", it seems there's no consistency whatsoever.
I don't wish to block this bug but could we perhaps consider this opportunity to standardize these pop-up sizes across the code-base? In a different bug perhaps.
Comment 12 Fridolin Somers 2024-02-21 12:56:29 UTC
Sure.

Maybe define at least 2 standard sizes for example small/large.
Size may depend on the content.
Comment 13 Pedro Amorim 2024-02-21 13:07:48 UTC
Created attachment 162317 [details] [review]
Bug 35554: Authority search popup width 800px

Authority search popup is only 700 pixels width.
Most popups use 800 pixels, like the z3950 one.

Test plan :
1) Edit a biblio record
2) Click on value builder in a field linked to authority (ie 700)
3) Check popup is 800 pixels wide
4) Same with advanced editor

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 14 Katrin Fischer 2024-03-07 14:04:08 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 15 Fridolin Somers 2024-03-11 09:39:45 UTC
Pushed to 23.11.x for 23.11.04
Comment 16 Lucas Gass (lukeg) 2024-03-19 15:26:52 UTC
Backported to 23.05.x for upcoming 23.05.10