Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for positioning Hotwire Native “bridge” buttons into a specific navigation slot, enabling the “Add board” action to appear on the left in the mobile bridge UI.
Changes:
- Adds a
bridge_slotdata attribute to the Events “Add board” button. - Extends
BridgeElement#getButton()payload with aslotfield and addsgetSlot()with a default.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/views/events/index/_add_board_button.html.erb | Adds bridge_slot: "left" to control the native button slot placement. |
| app/javascript/initializers/bridge/bridge_element.js | Includes slot in the bridged button payload and adds getSlot() with a default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
LGTM — straightforward addition of a slot property to the bridge button system, following established patterns.
Extended reasoning...
Overview
This PR adds a slot property to the bridge button system across two files. bridge_element.js gets a new getSlot() method that reads a bridge-slot data attribute (defaulting to "right"), and the "Add board" button template sets bridge_slot: "left" to place it on the left side in the mobile bridge UI.
Security risks
None. This is a purely presentational/UI configuration change for the mobile bridge layer. No user input is processed unsafely, no auth or permissions logic is affected.
Level of scrutiny
Low scrutiny is appropriate. The change is minimal (a few lines across 2 files), follows the exact same pattern as existing bridge element methods (getDisplayTitle, getDisplayAsPrimaryAction, getIcon), and introduces no new architectural patterns or dependencies.
Other factors
No bugs were found by the automated bug hunting system. The PR has no prior reviewer comments or outstanding feedback. The getSlot() implementation uses nullish coalescing (??) for the default, which is consistent with modern JS practices and appropriate here since bridgeAttribute can return undefined.
* main: (33 commits) Remove payment/subscription system and card/storage limits Conditionally disable peer verification for ZIP streaming Prevent HTML injection through filenames Revert "Configure Lexxy to add extra spacing between block elements" Configure Lexxy to add extra spacing between block elements SaaS usage reporting (#2690) Update app/models/user/named.rb Prevent line breaks in the middle of familiar_name Tweak the layout Set the list of importable models based on the record sets in the manifest Validate polymorphic types against importable models allowlist Fix that the "maybe" stream wouldn't be replaced after triaging a card Use x_user_agent cookie for platform detection in Hotwire Native Add JSON response format to entropy endpoints (#2673) Fix path traversal vulnerability in ActiveStorage blob key import Enable CORS fetch mode for storage requests Revert CORS fetch mode for Active Storage Use CORS fetch mode for Active Storage to enable `maxEntrySize` checks Only start offline mode when signed in Exclude service worker and edit/pin/watch/new pages from main cache ...
No description provided.