Allow an user to add new action for button/axis - #267
Draft
vicocz wants to merge 1 commit into
Draft
Conversation
There was a problem hiding this comment.
🟡 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.resxhas noPressButtonorPressOrMoveJoyentries, 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
Overlaycannot act as a page-wide dismiss layer here. The control is placed withHorizontalOptions="End"and no fill/size, so itsRootGridis measured to the button cluster; when open, taps on the rest of the profile page are outsideOverlayand never reachOnOverlayTapped. 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}"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.