In the ERM module (and admittedly some other parts of Koha) we redirect the user to the full list of records after a change to a record is saved. This means they need to search again to check the changes and seems counter intuitive. For us it would seem more intuitive to redirect the user to a "view" of the data instead. An example: 1. Add an agreement to the ERM module 2. Confirm: when you save you are redirected to the list of agreements https://staff.next.bsz-bw.de/cgi-bin/koha/erm/agreements 3. Edit the agreement, make a litle change and save again 4. Confirm: you are redirected to the list of agreements again Our suggestion would be to redirect to the view of the agreement on saving: https://staff.next.bsz-bw.de/cgi-bin/koha/erm/agreements/1
Further testing revealed: Editing data providers works like this already, so we have a "mixed" situation.
This is an interesting topic. Other software applications sometimes use 2 different buttons for these actions. Like a 'Save' button that saves the record and redirects to the full list, and an 'Apply' button that saves the record and reloads the same form. Personally, I feel like the above use case is not 100% clear on what each button does exactly, before clicking, but just sharing how other software apps handle this. Alternatively, we could have: 1) 'Save' // redirects to table list 2) 'Save and continue editing' // stays in form 3) 'Save and show %resource_name%' // redirects to 'show' page (if exists) With 2 and 3 perhaps being expandable option buttons? The above are just my brainstorming ideas. I really don't think we should set for one or the other behavior only, as inevitably someone will advocate for why the other way is preferable.
(In reply to Pedro Amorim from comment #2) > Alternatively, we could have: > 1) 'Save' // redirects to table list > 2) 'Save and continue editing' // stays in form > 3) 'Save and show %resource_name%' // redirects to 'show' page (if exists) > > With 2 and 3 perhaps being expandable option buttons? The expandable option buttons could be annoying as it requires multiple clicks when we don't want the default option, but maybe this can be mitigated by having the default option controlled by a user setting, or maybe save & reuse the last option used, ... But if we had to choose a fixed default, I'd choose 'save and show'. From the 'show' page you should be able to go in 1 click to either the list (breadcrumbs) or the edit form (toolbar button).
Perhaps I should add that this request comes from our colleagues who work with the ERM module on a daily basis. So this bug is based on user feedback. I think for consistency of a product it should be standardized in all modules what happens when you save a record. In most soft product I know you are redirected to a "view record" page. And also in Koha this is the majority in most modules: - catalog (edit biblio record) - patrons (edit borrower record) - serials (edit subscription) - course reserves (edit course) - acquisition (edit basket) - authorities (edit authority) I absolutley agree with Julien regarding the expandable option button if there is no setting (user or instance) to define the default behavior. > The expandable option buttons could be annoying as it requires multiple clicks when we don't want the default option, but maybe this can be mitigated by having the default option controlled by a user setting, or maybe save & reuse the last option used, ...
+1 for the default being "Save and show" Usually on the edit forms we only have 2 options: Save, cancel Maybe having a third button would still be reasonable here.
+1 for 'Save and show' as a default
Specification for this could be as follows: 1) Implement this for forms at the VueJS architecture level (which includes ERM) 2) Each resource form will have a navigationOnFormSave setting which will allow developers to set A) goToShow B) stayInForm C) goToList 3) The ‘Submit’ form button will adopt the behavior picked above. 4) Rename ‘Submit’ to ‘Save’ when editing (Currently shows ‘Submit’ for both creating and editing a resource) 5) Implement as a dropdown button (like the save button when editing a bib record). The default option of 'Save' showing and this would be the behaviour if you just pressed it. The other two options would appear if you clicked the dropdown arrow.
Created attachment 188107 [details] [review] Bug 40191: Allow customising the navigation behaviour of the form submit button
Created attachment 188108 [details] [review] Bug 40191: Update all resource components
Created attachment 188109 [details] [review] Bug 40191: Add dropdown buttons for the other navigation options Test plan: 1) Enable ERM and navigate to the agreements form 2) At the bottom, there should now be a button for "Submit" and a dropdown with two options - Submit and continue editing - Submit and return to list 3) Fill out the form three times, testing a different button each time 4) Click to edit one of your agreements 5) The buttons should operate the same but now they will start with 'Submit' instead of 'Save' 6) Navigate to licenses - for the purposes of testing the DO NOT PUSH commit has set this to have the behaviour where it returns to the list on save 7) On the form, the list option should be gone from the dropdowns and replaced by "Submit and show" 8) The buttons should all operate as described 9) Navigate to packages - for the purposes of testing they have been set to default to staying on the form when saving 10) The option to continue editing should be gone, replaced with the option to return to the list 11) The buttons should work as described Sponsored-by: Karlsruhe Institute of Technology (KIT)
Cypress tests to follow next week but the functionality is ready for testing
Is there a reason for using ‘submit’ rather than ‘save’ as I had suggested in the spec? I would be interested in what others think in terms of submit vs save - whether submit is used more widely in Koha than save.
I think "Save" is the common term used in Koha.
Created attachment 188137 [details] [review] Bug 40191: Allow customising the navigation behaviour of the form submit button Signed-off-by: Michaela <michaela.sieber@kit.edu>
Created attachment 188138 [details] [review] Bug 40191: Update all resource components Signed-off-by: Michaela <michaela.sieber@kit.edu>
Created attachment 188139 [details] [review] Bug 40191: Add dropdown buttons for the other navigation options Test plan: 1) Enable ERM and navigate to the agreements form 2) At the bottom, there should now be a button for "Submit" and a dropdown with two options - Submit and continue editing - Submit and return to list 3) Fill out the form three times, testing a different button each time 4) Click to edit one of your agreements 5) The buttons should operate the same but now they will start with 'Submit' instead of 'Save' 6) Navigate to licenses - for the purposes of testing the DO NOT PUSH commit has set this to have the behaviour where it returns to the list on save 7) On the form, the list option should be gone from the dropdowns and replaced by "Submit and show" 8) The buttons should all operate as described 9) Navigate to packages - for the purposes of testing they have been set to default to staying on the form when saving 10) The option to continue editing should be gone, replaced with the option to return to the list 11) The buttons should work as described Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed off because functional requirements are fulfilled. Please rename the button "Submit" to "Save" as Andrew and Katrin proposed. As long as you are adding a new record the button is labeled "Submit", after saving it is labeled "save"
I just tested: 1) Enable ERM and navigate to the agreements form 2) At the bottom, there should now be a button for "Submit" and a dropdown with two options - Submit and continue editing - Submit and return to list 3) Fill out the form three times, testing a different button each time 4) Click to edit one of your agreements 5) The buttons should operate the same but now they will start with 'Submit' instead of 'Save' 6) Navigate to licenses - for the purposes of testing the DO NOT PUSH commit has set this to have the behaviour where it returns to the list on save 7) On the form, the list option should be gone from the dropdowns and replaced by "Submit and show" 8) The buttons should all operate as described 9) Navigate to packages - for the purposes of testing they have been set to default to staying on the form when saving 10) The option to continue editing should be gone, replaced with the option to return to the list 11) The buttons should work as described In all 3 scenarios: 1 - agreements, 6 - licenses and 9 - packages, the behavior of the submit/save button was the same: - default: submit/save (and show) - submit/save and continue editing - submit/save and return to list Although all three options in all 3 scenarios worked as expected, I thought they should act differently according to the test plan. I would prefer both times "Save" over "Submit" and then "Save"
Created attachment 188164 [details] [review] Bug 40191: DO NOT PUSH: Set demo parameters for licenses and packages
Sorry Jan, forgot to attach the demo commit setting the different options on licenses and packages - it should work to the test plan now. I think the "Submit" v "Save" is my misunderstanding of the spec, I'll add a follow-up re-setting it to just be Save
Created attachment 188165 [details] [review] Bug 40191: Replace 'Submit' with 'Save'
Created attachment 188167 [details] [review] Bug 40191: Add the new functionality to the sticky toolbar
Created attachment 188193 [details] [review] Bug 40191: Allow customising the navigation behaviour of the form submit button Signed-off-by: Michaela <michaela.sieber@kit.edu> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Created attachment 188194 [details] [review] Bug 40191: Update all resource components Signed-off-by: Michaela <michaela.sieber@kit.edu> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Created attachment 188195 [details] [review] Bug 40191: Add dropdown buttons for the other navigation options Test plan: 1) Enable ERM and navigate to the agreements form 2) At the bottom, there should now be a button for "Submit" and a dropdown with two options - Submit and continue editing - Submit and return to list 3) Fill out the form three times, testing a different button each time 4) Click to edit one of your agreements 5) The buttons should operate the same but now they will start with 'Submit' instead of 'Save' 6) Navigate to licenses - for the purposes of testing the DO NOT PUSH commit has set this to have the behaviour where it returns to the list on save 7) On the form, the list option should be gone from the dropdowns and replaced by "Submit and show" 8) The buttons should all operate as described 9) Navigate to packages - for the purposes of testing they have been set to default to staying on the form when saving 10) The option to continue editing should be gone, replaced with the option to return to the list 11) The buttons should work as described Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Michaela <michaela.sieber@kit.edu> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Created attachment 188196 [details] [review] Bug 40191: DO NOT PUSH: Set demo parameters for licenses and packages Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Created attachment 188197 [details] [review] Bug 40191: Replace 'Submit' with 'Save' Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Created attachment 188198 [details] [review] Bug 40191: Add the new functionality to the sticky toolbar Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Created attachment 188201 [details] [review] Bug 40191: Update existing cypress tests to account for the new functionality
Created attachment 188202 [details] [review] Bug 40191: Add a cypress test for the new functionality
Created attachment 188203 [details] [review] Bug 40191: Account for no show component being set in Record Sources
Created attachment 188768 [details] [review] Bug 40191: Add configurable post-save navigation for Vue resource forms This patch introduces a new navigation behavior system for resource forms, allowing each resource type to define its default post-save action (stay on form, show detail, or return to list). Changes: - Add `on_save_navigation` prop to ResourceFormSave component - Extend base-resource composable with navigation configuration - Implement navigation logic in ButtonSubmit component - Apply to AgreementResource as initial implementation This provides a more flexible UX by letting different resource types have appropriate default behaviors while maintaining consistent patterns. Signed-off-by: Michaela <michaela.sieber@kit.edu> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188769 [details] [review] Bug 40191: Apply configurable post-save navigation to all resource forms Extends the navigation behavior system to all Vue resource components: - EHoldings packages and titles (ERM) - Licenses (ERM) - Record sources (Admin) - Preservation trains - Vendors - SkeletonResource template Each resource can now define its preferred post-save behavior via the on_save_navigation prop. Signed-off-by: Michaela <michaela.sieber@kit.edu> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188770 [details] [review] Bug 40191: Add split button UI for alternative post-save navigation Introduces a split button pattern allowing users to override the default post-save behavior: - Primary button executes default action - Dropdown menu provides alternative navigation options - Adapts menu options based on resource configuration Components modified: - New DropdownButtons component for split button UI - Updated ButtonSubmit to support dropdown actions - Extended ResourceFormSave with action handlers - Applied to VendorResource and ToolbarButton The UI adapts based on resource configuration: - "show" default: offers "continue editing" and "return to list" - "edit" default: offers "show" and "return to list" - "list" default: offers "show" and "continue editing" Test plan: 1) Enable ERM and navigate to the agreements form 2) At the bottom, there should now be a button for "Submit" and a dropdown with two options - Submit and continue editing - Submit and return to list 3) Fill out the form three times, testing a different button each time 4) Click to edit one of your agreements 5) The buttons should operate the same but now they will start with 'Submit' instead of 'Save' 6) Navigate to licenses - for the purposes of testing the DO NOT PUSH commit has set this to have the behaviour where it returns to the list on save 7) On the form, the list option should be gone from the dropdowns and replaced by "Submit and show" 8) The buttons should all operate as described 9) Navigate to packages - for the purposes of testing they have been set to default to staying on the form when saving 10) The option to continue editing should be gone, replaced with the option to return to the list 11) The buttons should work as described Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Michaela <michaela.sieber@kit.edu> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188771 [details] [review] Bug 40191: DO NOT PUSH - Demo configuration for testing navigation behaviors Sets different default navigation behaviors for testing: - Licenses: default to "list" (return to list view) - Packages: default to "edit" (stay on form) This demonstrates how different resource types can have different defaults. Not for production - testing only. Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188772 [details] [review] Bug 40191: Change button text from 'Submit' to 'Save' for clarity Updates ResourceFormSave component button labels: - "Submit" → "Save" (more intuitive for editing forms) - "Submit and [action]" → "Save and [action]" Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188773 [details] [review] Bug 40191: Extend split button navigation to sticky toolbar Adds the same split button navigation options to the sticky toolbar that appears when scrolling resource forms, ensuring consistent functionality regardless of scroll position. Components modified: - Toolbar.vue: Support for dropdown button actions - ResourceFormSave.vue: Emit navigation events for toolbar - VendorResource.vue: Wire up toolbar navigation handlers Maintains UX consistency between main form buttons and sticky toolbar. Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188774 [details] [review] Bug 40191: Update Cypress tests for split button navigation changes Updates existing test selectors and assertions to work with the new split button UI pattern: - Admin/RecordSources_spec.ts: Update button selectors - ERM tests (Agreements, Licenses, Packages, Titles, Dialog): Update form save expectations - InfiniteScrollSelect_spec.ts: Update interaction patterns - Preservation/Trains.ts: Update save button selectors Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188775 [details] [review] Bug 40191: Add Cypress test coverage for split button navigation Adds E2E test in VueFramework_spec.ts verifying: - Split button renders with correct options - Primary action executes default navigation - Dropdown options execute alternative navigation behaviors - Behavior adapts correctly based on resource configuration Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188776 [details] [review] Bug 40191: Handle resources without detail view in navigation options Fixes an edge case where resources without a dedicated show/detail component (like Record Sources) would show invalid navigation options. - ResourceFormSave: Filter out "show" option when no_show is true - RecordSourcesResource: Set no_show flag to hide inappropriate options Ensures the split button menu only shows valid navigation targets. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This is looking solid to me and helps to guide us toward consistency which is a big win in my book. Test coverage is good and code quality it solid. Matt, please check your commit hook, most of the file threw tidy errors for me during QA.. I've fixed those inline. I also improved the commit messages as they were a bit sparse. Passing QA
When you edit a license you are redirected to the list view, but with agreement you get the show view, what's the reason?
(In reply to Jonathan Druart from comment #42) > When you edit a license you are redirected to the list view, but with > agreement you get the show view, what's the reason? Ah there is a "do not push" patch!