Skip to content

Code Quality: Simplified logic for adaptive layout#18322

Merged
yair100 merged 6 commits intofiles-community:mainfrom
Josh65-2201:Josh65/Fix-include-media-files-in-adaptive-layout-check
Apr 10, 2026
Merged

Code Quality: Simplified logic for adaptive layout#18322
yair100 merged 6 commits intofiles-community:mainfrom
Josh65-2201:Josh65/Fix-include-media-files-in-adaptive-layout-check

Conversation

@Josh65-2201
Copy link
Copy Markdown
Member

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. Opened video, audio and image only folders they went to grid layout
  2. Opened just folders and mixed media (image and video/audio less that 85% of the total contents) they went to details layout

Added .ogg (.oga is the same format just different file extension) to the isAudio check. Was only in the isVideo check and as it can have video in it (although rarely) I have kept it there.

Note that the existing isMedia checks audio and video files in a folder. Since audio can have album art for the thumbnail I believe it's fine to have them also use grid layout

Comment thread src/Files.App/Helpers/Layout/AdaptiveLayoutHelpers.cs Outdated
Comment thread src/Files.Shared/Helpers/FileExtensionHelpers.cs
@yair100 yair100 added the changes requested Changes are needed for this pull request label Mar 31, 2026
@Josh65-2201
Copy link
Copy Markdown
Member Author

Could also remove the below as it's now only using one value from it for adaptive layout helper
image

@yair100 yair100 added ready for review Pull requests that are ready for review and removed changes requested Changes are needed for this pull request labels Mar 31, 2026
@yair100 yair100 self-requested a review March 31, 2026 20:15
@yair100
Copy link
Copy Markdown
Member

yair100 commented Mar 31, 2026

Agreed

@Josh65-2201 Josh65-2201 changed the title Fix: Include video and audio files in adaptive layout check Fix: Simplified logic for adaptive layout and Include video and audio files in grid layout check Mar 31, 2026
@yair100 yair100 changed the title Fix: Simplified logic for adaptive layout and Include video and audio files in grid layout check Fix: Simplified logic for adaptive layout Apr 10, 2026
@yair100 yair100 changed the title Fix: Simplified logic for adaptive layout Code Quality: Simplified logic for adaptive layout Apr 10, 2026
Copy link
Copy Markdown
Member

@yair100 yair100 left a comment

Choose a reason for hiding this comment

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

LGTM

@yair100 yair100 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels Apr 10, 2026
@yair100 yair100 merged commit a81c1df into files-community:main Apr 10, 2026
6 checks passed
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.

2 participants