Bug 31813

Summary: Specify white-space: normal for spans styled as labels
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Staff interfaceAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Bug Depends on: 30952    
Bug Blocks: 31974    
Attachments: Bug 31813: Specify white-space: normal for spans styled as labels
Screenshots of manage staed MARC records - before and after
Bug 31813: Specify white-space: normal for spans styled as labels
Bug 31813: (follow-up) Add missing colon for managed staged MARC records
Bug 31813: Specify white-space: normal for spans styled as labels
Bug 31813: (follow-up) Add missing colon for managed staged MARC records

Description Katrin Fischer 2022-10-15 08:18:38 UTC
When looking at an imported MARC file details, you have on top:

 Matching rule applied No matching rule in effect
Action if matching record found: Add incoming record
Action if no match found: Add incoming record
Item processing: Always add items 

These are misaligned now. Please keep enough space here for longer translations!

Also: We are missing a colon!
Comment 1 Owen Leonard 2022-10-18 16:08:24 UTC
Created attachment 142081 [details] [review]
Bug 31813: Specify white-space: normal for spans styled as labels

This patch is necessary to override a CSS property being inherited from
Bootstrap. Allowing a <span> with the "label" class to wrap will keep
alignment correct when displaying information in the same layout as a
form.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- If necessary, stage a batch of MARC files (Cataloging -> Stage MARC
  records for import).
- Go to Cataloging -> Manage staged MARC records and click on one of the
  batches to view the details.
- In the list of information about the batch, longer labels like
  "Matching rule applied" should wrap so that they stay aligned with
  other labels in the list.
Comment 2 David Nind 2022-10-18 20:47:33 UTC
Created attachment 142099 [details]
Screenshots of manage staed MARC records - before and after

I'm not noticing any differences (see screenshots, even though they are from two different batches).

Am I looking in the right place?
Comment 3 Owen Leonard 2022-10-19 14:59:42 UTC
(In reply to David Nind from comment #2)
> Am I looking in the right place?

Sorry I see my test plan is incorrect: The problem happens when you're viewing a batch which has been staged *and* imported. Before the import those form controls are still visible. After the import they're not and you'll see the issue.
Comment 4 David Nind 2022-10-19 17:24:36 UTC
Created attachment 142196 [details] [review]
Bug 31813: Specify white-space: normal for spans styled as labels

This patch is necessary to override a CSS property being inherited from
Bootstrap. Allowing a <span> with the "label" class to wrap will keep
alignment correct when displaying information in the same layout as a
form.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- If necessary, stage a batch of MARC files (Cataloging -> Stage MARC
  records for import).
- Go to Cataloging -> Manage staged MARC records and click on one of the
  batches to view the details.
- In the list of information about the batch, longer labels like
  "Matching rule applied" should wrap so that they stay aligned with
  other labels in the list.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2022-10-19 17:24:42 UTC
Created attachment 142197 [details] [review]
Bug 31813: (follow-up) Add missing colon for managed staged MARC records

Add colon after "Matching rule applied" when viewing details for a
batch already imported.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2022-10-19 17:26:05 UTC
(In reply to Owen Leonard from comment #3)
> Sorry I see my test plan is incorrect: The problem happens when you're
> viewing a batch which has been staged *and* imported. Before the import
> those form controls are still visible. After the import they're not and
> you'll see the issue.

Thanks Owen! I can see it now.

I added a follow-up for the missing colon - happy to add to another bug if this preferred.
Comment 7 Katrin Fischer 2022-10-22 09:59:25 UTC
The wrapping is good, of course, but why do we limit the rather long labels to such a small column? It would also help with the even longer German translations to give a bit more space :)
Comment 8 Katrin Fischer 2022-10-22 10:02:42 UTC
Created attachment 142451 [details] [review]
Bug 31813: Specify white-space: normal for spans styled as labels

This patch is necessary to override a CSS property being inherited from
Bootstrap. Allowing a <span> with the "label" class to wrap will keep
alignment correct when displaying information in the same layout as a
form.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- If necessary, stage a batch of MARC files (Cataloging -> Stage MARC
  records for import).
- Go to Cataloging -> Manage staged MARC records and click on one of the
  batches to view the details.
- In the list of information about the batch, longer labels like
  "Matching rule applied" should wrap so that they stay aligned with
  other labels in the list.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2022-10-22 10:02:47 UTC
Created attachment 142452 [details] [review]
Bug 31813: (follow-up) Add missing colon for managed staged MARC records

Add colon after "Matching rule applied" when viewing details for a
batch already imported.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Tomás Cohen Arazi (tcohen) 2022-10-24 14:45:53 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!