Bug 39403

Summary: showmarc.pl confusing broken vertical align
Product: Koha Reporter: Michał <schodkowy.omegi-0r>
Component: AccessibilityAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: dcook, martin.renvoize, matt.blenkinsop, oleonard
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: The problem
After applying the fix
Inspect view of the simple MARC view in the staff interface
Inspect view of the simple MARC view in the OPAC

Description Michał 2025-03-21 01:51:35 UTC
Created attachment 179570 [details]
The problem

Just so we don't forget. The cells are vertically aligned to middle, which makes it easy to be fooled that what's above MARC field label belongs to the field above (see attachment, would you realize under 010, the second _a belongs to 024 instead?).

This affects both:
- catalogue/showmarc.pl
- koha/opac-showmarc.pl

Fix:
remove inline style on `<th style="white-space:nowrap">`
add style block:
```css
th {
    white-space: nowrap;
    vertical-align: top;
}
```

Adding borders was considered and deemed unfavorable. Reference: https://chat.koha-community.org/koha-community/pl/keqr7reqhpd49qh88tz3zr9xny
Comment 1 Michał 2025-03-21 01:52:46 UTC
Created attachment 179571 [details]
After applying the fix
Comment 2 Owen Leonard 2025-03-21 13:44:25 UTC
Created attachment 179607 [details]
Inspect view of the simple MARC view in the staff interface

I don't see this problem in the OPAC or the staff interface in main.
Comment 3 Owen Leonard 2025-03-21 13:44:49 UTC
Created attachment 179608 [details]
Inspect view of the simple MARC view in the OPAC
Comment 4 Michał 2025-03-21 15:30:26 UTC
Ah, and now I get how this bug had to emerge without anyone noticing: OPAC's plain MARC view makes an AJAX call and inserts the resulting HTML inline into the element you've shown on the right with id #plainmarc, which styles it.

The problem is: not sure about OPAC, but showmarc.pl in the staff interface in some cases is shown as a standalone page in a new tab (such as in staged records for import, if you click on the matched record link). In such case, no styling is applied.

On that note, I'm not sure why it's an AJAX call there to begin with, but that's a matter for another bug maybe (along with considering not making the three tabs in bib view separate pages to begin with either)