From 0483ae530286ee696d6f6e1df608670b521cd329 Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Tue, 10 Mar 2026 10:52:47 +0100 Subject: [PATCH 1/2] Add support for "bridge-slot" parameter --- app/javascript/initializers/bridge/bridge_element.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/javascript/initializers/bridge/bridge_element.js b/app/javascript/initializers/bridge/bridge_element.js index 438cf22e1..414f8ee30 100644 --- a/app/javascript/initializers/bridge/bridge_element.js +++ b/app/javascript/initializers/bridge/bridge_element.js @@ -5,7 +5,8 @@ BridgeElement.prototype.getButton = function() { title: this.title, icon: this.getIcon(), displayTitle: this.getDisplayTitle(), - displayAsPrimaryAction: this.getDisplayAsPrimaryAction() + displayAsPrimaryAction: this.getDisplayAsPrimaryAction(), + slot: this.getSlot() } } @@ -26,3 +27,7 @@ BridgeElement.prototype.getDisplayTitle = function() { BridgeElement.prototype.getDisplayAsPrimaryAction = function() { return !!this.bridgeAttribute(`display-as-primary-action`) } + +BridgeElement.prototype.getSlot = function () { + return this.bridgeAttribute("slot") ?? "right" +} From 1d523a98f91cfb5fd64421530824842067672e84 Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Tue, 10 Mar 2026 10:53:15 +0100 Subject: [PATCH 2/2] Use it on the home's "Add board" button --- app/views/events/index/_add_board_button.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/events/index/_add_board_button.html.erb b/app/views/events/index/_add_board_button.html.erb index b8134266a..e6707165e 100644 --- a/app/views/events/index/_add_board_button.html.erb +++ b/app/views/events/index/_add_board_button.html.erb @@ -1,7 +1,7 @@
<%= link_to new_board_path, class: "btn btn--link btn--circle-mobile", - data: { controller: "hotkey", action: "keydown.b@document->hotkey#click", bridge__buttons_target: "button", bridge_title: "Add board", bridge_display_title: true, bridge_icon_url: bridge_icon("board") } do %> + data: { controller: "hotkey", action: "keydown.b@document->hotkey#click", bridge__buttons_target: "button", bridge_title: "Add board", bridge_display_title: true, bridge_icon_url: bridge_icon("board"), bridge_slot: "left" } do %> <%= icon_tag "board" %> Add a board B