https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36588

--- Comment #8 from Lisette Scheer <[email protected]> ---
Created attachment 211802
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211802&action=edit
Bug 36588: (follow-up) List hash keys and plugin content, and filter the fields

This follow-up improves the field picker:

- Variables passed as hashes now list their keys, and their loops, when
  they are known: SR_SLIP's branch (code email name phone items log),
  DUE/PREDUE's checkout and DUEDGST/PREDUEDGST's checkouts (the columns
  of biblio, items and issues). The registry describes them with 'keys'
  and/or 'tables' (read through Variables->keys_of).
- Content added by plugins with the notices_content hook is offered as
  plugin_content.<namespace>, with one group per enabled plugin.
- A filter above the list of fields narrows it as you type (Escape
  clears it, Enter doesn't submit the notice).

The choice of syntax ("Insert as:") is labelled as a group of radio
buttons for screen readers.

The list of fields and the message body share the width of their
template instead of having fixed widths (the message body was 80
columns wide), so that they stay within it whatever the width of the
screen: it overflowed on screens narrower than about 1650 pixels, more
so with the long names of the Template Toolkit examples. The list takes
about a third of the width, and names longer than that are shown in
full on hover; the message body takes the rest. The "Insert as:"
choices wrap.

Test plan:
1. Apply the patch, run yarn build and restart_all
2. Edit the SR_SLIP notice (Circulation)
3. In the insert box, the branch group lists branch.code, branch.name,
   branch.email... and a loop over branch.items
4. Edit DUEDGST: the checkouts loop lists the biblio, items and issues
   columns
5. Install the example plugin attached to bug 44117
   (notice-content-example.kpz), which adds content to HOLD notices: in
   Administration > Manage plugins, click "Upload plugin" and upload it.
   Edit HOLD (Holds): a plugin_content.example group is listed
6. Type "title" in the filter: only matching fields (and their group
   headings) remain. Escape clears the filter; Enter doesn't submit
7. prove t/db_dependent/Koha/Notice/Template/Variables.t
8. yarn cypress run --spec
t/cypress/integration/Tools/NoticeFieldFilter_spec.ts
9. With a screen reader, or the browser's accessibility inspector, check
   that the "Insert as:" radio buttons are announced as a group named
   "Insert as:"
10. Edit the CHECKOUT notice, open the Email template and make the
   browser window narrower and wider:
   => The list of fields and the message body stay within the template,
      and both get wider as the window does
   => Hovering a long field name shows it in full

Co-Authored-By: Claude Opus 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to