Bug 37581 - Use split button for label creator "new" operations
Summary: Use split button for label creator "new" operations
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 37250
Blocks:
  Show dependency treegraph
 
Reported: 2024-08-06 16:06 UTC by Owen Leonard
Modified: 2024-09-02 09:10 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Gif showing the behavior of the new buttons (106.40 KB, image/gif)
2024-08-06 16:06 UTC, Owen Leonard
Details
Bug 37581: Use split button for label creator "new" operations (10.24 KB, patch)
2024-08-07 14:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37581: Use split button for label creator "new" operations (10.30 KB, patch)
2024-08-09 15:13 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-08-06 16:06:02 UTC
Created attachment 170102 [details]
Gif showing the behavior of the new buttons

Currently the toolbar shown on label creator pages is labeled "New" with a dropdown for all the options (New batch, new layout, etc.)

I propose that we make this a split button where the default action of the button changes with the context: If you're on the "Label layouts" page for example, the button says "New label layout" and the secondary button triggers a dropdown with all the options.
Comment 1 Owen Leonard 2024-08-07 14:52:53 UTC
Created attachment 170143 [details] [review]
Bug 37581: Use split button for label creator "new" operations

This patch modifies the "New" menu in the label creator so that it is a
split button instead of a simple menu. The primary button area will now
be a direct link to creating a new entry for whatever area you are in:
batches, labels, templates, or printer profiles. The secondary menu
offers all options.

To test, apply the patch and go to Cataloging -> Labels.

- On the label creator page, you should see a split button in the
  toolbar. The text label should read "New label batch," and clicking it
  should take you directly to creation of a new label batch.
- Clicking the secondary action of the menu item, the down-arrow, should
  offer a menu of all the other "New" options.
- Confirm that the dropdown menu links all work correctly.
- Confirm that as you switch to different sections of the label creator
  the default "new" action of the toolbar button changes:
  - In label batches, "New label batch"
  - In label layouts, "New label layout"
  - In label templates, "New label template"
  - In printer profiles, "New printer profiles"
  - When you're on the "Print profile range" page, the default is "New
    label batch" because there is no "new" action for that page, and
    label batch seemed like a sensible default.

Sponsored-by: Athens County Public Libraries
Comment 2 Owen Leonard 2024-08-07 14:53:24 UTC
I think the "wrong_html_filter at line 20" warning from the QA tool is incorrect in this situation.
Comment 3 Biblibre Sandboxes 2024-08-09 15:13:52 UTC
Created attachment 170202 [details] [review]
Bug 37581: Use split button for label creator "new" operations

This patch modifies the "New" menu in the label creator so that it is a
split button instead of a simple menu. The primary button area will now
be a direct link to creating a new entry for whatever area you are in:
batches, labels, templates, or printer profiles. The secondary menu
offers all options.

To test, apply the patch and go to Cataloging -> Labels.

- On the label creator page, you should see a split button in the
  toolbar. The text label should read "New label batch," and clicking it
  should take you directly to creation of a new label batch.
- Clicking the secondary action of the menu item, the down-arrow, should
  offer a menu of all the other "New" options.
- Confirm that the dropdown menu links all work correctly.
- Confirm that as you switch to different sections of the label creator
  the default "new" action of the toolbar button changes:
  - In label batches, "New label batch"
  - In label layouts, "New label layout"
  - In label templates, "New label template"
  - In printer profiles, "New printer profiles"
  - When you're on the "Print profile range" page, the default is "New
    label batch" because there is no "new" action for that page, and
    label batch seemed like a sensible default.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Comment 4 Katrin Fischer 2024-09-02 09:10:07 UTC
There is a dependency here that is still in "Needs signoff" - moving out of queue for now. Please bring back as soon as this is resolved.