Bug 26551

Summary: When importing a framework, the modal heading is too long and runs outside of the dialog
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: aleisha, david, lucas, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
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
Bug 26551: Correct modal markup to prevent long heading from overflowing
Bug 26551: Correct modal markup to prevent long heading from overflowing
Bug 26551: Correct modal markup to prevent long heading from overflowing

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