Skip to content

Mobile / Bridge button slot#2683

Merged
jayohms merged 3 commits intomainfrom
mobile/bridge-button-slot
Mar 17, 2026
Merged

Mobile / Bridge button slot#2683
jayohms merged 3 commits intomainfrom
mobile/bridge-button-slot

Conversation

@adjogima
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_slot data attribute to the Events “Add board” button.
  • Extends BridgeElement#getButton() payload with a slot field and adds getSlot() 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.

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@jayohms jayohms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

* 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
  ...
@jayohms jayohms merged commit f029fbf into main Mar 17, 2026
12 checks passed
@jayohms jayohms deleted the mobile/bridge-button-slot branch March 17, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants