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

Fix: Fixed "Size All Columns to Fit" not working properly #11437

Merged
merged 11 commits into from
Feb 28, 2023

Conversation

marcofranzen99
Copy link
Contributor

Resolved / Related Issues
Items resolved / related issues by this PR.

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

Note
Probably caused by #11216
Before that PR only one tag was displayed and there was only one TextBlock

Now for each Tag a separate TextBlock is displayed. The changed in this PR should calculate the size of the complete StackPanel (FontIcon + TextBlock)

In the first commit I also fixed the "Size to fit" function for the other columns, there the index was off by one

Screenshots (optional)
Add screenshots here.

@ferrariofilippo
Copy link
Contributor

Just two things:

  • Can you reduce the empty space on the right?
  • If you remove a tag from a file and click Resize all columns to fit, nothing happens. You have to change the sort order and then click it again to make it work

@yaira2 yaira2 added changes requested Changes are needed for this pull request and removed needs - code review labels Feb 24, 2023
@marcofranzen99
Copy link
Contributor Author

If you remove a tag from a file and click Resize all columns to fit, nothing happens. You have to change the sort order and then click it again to make it work

I could not really find a way to solve this problem. For some reason FileList.ItemsPanelRoot still contains the old data even though the tag has been removed from the file and is no longer displayed
If a new tag is added to the file or if the sort order is changed before you click Resize all columns to fit it works

@marcofranzen99
Copy link
Contributor Author

Can you reduce the empty space on the right?

Should be better now
I aligned the tags with the column header, which leads to less space on the right

Before:

image

After:
image

@yaira2
Copy link
Member

yaira2 commented Feb 28, 2023

This fixes the first part of #11295 but the double click to size is still broken.

@marcofranzen99
Copy link
Contributor Author

This fixes the first part of #11295 but the double click to size is still broken.

oh sorry, i thought that maybe only the size all columns to fit function is meant with that issue because the double click to resize didn't work for the other columns either

should be fixed now

@yaira2
Copy link
Member

yaira2 commented Feb 28, 2023

I can confirm it's working as expected. With the "Size all to fit option", does it cause the app to freeze when you use it?

@marcofranzen99
Copy link
Contributor Author

No freezes while using the "Size to fit option" (see recording)
Although I had some freezes while debugging, but rather randomly when navigating through folders or once also in the settings page

Files_LMdk9ZvlDl.mp4

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 merged commit c34e93c into files-community:main Feb 28, 2023
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed changes requested Changes are needed for this pull request labels Feb 28, 2023
@marcofranzen99 marcofranzen99 deleted the fix_size_colums_to_fit branch March 1, 2023 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Size to fit for the tag column is broken
4 participants