Skip to content

Allow an user to add new action for button/axis - #267

Draft
vicocz wants to merge 1 commit into
defaultfrom
local/filter-input-events
Draft

Allow an user to add new action for button/axis#267
vicocz wants to merge 1 commit into
defaultfrom
local/filter-input-events

Conversation

@vicocz

@vicocz vicocz commented Sep 11, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds button/axis-specific controller event creation through new commands, filtering, localized prompts, and an expandable floating action button menu.

Changes:

  • Adds axis and button event commands with dialog filtering.
  • Introduces the expandable floating action button control.
  • Adds new prompt translations.
File summaries
File Description
BrickController2/BrickController2/UI/ViewModels/ControllerProfilePageViewModel.cs Updated as part of this pull request.
BrickController2/BrickController2/UI/Services/Dialog/IDialogService.cs Updated as part of this pull request.
BrickController2/BrickController2/UI/Services/Dialog/DialogService.cs Updated as part of this pull request.
BrickController2/BrickController2/UI/Pages/ControllerProfilePage.xaml Updated as part of this pull request.
BrickController2/BrickController2/UI/Controls/ExpandableFloatingActionButton .xaml.cs Updated as part of this pull request.
BrickController2/BrickController2/UI/Controls/ExpandableFloatingActionButton .xaml Updated as part of this pull request.
BrickController2/BrickController2/UI/Controls/Dialogs.xaml.cs Updated as part of this pull request.
BrickController2/BrickController2/Resources/TranslationResources.resx Updated as part of this pull request.
BrickController2/BrickController2/Resources/TranslationResources.Designer.cs Updated as part of this pull request.
BrickController2/BrickController2/Resources/TranslationResources.de.resx Updated as part of this pull request.
Review details

Files not reviewed (1)

  • BrickController2/BrickController2/Resources/TranslationResources.Designer.cs: Generated file

Suppressed comments (2)

BrickController2/BrickController2/Resources/TranslationResources.resx:826

  • TranslationResources.hu.resx has no PressButton or PressOrMoveJoy entries, although Hungarian is a supported satellite culture and the existing controller-event prompt is translated there. ResourceManager will therefore fall back to the English neutral values for these new dialog prompts; add Hungarian translations alongside the German entries.
  <data name="PressButton" xml:space="preserve">
    <value>Press a button on the game controller</value>
  </data>
  <data name="PressOrMoveJoy" xml:space="preserve">
    <value>Move a joy on the game controller</value>

BrickController2/BrickController2/UI/Controls/ExpandableFloatingActionButton .xaml:9

  • Overlay cannot act as a page-wide dismiss layer here. The control is placed with HorizontalOptions="End" and no fill/size, so its RootGrid is measured to the button cluster; when open, taps on the rest of the profile page are outside Overlay and never reach OnOverlayTapped. Make the control fill the grid while keeping the inner button grid end-aligned, or move the overlay to the page-level layout.
            <BoxView x:Name="Overlay" BackgroundColor="Transparent" IsVisible="False">
  • Files reviewed: 9/10 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +16 to +20
public ExpandableFloatingActionButton()
{
InitializeComponent();

SecondaryButtons.CollectionChanged += OnSecondaryButtonsChanged;
<value>Wiederholbar</value>
</data>
<data name="PressButton" xml:space="preserve">
<value>Taste drücken auf dem Controller bewegen</value>

<controls:FloatingActionButton Grid.Column="1" x:Name="Icon"
Style="{StaticResource FloatingActionButtonStyle}"
Icon="menu"
Comment on lines +101 to +102
Overlay.IsVisible = false;
SecondaryContainer.IsVisible = false;
</CollectionView>

<controls:FloatingActionButton Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource FloatingActionButtonStyle}" Icon="playlist_add" Command="{Binding AddControllerEventForSpecificControllerIdCommand}" ToolTipProperties.Text="{extensions:Translate AddControllerEventForSpecificControllerId}" HorizontalOptions="End" VerticalOptions="End" Margin="0,0,100,10"/>
<controls:ExpandableFloatingActionButton Grid.Row="0" Grid.RowSpan="2" FabIcon="playlist_add" ToolTipProperties.Text="{extensions:Translate Expand}" HorizontalOptions="End" VerticalOptions="End" Margin="0,0,60,10">
Comment on lines +124 to +127
<controls:ExpandableFloatingActionButton Grid.Row="0" Grid.RowSpan="2" FabIcon="playlist_add" ToolTipProperties.Text="{extensions:Translate Expand}" HorizontalOptions="End" VerticalOptions="End" Margin="0,0,60,10">
<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="playlist_add" Command="{Binding AddControllerEventForSpecificControllerIdCommand}" ToolTipProperties.Text="{extensions:Translate AddControllerEventForSpecificControllerId}"/>
<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="control_point" Command="{Binding AddControllerAxisEventCommand}" ToolTipProperties.Text="{extensions:Translate AddControllerAxisEvent}"/>
<controls:FloatingActionButton Style="{StaticResource FloatingActionButtonStyle}" Icon="add_box" Command="{Binding AddControllerButtonEventCommand}" ToolTipProperties.Text="{extensions:Translate AddControllerButtonEvent}"/>
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.

2 participants