Bug 27827 - Authority type input field for new authority types should be wider
Summary: Authority type input field for new authority types should be wider
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Andreas Roussos
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-02 03:09 UTC by Andreas Roussos
Modified: 2021-05-24 16:56 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12


Attachments
The 'Authority type:' input field is too narrow (3.49 KB, image/png)
2021-03-02 03:09 UTC, Andreas Roussos
Details
Bug 27827: make the 'Authority type:' input field wider (1.90 KB, patch)
2021-03-02 03:22 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 27827: make the 'Authority type:' input field wider (1.95 KB, patch)
2021-03-02 08:43 UTC, Peter Vashchuk
Details | Diff | Splinter Review
Bug 27827: (follow-up) add a hint for clarification (1.66 KB, patch)
2021-03-24 13:08 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 27827: make the 'Authority type:' input field wider (2.00 KB, patch)
2021-04-02 10:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 27827: (follow-up) add a hint for clarification (1.71 KB, patch)
2021-04-02 10:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 27827: make the 'Authority type:' input field wider (2.06 KB, patch)
2021-04-16 14:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27827: (follow-up) add a hint for clarification (1.78 KB, patch)
2021-04-16 14:07 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Roussos 2021-03-02 03:09:04 UTC
Created attachment 117470 [details]
The 'Authority type:' input field is too narrow

When adding a new authority type in the Staff client, the 'Authority type'
input field is too narrow. If you enter something like "OOP_CORPUS" inside
the textbox, you will have to scroll right and left inside the textbox in
order to view its contents (please see the attached screenshot).

This, IMHO, is a nuisance, so I'm choosing a Severity of 'minor' for this
bug ("The component mostly works, but causes some irritation to users.").

I suggest we increase the 'size' property of the HTML input element from
10 to 20 in order to make it twice as wide (thus allowing even the widest
of entries to be displayed in their entirety without any scrolling) while
the 'maxlength' property will remain at its current value of 10 since the
max. number of characters allowed for an authtype in the database is 10.
Comment 1 Andreas Roussos 2021-03-02 03:22:13 UTC Comment hidden (obsolete)
Comment 2 Peter Vashchuk 2021-03-02 08:43:05 UTC
Created attachment 117474 [details] [review]
Bug 27827: make the 'Authority type:' input field wider

When adding a new authority type in the Staff client, the 'Authority type'
input field is too narrow. If you enter something like "OOP_CORPUS" inside
the textbox, you will have to scroll right and left inside the textbox in
order to view its contents.

This patch fixes that.

Test plan:
1) Try to add a new authority type with name "OOP_CORPUS". Notice how
   the input field is too narrow and cannot contain the entire string.
2) Apply this patch.
3) Repeat step 1), this time the input field has been widened and can
   accommodate the entire string.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Comment 3 Katrin Fischer 2021-03-07 12:56:38 UTC
For me the 10 character strings fits exactly into the input box. Could there be a difference in how different browsers and browser settings influence this?

I am not sure we have a guideline about this kind of thing, but it seems also confusing to have a much longer field that stops you from entering more than 10 characters.

Adding Owen to see if there is a general guideline we could follow here.
Comment 4 Owen Leonard 2021-03-15 18:57:30 UTC
Testing with Firefox on macOS I see exactly what is in the screeshot. I think it's a problem especially when using all capital letters. I'm inclined to go with the proposed solution. I think the confusion about the max length could be mitigated by a hint: <div class="hint">10 characters maximum</div>
Comment 5 Katrin Fischer 2021-03-16 22:12:27 UTC
Interesting! Using Firefox on Linux, but it looked quite different. I am fine with Owen's suggestion. Could you add the hint?
Comment 6 Andreas Roussos 2021-03-22 08:29:41 UTC
Thank you both Katrin and Owen for your feedback.
I'll add a follow-up patch for the hint ASAP.
Comment 7 Andreas Roussos 2021-03-24 13:08:47 UTC
Created attachment 118741 [details] [review]
Bug 27827: (follow-up) add a hint for clarification

When adding a new authority type, there is no indication of how big
the authority type code can be (auth_types.authtypecode in the DB has
a maximum length of 10 characters).

This patch fixes that.

To test, apply the patch and notice the hint appearing right above the
"Authority type:" text box as you add a new authority type: it should
display "10 characters maximum" in grey colour.
Comment 8 David Nind 2021-04-02 10:43:19 UTC
Created attachment 119115 [details] [review]
Bug 27827: make the 'Authority type:' input field wider

When adding a new authority type in the Staff client, the 'Authority type'
input field is too narrow. If you enter something like "OOP_CORPUS" inside
the textbox, you will have to scroll right and left inside the textbox in
order to view its contents.

This patch fixes that.

Test plan:
1) Try to add a new authority type with name "OOP_CORPUS". Notice how
   the input field is too narrow and cannot contain the entire string.
2) Apply this patch.
3) Repeat step 1), this time the input field has been widened and can
   accommodate the entire string.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2021-04-02 10:43:23 UTC
Created attachment 119116 [details] [review]
Bug 27827: (follow-up) add a hint for clarification

When adding a new authority type, there is no indication of how big
the authority type code can be (auth_types.authtypecode in the DB has
a maximum length of 10 characters).

This patch fixes that.

To test, apply the patch and notice the hint appearing right above the
"Authority type:" text box as you add a new authority type: it should
display "10 characters maximum" in grey colour.

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 Martin Renvoize 2021-04-16 14:07:45 UTC
Created attachment 119746 [details] [review]
Bug 27827: make the 'Authority type:' input field wider

When adding a new authority type in the Staff client, the 'Authority type'
input field is too narrow. If you enter something like "OOP_CORPUS" inside
the textbox, you will have to scroll right and left inside the textbox in
order to view its contents.

This patch fixes that.

Test plan:
1) Try to add a new authority type with name "OOP_CORPUS". Notice how
   the input field is too narrow and cannot contain the entire string.
2) Apply this patch.
3) Repeat step 1), this time the input field has been widened and can
   accommodate the entire string.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2021-04-16 14:07:48 UTC
Created attachment 119747 [details] [review]
Bug 27827: (follow-up) add a hint for clarification

When adding a new authority type, there is no indication of how big
the authority type code can be (auth_types.authtypecode in the DB has
a maximum length of 10 characters).

This patch fixes that.

To test, apply the patch and notice the hint appearing right above the
"Authority type:" text box as you add a new authority type: it should
display "10 characters maximum" in grey colour.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Jonathan Druart 2021-04-16 14:31:23 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 13 Fridolin Somers 2021-04-29 09:28:42 UTC
Pushed to 20.11.x for 20.11.06
Comment 14 Andrew Fuerste-Henry 2021-05-24 15:17:51 UTC
Pushed to 20.05.x for 20.05.12
Comment 15 Victor Grousset/tuxayo 2021-05-24 16:56:28 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.