Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ironsides - Tooltips for the bar items #3107

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

timkur
Copy link
Contributor

@timkur timkur commented Jun 4, 2024

Summary of the pull request

References and relevant issues

Adds tooltips for the bar items that didn't have them.

Detailed description of the pull request / Additional comments

Validation steps performed

PR checklist

Copy link
Contributor

@jaholme jaholme left a comment

Choose a reason for hiding this comment

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

:shipit:

@timkur timkur closed this Jun 4, 2024
@timkur timkur reopened this Jun 4, 2024
<TextBlock x:Uid="AppPID" Text="{x:Bind _viewModel.ApplicationPid, Mode=OneWay}" FontFamily="Segoe UI" FontSize="10" Margin="5" VerticalAlignment="Center" Visibility="{x:Bind _viewModel.AppBarVisibility, Mode=OneWay}"/>
<TextBlock x:Uid="AppCPUUsage" Text="{x:Bind _viewModel.AppCpuUsage, Mode=OneWay}" FontFamily="Segoe UI" FontSize="10" Margin="5" VerticalAlignment="Center" Visibility="{x:Bind _viewModel.AppBarVisibility, Mode=OneWay}"/>

<!-- Per System controls -->
<Button x:Uid="SwitchLayoutButton" x:Name="SwitchLayoutButton" HorizontalAlignment="Center" Click="{x:Bind _viewModel.SwitchLayoutCommand}">
<TextBlock Text="&#xe8b4;"/>
</Button>
<Button x:Name="LargeContentButton" Click="{x:Bind _viewModel.ShowBigWindowCommand}" HorizontalAlignment="Center">
<Button x:Name="LargeContentButton" x:Uid="LargeContentButton" Click="{x:Bind _viewModel.ShowBigWindowCommand}" HorizontalAlignment="Center">
Copy link
Contributor

@dhoehna dhoehna Jun 4, 2024

Choose a reason for hiding this comment

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

NIT: a more descriptive Id. "LargeContentButton" is ambiguous. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

@@ -68,15 +70,15 @@
</controls:ProcessSelectionButton>

<!-- Per App controls -->
<Image x:Name="AppIcon" HorizontalAlignment="Center" Source="{x:Bind _viewModel.ApplicationIcon, Mode=OneWay}" Margin="5" Height="20" Width="20" Visibility="{x:Bind _viewModel.AppBarVisibility, Mode=OneWay}"/>
<Image x:Name="AppIcon" HorizontalAlignment="Center" Source="{x:Bind _viewModel.ApplicationIcon, Mode=OneWay}" ToolTipService.ToolTip="{x:Bind _viewModel.ApplicationName, Mode=OneWay}" Margin="5" Height="20" Width="20" Visibility="{x:Bind _viewModel.AppBarVisibility, Mode=OneWay}"/>
Copy link
Contributor

@dhoehna dhoehna Jun 4, 2024

Choose a reason for hiding this comment

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

Please put each property on their own line. #WontFix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just my 2cents... obvious consistency is important, but my vote would be to have all the properties on one line. When I'm trying to see how all of my controls fit into a layout on the page, having a line per control is more readable (to me) than having a single control take up a quarter of the page. I think this borders on personal preference though...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to add another two cents🙂... generally, we put everything on one line when it's short enough to fit and split when it's not. Personally, I find that easier to read in an IDE, but I also think splitting long lines makes it easier to review on GitHub. I'm fine with the wontfix, just wanted to add a little context.

@@ -51,6 +51,9 @@ public partial class BarWindowViewModel : ObservableObject
[ObservableProperty]
private Visibility _appBarVisibility = Visibility.Visible;

[ObservableProperty]
private string? _applicationName;
Copy link
Contributor

@dhoehna dhoehna Jun 4, 2024

Choose a reason for hiding this comment

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

NIT: remove ? and assign string.empty in the constructor. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. Seems to fit the pattern better for the rest of the file. I'm guessing a tooltip of null is different than a tooltip of "", but in theory the user won't have access to the tooltip of an app if we're not attached to an app.

@timkur timkur merged commit f7fbe96 into main Jun 5, 2024
4 checks passed
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.

Bar data items should have tooltips
5 participants