Bug 26551 - When importing a framework, the modal heading is too long and runs outside of the dialog
Summary: When importing a framework, the modal heading is too long and runs outside of...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-26 17:44 UTC by Katrin Fischer
Modified: 2020-11-17 20:31 UTC (History)
4 users (show)

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


Attachments
Bug 26551 - Issue with text display in modal window (21.09 KB, image/png)
2020-09-28 10:57 UTC, David Nind
Details
Bug 26551: Correct modal markup to prevent long heading from overflowing (18.95 KB, patch)
2020-09-28 11:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26551: Correct modal markup to prevent long heading from overflowing (19.00 KB, patch)
2020-09-28 20:30 UTC, David Nind
Details | Diff | Splinter Review
Bug 26551: Correct modal markup to prevent long heading from overflowing (19.05 KB, patch)
2020-10-05 15:20 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 Katrin Fischer 2020-09-26 17:44:50 UTC
When importing a framework, the modal dialog is too small for the heading... or the heading too long for the modal?

Example:

Import CF framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)
Comment 1 David Nind 2020-09-28 10:57:49 UTC
Created attachment 110847 [details]
Bug 26551 - Issue with text display in modal window

I also noticed this - have added a screenshot as an example.

The text in the modal window does not wrap around. Instead, it continues outside the modal window in a straight line.

To replicate:
1. Go to Koha administration > Catalog > MARC bibliographic framework.
2. For any framework select Actions > Import.
3. Note that the text in modal window is not wrapped around and instead continues in a straight line.

Evident on master on Ubuntu 18.04 desktop on the latest Firefox, Chromium and Google Chrome browsers.

Also on 20.05.x.

The text/modal window displays correctly in 19.11.x.
Comment 2 Owen Leonard 2020-09-28 11:58:45 UTC Comment hidden (obsolete)
Comment 3 David Nind 2020-09-28 20:30:11 UTC
Created attachment 110885 [details] [review]
Bug 26551: Correct modal markup to prevent long heading from overflowing

This patch modifies the markup of the MARC framework import and export
modals so that CSS intended only for Bootstrap buttons isn't applied to
content in the modal.

The modal dialog markup was nested inside a ".btn-group" <div>, which
carries with it CSS that prevents text wrapping. Moving the modal markup
out of the button group while keeping it inside the <td> corrects the
problem. Lines have only been shifted and reindented.

To test, apply the patch and go to Administration -> MARC bibliographic
framework.

- In the table of frameworks, from the "Actions" menu, test both
  the "Import" and "Export" links. Both should work as expected.
- Confirm that the text of the heading on the "Import" modal wraps
  correctly.
- Test the same operations for a framework other than the default one.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Martin Renvoize 2020-10-05 15:20:17 UTC
Created attachment 111244 [details] [review]
Bug 26551: Correct modal markup to prevent long heading from overflowing

This patch modifies the markup of the MARC framework import and export
modals so that CSS intended only for Bootstrap buttons isn't applied to
content in the modal.

The modal dialog markup was nested inside a ".btn-group" <div>, which
carries with it CSS that prevents text wrapping. Moving the modal markup
out of the button group while keeping it inside the <td> corrects the
problem. Lines have only been shifted and reindented.

To test, apply the patch and go to Administration -> MARC bibliographic
framework.

- In the table of frameworks, from the "Actions" menu, test both
  the "Import" and "Export" links. Both should work as expected.
- Confirm that the text of the heading on the "Import" modal wraps
  correctly.
- Test the same operations for a framework other than the default one.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2020-10-05 15:20:54 UTC
Wrapping now works as expected and no regressions were found.

Passing QA
Comment 6 Jonathan Druart 2020-10-08 09:38:15 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass 2020-11-09 18:39:26 UTC
backported to 20.05.x for 20.05.06
Comment 8 Aleisha Amohia 2020-11-17 03:25:47 UTC
enhancement, not backported to 19.11.x