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

dialog: show file extension in list view #3033

Merged
merged 2 commits into from Jun 3, 2022
Merged

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Jun 3, 2022

Description:

Due to icons being a lot smaller for the list view, we should show the file extension to make it more clear to the user what file they are seeing. This PR makes that change and manages to clean up and optimize the code a bit in the process.

Fixes Jacalz/rymdport#39 but should be superseded by #3032 for a future release.

image
image

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

It seemed like a sensible improvement to show the file extension when using the list view. This is due to the icons being a lot smaller.
@Jacalz
Copy link
Member Author

Jacalz commented Jun 3, 2022

The option in VSCode to only run a specific test is very useful but does apparently not help when you break other tests 🙈

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 61.362% when pulling 1a4f7b0 on Jacalz:listext into 20fbb51 on fyne-io:develop.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

Looks great, but I see a potential panic

} else {
item.name = fileName(location)
if f.view == gridView {
ext := filepath.Ext(item.name[1:])
Copy link
Member

Choose a reason for hiding this comment

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

I think this might crash for a file named "H"?

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems like it actually doesn't. We were doing the same thing in the code that I removed.
image

Copy link
Member

Choose a reason for hiding this comment

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

Oops! thanks

@Jacalz Jacalz requested a review from andydotxyz June 3, 2022 15:01
@Jacalz Jacalz merged commit 3c1f987 into fyne-io:develop Jun 3, 2022
@Jacalz Jacalz deleted the listext branch June 3, 2022 16:26
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.

None yet

3 participants