Summary: | Vue Toolbar component should be more flexible | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | ERM | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00
|
|
Circulation function: | |||
Bug Depends on: | 33417, 34214 | ||
Bug Blocks: | 30708, 38854, 35919 | ||
Attachments: |
Bug 34215: Introduce a ToolbarButton Vue component
Bug 34215: Introduce a ToolbarButton Vue component Bug 34215: Introduce a ToolbarButton Vue component Bug 34215: Introduce a ToolbarButton Vue component Bug 34215: Introduce a ToolbarButton Vue component |
Description
Jonathan Druart
2023-07-06 08:16:34 UTC
Created attachment 153085 [details] [review] Bug 34215: Introduce a ToolbarButton Vue component Our toolbar component is not flexible enough, we cannot: * have something else than a router-link * have a link outside of the app (it needs to be a Vue route) This patch adds a ToolbarButton component that is used for existing button. But other buttons can be added without being a router-link. Test plan: No change in behaviour here! Test the buttons in the 4 existing toolbar (in the ERM module) Sponsored-by: BULAC - http://www.bulac.fr/ Created attachment 153086 [details] [review] Bug 34215: Introduce a ToolbarButton Vue component Our toolbar component is not flexible enough, we cannot: * have something else than a router-link * have a link outside of the app (it needs to be a Vue route) This patch adds a ToolbarButton component that is used for existing button. But other buttons can be added without being a router-link. Test plan: No change in behaviour here! Test the buttons in the 4 existing toolbar (in the ERM module) Sponsored-by: BULAC - http://www.bulac.fr/ Created attachment 153087 [details] [review] Bug 34215: Introduce a ToolbarButton Vue component Our toolbar component is not flexible enough, we cannot: * have something else than a router-link * have a link outside of the app (it needs to be a Vue route) This patch adds a ToolbarButton component that is used for existing button. But other buttons can be added without being a router-link. Test plan: No change in behaviour here! Test the buttons in the 4 existing toolbar (in the ERM module) Sponsored-by: BULAC - http://www.bulac.fr/ In ToolbarButton.vue, does 'to' need to be '[String, Object]' or can/should it just be 'Object'? (In reply to Pedro Amorim from comment #4) > In ToolbarButton.vue, does 'to' need to be '[String, Object]' or can/should > it just be 'Object'? Can be a string I think, if you want to pass the URL directly (not name). That's why I decided to pass { name: 'RouteName' } instead of 'RouteName'. It's more flexible like that IMO I see, that makes sense! Looking at https://router.vuejs.org/guide/essentials/named-routes.html router-link allows for either direct path or a route by name, which is what we're replicating here in ToolbarButton. Created attachment 153179 [details] [review] Bug 34215: Introduce a ToolbarButton Vue component Our toolbar component is not flexible enough, we cannot: * have something else than a router-link * have a link outside of the app (it needs to be a Vue route) This patch adds a ToolbarButton component that is used for existing button. But other buttons can be added without being a router-link. Test plan: No change in behaviour here! Test the buttons in the 4 existing toolbar (in the ERM module) Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Created attachment 156087 [details] [review] Bug 34215: Introduce a ToolbarButton Vue component Our toolbar component is not flexible enough, we cannot: * have something else than a router-link * have a link outside of the app (it needs to be a Vue route) This patch adds a ToolbarButton component that is used for existing button. But other buttons can be added without being a router-link. Test plan: No change in behaviour here! Test the buttons in the 4 existing toolbar (in the ERM module) Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x |