Bug 33177

Summary: Use include file for subfield constraints in both authority and bibliographic frameworks
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt
Version: Main   
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:
Circulation function:
Attachments: Bug 33177: Use include file for subfield constraints in both authority and bibliographic frameworks
Screenshots - before and after + issues

Description Owen Leonard 2023-03-09 11:57:25 UTC
The subfield entry forms for authority types and MARC bibliographic frameworks are almost the same, and with a little bit of conditional logic both could use the same template
Comment 1 Owen Leonard 2023-03-09 12:17:29 UTC Comment hidden (obsolete)
Comment 2 David Nind 2023-04-25 11:55:06 UTC
Created attachment 150189 [details]
Screenshots - before and after + issues

I've had a go at testing this change - which I think is a great idea!

Things work as expected, however I have noted some layout and consistency things - which is why I have Failed QA.

The document attached includes screenshots for the potential issues identified.

Subfield editor - alignment of tabs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are on subfield 0:
- the rest of the subfield tags align on the second row under the second subfield tag
- this works fine for the second row of subfield tags
- however, the third row is aligned under the first tab

If you are on another subfield tag, the second row of tabs is aligned after that one, and then the third row is aligned under the first tab.

See screenshot document - section 3.

Subfield editor - spacing and layout directly under the tabs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bibliographic subfield: no space - just white background (I'm not sure whether there should be a space after the subfield tabs).

Authority subfield: from basic constraints downwards, everything is indented - that is, not aligned with the first subfield tab.

See screenshot documents - sections 1 and 2 (after screenshots).

Subfield editor - spacing and layout for the sections
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bibliographic subfield: no spacing between sections (Basic constraints, Advanced constraints, Other options (Choose one)).

Authority subfield: spacing between sections - that is, each section has its own white background.

See screenshot documents - sections 1 and 2 (after screenshots).

Link vs Koha link
~~~~~~~~~~~~~~~~~

I don't know enough about these fields and find it confusing:
- Bibliographic subfield: 
  . before patch, has Link field (An index name, e.g. title or LocalNumber) and a dropdown list Koha link with no selectable options
  . after patch, just has Link
- Authorities:
  . before patch has Koha field and a populated dropdown list
  . after patch has Koha link and a populated dropdown list

See screenshot documents - sections 1 and 2 (before and after screenshots).

Other things noticed
~~~~~~~~~~~~~~~~~~~~

These may be out of scope for this bug, but addressing these would improve consistency.

Constraint column when listing subfields
----------------------------------------

The table becomes very wide when there are a lot of constraints, for an example see 100$a for BKS bibliographic framework (note that this was the case before the patch was applied).

See screenshot documents - section 4.

Action menu for subfields
-------------------------

Maybe these should be worded the same?

- Bibliographic:
  . Edit tag
  . View subfields
  . Edit subfields
  . Delete
- Authority:
  . Subfields
  . Edit
  . Delete

See screenshot document - section 5.

Label names when modifying a tag
--------------------------------

Maybe these should be the same as used for the subfield editor (see screenshot document - section 1 and 2).

Bibliographic:
- Label for lib: should this be "Text for librarian"?
- Label for opac: should this be "Text for OPAC"?
- Authorized value: hint text is straight after the dropdown list, maybe it should be under the input field - like it is for authorities.

Authority:
- Text for librarians: should this be "Text for librarian"?
- Text for opac: should this be "Text for OPAC"?

See screenshot document - section 6.

List of tags
------------

Table listing - tag column:
- For authorities: tag is bold in each row
- For bibliographic: tag is not bold in each row

(No screenshot.)
Comment 3 Owen Leonard 2023-06-23 19:16:08 UTC
I'm finally giving this one another try.

(In reply to David Nind from comment #2)
> If you are on another subfield tag, the second row of tabs is aligned after
> that one, and then the third row is aligned under the first tab.

I don't think this is a consequence of my patch. In my tests the tabs wrap the same with my patch or without.

Several of the comments about spacing an indentation I don't see. 

I'm revising the patch to make some corrections to the way the template handles differences between authority form fields and biblio form fields.