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

Bug: Soft link file details layout information misaligned #15998

Open
zuoxinyu opened this issue Aug 12, 2024 · 7 comments · May be fixed by #16593
Open

Bug: Soft link file details layout information misaligned #15998

zuoxinyu opened this issue Aug 12, 2024 · 7 comments · May be fixed by #16593
Labels
good first issue Good issue for new contributors to get started with

Comments

@zuoxinyu
Copy link

Description

image

Steps To Reproduce

  1. create a softlink file (via mklink, not a Windows shortcut file) under a git project
  2. switch to Details layout

Requirements

soft link file has the same alignment with other files

Files Version

3.6.0.0

Windows Version

10.0.22631.3958

Log File

no

@zuoxinyu zuoxinyu added the bug label Aug 12, 2024
@Josh65-2201
Copy link
Member

Thanks for the report, I reproduced this issue and have added this to the project board.

@Josh65-2201 Josh65-2201 changed the title Soft link file misaligned Bug: Soft link file details layout information misaligned Aug 12, 2024
@yaira2 yaira2 moved this from 🆕 New to 🔖 Ready to build in Files task board Aug 12, 2024
@yaira2 yaira2 added the good first issue Good issue for new contributors to get started with label Aug 12, 2024
@piyushchouhan
Copy link

I could not able to see any missalignment of detail of the sortcut created by mklink in git repos.

@kunallohaniya
Copy link

I am a beginner and this is my first time i'm here, it will be very helpful for me if someone let me know, how can i make contributions to the open source.

@0x5bfa
Copy link
Member

0x5bfa commented Aug 25, 2024

  1. Build the project referencing the instructions described here
  2. Enumerated items are converted into ListedItem derivative classes such as GitItem and ShortcutItem
  3. I guess IsGitItem is false while should be true as checking if item is git one is done after checking if item is shortcut one.
  4. So if (isGitRepo) {} should be the first checking

The actual UI code that displays git info (as you can see IsGitItem handles if the element should be x:Load'ed):

<!-- Item Git Status -->
<Border
x:Name="ItemGitStatusTextBlock"
Width="{Binding ColumnsViewModel.GitStatusColumn.LengthIncludingGridSplitter.Value, ElementName=PageRoot, Mode=OneWay}"
Padding="10,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
x:Load="{x:Bind IsGitItem}">
<controls:ThemedIcon
Width="16"
Height="16"
HorizontalAlignment="Left"
Style="{x:Bind AsGitItem.UnmergedGitStatusIcon, Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind AsGitItem.UnmergedGitStatusName, Mode=OneWay}"
Visibility="{Binding ColumnsViewModel.GitStatusColumn.Visibility, ElementName=PageRoot, Mode=OneWay}" />
</Border>
<!-- Item Git Last Commit Date -->
<TextBlock
x:Name="ItemGitLastCommitDateTextBlock"
Width="{Binding ColumnsViewModel.GitLastCommitDateColumn.LengthIncludingGridSplitter.Value, ElementName=PageRoot, Mode=OneWay}"
Padding="10,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
x:Load="{x:Bind IsGitItem}"
DataContextChanged="TextBlock_DataContextChanged"
IsTextTrimmedChanged="TextBlock_IsTextTrimmedChanged"
Style="{StaticResource ColumnContentTextBlock}"
Text="{x:Bind AsGitItem.GitLastCommitDateHumanized, Mode=OneWay}"
Visibility="{Binding ColumnsViewModel.GitLastCommitDateColumn.Visibility, ElementName=PageRoot, Mode=OneWay}" />
<!-- Item Git Last Commit Message -->
<TextBlock
x:Name="ItemGitLastCommitMessageTextBlock"
Width="{Binding ColumnsViewModel.GitLastCommitMessageColumn.LengthIncludingGridSplitter.Value, ElementName=PageRoot, Mode=OneWay}"
Padding="10,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
x:Load="{x:Bind IsGitItem}"
DataContextChanged="TextBlock_DataContextChanged"
IsTextTrimmedChanged="TextBlock_IsTextTrimmedChanged"
Style="{StaticResource ColumnContentTextBlock}"
Text="{x:Bind AsGitItem.GitLastCommitMessage, Mode=OneWay}"
Visibility="{Binding ColumnsViewModel.GitLastCommitMessageColumn.Visibility, ElementName=PageRoot, Mode=OneWay}" />
<!-- Item Git Last Commit Author -->
<TextBlock
x:Name="ItemGitCommitAuthorTextBlock"
Width="{Binding ColumnsViewModel.GitCommitAuthorColumn.LengthIncludingGridSplitter.Value, ElementName=PageRoot, Mode=OneWay}"
Padding="10,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
x:Load="{x:Bind IsGitItem}"
DataContextChanged="TextBlock_DataContextChanged"
IsTextTrimmedChanged="TextBlock_IsTextTrimmedChanged"
Style="{StaticResource ColumnContentTextBlock}"
Text="{x:Bind AsGitItem.GitLastCommitAuthor, Mode=OneWay}"
Visibility="{Binding ColumnsViewModel.GitCommitAuthorColumn.Visibility, ElementName=PageRoot, Mode=OneWay}" />
<!-- Item Git Last Commit SHA -->
<TextBlock
x:Name="ItemGitLastCommitShaTextBlock"
Width="{Binding ColumnsViewModel.GitLastCommitShaColumn.LengthIncludingGridSplitter.Value, ElementName=PageRoot, Mode=OneWay}"
Padding="10,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
x:Load="{x:Bind IsGitItem}"
Style="{StaticResource ColumnContentTextBlock}"
Text="{x:Bind AsGitItem.GitLastCommitSha, Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind AsGitItem.GitLastCommitFullSha, Mode=OneWay}"
Visibility="{Binding ColumnsViewModel.GitLastCommitShaColumn.Visibility, ElementName=PageRoot, Mode=OneWay}" />

If you have questions, let me know!

@priadiliav
Copy link
Contributor

Based on my testing, I was unable to reproduce the issue. It is possible that this problem has already been fixed in a recent update.

@Josh65-2201
Copy link
Member

Josh65-2201 commented Sep 29, 2024

I can still reproduce this, Make sure you following the steps to reproduce when testing

@priadiliav
Copy link
Contributor

priadiliav commented Sep 29, 2024

Apologies, you're right—I didn't simulate the exact issue. Now I can clearly see the problem, and I'm going to resolve it.

Could you please assign this issue to me?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for new contributors to get started with
Projects
Status: 🏗 In progress
7 participants