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

Feature: Display drive information in Details Pane #16513

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ferrariofilippo
Copy link
Contributor

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Open a drive
  2. Toggle the preview pane

Notes
I have NOT tested this feature with Network Drives since I have none

Screenshot 2024-11-23 231227
Screenshot 2024-11-23 231253

/// <summary>
/// Drive preview and details available status.
/// </summary>
DrivePreviewAndDetailsAvailable,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DrivePreviewAndDetailsAvailable,
DriveStorageDetailsAvailable,

@@ -39,6 +36,9 @@ private async Task LoadPreviewAndDetailsAsync()
if (result is not null)
Thumbnail = await result.ToBitmapAsync();

if (Item.IsDriveRoot)
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a code comment for future reference?

</Grid.ColumnDefinitions>

<TextBlock
x:Name="AvailableSpaceTextBox"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
x:Name="AvailableSpaceTextBox"
x:Name="AvailableSpaceTextBlock"

Comment on lines 250 to 268
<TextBlock
x:Name="DriveFormatTextBox"
HorizontalAlignment="Center"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.SelectedDriveItem.Filesystem, Mode=OneWay}"
TextAlignment="Center"
TextWrapping="Wrap" />
<TextBlock
x:Name="DriveTypeTextBox"
HorizontalAlignment="Center"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
IsTextSelectionEnabled="True"
Text="{x:Bind ViewModel.SelectedDriveItem.TypeText, Mode=OneWay}"
TextAlignment="Center"
TextWrapping="Wrap" />
Copy link
Member

Choose a reason for hiding this comment

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

It looks like there can be some responsiveness issues here and we might need word wrapping. Can these be combined into a single TextBlock? You can still achieve the styling by using multiple runs.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is spacing sufficient in the first picture or should I go with the second?

Screenshot 2024-11-24 172936
Screenshot 2024-11-24 172941

Copy link
Member

Choose a reason for hiding this comment

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

The issue was less with the spacing and more that it gets cut off on the sides.

Copy link
Contributor Author

@ferrariofilippo ferrariofilippo Nov 24, 2024

Choose a reason for hiding this comment

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

My bad, I wasn't clear: both the pictures above are using a single TextBlock.
The difference is that in the second one I added a Run containing a white space

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Display drive information in Details Pane
2 participants