Bug 39403 - showmarc.pl confusing broken vertical align
Summary: showmarc.pl confusing broken vertical align
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-21 01:51 UTC by Michał
Modified: 2025-03-21 15:30 UTC (History)
4 users (show)

See Also:
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 (58.66 KB, image/png)
2025-03-21 01:51 UTC, Michał
Details
After applying the fix (8.44 KB, image/png)
2025-03-21 01:52 UTC, Michał
Details
Inspect view of the simple MARC view in the staff interface (283.15 KB, image/png)
2025-03-21 13:44 UTC, Owen Leonard
Details
Inspect view of the simple MARC view in the OPAC (265.89 KB, image/png)
2025-03-21 13:44 UTC, Owen Leonard
Details

Note You need to log in before you can comment on or make changes to this bug.
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)