diff --git a/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.json b/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.json index 4d30a13fa5..9b331e395e 100644 --- a/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.json +++ b/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.json @@ -19,6 +19,7 @@ "collapsible", "indent", "keep_closed", + "show_arrow", "column_break_jexf", "display_depends_on" ], @@ -126,13 +127,20 @@ "fieldname": "url", "fieldtype": "Data", "label": "URL" + }, + { + "default": "0", + "depends_on": "eval: doc.indent == 1", + "fieldname": "show_arrow", + "fieldtype": "Check", + "label": "Show Arrow" } ], "grid_page_length": 50, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2025-10-28 02:05:07.887104", + "modified": "2025-11-07 10:47:58.882767", "modified_by": "Administrator", "module": "Desk", "name": "Workspace Sidebar Item", diff --git a/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.py b/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.py index 9dc7c17bda..9f82c7271e 100644 --- a/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.py +++ b/frappe/desk/doctype/workspace_sidebar_item/workspace_sidebar_item.py @@ -25,6 +25,7 @@ class WorkspaceSidebarItem(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + show_arrow: DF.Check type: DF.Literal["Link", "Section Break", "Spacer"] url: DF.Data | None # end: auto-generated types diff --git a/frappe/public/js/frappe/ui/sidebar/sidebar.js b/frappe/public/js/frappe/ui/sidebar/sidebar.js index 3a5284986d..473e190b26 100644 --- a/frappe/public/js/frappe/ui/sidebar/sidebar.js +++ b/frappe/public/js/frappe/ui/sidebar/sidebar.js @@ -518,6 +518,12 @@ frappe.ui.Sidebar = class Sidebar { fieldtype: "Check", label: "Indent", }, + { + depends_on: "eval: doc.indent == 1", + fieldname: "show_arrow", + fieldtype: "Check", + label: "Show Arrow", + }, { default: "1", depends_on: 'eval: doc.type == "Section Break"', diff --git a/frappe/public/js/frappe/ui/sidebar/sidebar_item.html b/frappe/public/js/frappe/ui/sidebar/sidebar_item.html index 327cda26e1..be0347ca5d 100644 --- a/frappe/public/js/frappe/ui/sidebar/sidebar_item.html +++ b/frappe/public/js/frappe/ui/sidebar/sidebar_item.html @@ -21,11 +21,18 @@ class="item-anchor" title="{{ item.label }}" > - - {%= frappe.utils.icon(item.icon || "list-alt", "sm", "", "", "text-ink-gray-7 current-color", true) %} + {% let icon = item.icon %} + {% if (item.show_arrow) { %} + {% icon = "chevron-right" %} + {% } %} + + + {%= frappe.utils.icon(icon || "list-alt", "sm", "", "", "text-ink-gray-7 current-color", true) %} {{ item.label }} + {% if (!item.show_arrow) { %} + {% } %} {% } %} diff --git a/frappe/public/js/frappe/ui/sidebar/sidebar_item.js b/frappe/public/js/frappe/ui/sidebar/sidebar_item.js index 4c0cd40697..b71d464c1b 100644 --- a/frappe/public/js/frappe/ui/sidebar/sidebar_item.js +++ b/frappe/public/js/frappe/ui/sidebar/sidebar_item.js @@ -188,6 +188,10 @@ frappe.ui.sidebar_item.TypeSectionBreak = class SectionBreakSidebarItem extends ) { this.apply_section_break_state(); } + if (item.show_arrow) { + this.$drop_icon = this.wrapper.find('[item-icon="chevron-right"]'); + this.setup_event_listner(); + } } apply_section_break_state() { const me = this;