Skip to content

Conversation

d2dyno1
Copy link
Member

@d2dyno1 d2dyno1 commented Feb 10, 2021

This PR adds Adaptive Layout Mode. I'd like to hear your feedback on current logic of changing Layout Modes.

Things yet to do

  • Move Adaptive Layout option to settings
  • Make Adaptive Layout select the layout modes
  • Fix disabling feature for folder layout save
  • Add desktop.ini reading
  • Remember preferred gridview sizemode
  • Added adaptive layout modes #3526 (comment)
  • Replace "Re-enable Adaptive Layout" button with something different..

Limitations

  • Feature "Enable individual preferences for individual directories" is disabled when Adaptive Layout is enabled

To enable Adaptive Layout Mode, select it from Display Options

image
-> It's been moved to settings
It is enabled by default and cannot be disabled

Closes #2893

@d2dyno1
Copy link
Member Author

d2dyno1 commented Feb 10, 2021

Me, not being able to get the mafs right for 40 minutes straight:

image

@d2dyno1
Copy link
Member Author

d2dyno1 commented Feb 10, 2021

@d2dyno1 Instead of having a toggle on the flyout, can you make this this a setting?

But what will other buttons do if those will always be overriden?
image

Edit:
I came up with an idea. These buttons will be selected and will be able to override Adaptive Layout mode suggestion

@d2dyno1 d2dyno1 marked this pull request as draft February 10, 2021 21:29
@yaira2
Copy link
Member

yaira2 commented Feb 10, 2021

@d2dyno1 The preferred way would be to use the same behavior that's found in File Explorer.

@d2dyno1
Copy link
Member Author

d2dyno1 commented Feb 10, 2021

It looks like this logic behaves similarly to File Explorer, or am I missing something?

@yaichenbaum

@d2dyno1 d2dyno1 marked this pull request as ready for review February 12, 2021 19:50
@d2dyno1
Copy link
Member Author

d2dyno1 commented Feb 12, 2021

@yaichenbaum ready for review! :shipit:

@yaira2 yaira2 requested a review from gave92 February 14, 2021 00:43
@yaira2
Copy link
Member

yaira2 commented Feb 14, 2021

@d2dyno1 How is adaptive layout meant to work?

@d2dyno1
Copy link
Member Author

d2dyno1 commented Feb 14, 2021

@d2dyno1 How is adaptive layout meant to work?

You can find the logic here: https://github.com/files-community/Files/pull/3526/files#diff-1fc2ffb3299cf773313a1100cee887362f6a9b04450aa620fdc1af7656ddffbeR67

Basically, it looks for desktop.ini to get the information about the folder from, if no data in desktop.ini is present, it makes some predictions based on the items in the directory - e.g.:
Directory contains mostly images -> TilesView
Directory contains images and/or videos -> GridView

@yaira2 yaira2 added the changes requested Changes are needed for this pull request label Feb 14, 2021
@yaira2
Copy link
Member

yaira2 commented Feb 14, 2021

@d2dyno1 How is adaptive layout meant to work?

You can find the logic here: https://github.com/files-community/Files/pull/3526/files#diff-1fc2ffb3299cf773313a1100cee887362f6a9b04450aa620fdc1af7656ddffbeR67

Basically, it looks for desktop.ini to get the information about the folder from, if no data in desktop.ini is present, it makes some predictions based on the items in the directory - e.g.:
Directory contains mostly images -> TilesView
Directory contains images and/or videos -> GridView

I assume that once a user overrides that for a directory, adaptive mode will ignore that directory. Is that correct?

@d2dyno1
Copy link
Member Author

d2dyno1 commented Feb 14, 2021

I assume that once a user overrides that for a directory, adaptive mode will ignore that directory. Is that correct?

It does not do that. Currently when a gridview is selected by the Adaptive Layout, user can only override the grid size.

Sounds promising though, I'll see what could be done

@yaichenbaum

@d2dyno1 d2dyno1 requested a review from yaira2 March 3, 2021 07:07
yaira2
yaira2 previously approved these changes Mar 3, 2021
@d2dyno1
Copy link
Member Author

d2dyno1 commented Mar 3, 2021

Looking for feedback on the Adaptive Layout layout switching decision logic.

@yaichenbaum I'd like for the build that ships with Adaptive Layout to stay for a bit longer in insider channel than usual so we can collect necessary feedback from insiders on this feature to meet standards of productivity for users before it is pushed to the main branch.

@d2dyno1
Copy link
Member Author

d2dyno1 commented Mar 3, 2021

This feature must be perfected since it can't be disabled.

@yaira2
Copy link
Member

yaira2 commented Mar 3, 2021

@d2dyno1 We can have a longer testing period to help iron out issues.

@yaira2 yaira2 requested a review from tsvietOK March 4, 2021 20:06
@gave92
Copy link
Member

gave92 commented Mar 7, 2021

@gave92 Am I going crazy or is UpdateLayoutPreferencesForPath() not saving the properties - specifically AdaptiveLayoutDisabledOverride?!

You were right @d2dyno1, layout preferences were not getting saved on occasion (after #3716), sorry about that.

@d2dyno1
Copy link
Member Author

d2dyno1 commented Mar 7, 2021

You were right @d2dyno1, layout preferences were not getting saved on occasion (after #3716), sorry about that.

phew!! I thought I was going insane 😅

@gave92 gave92 mentioned this pull request Mar 7, 2021
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.

Great work!

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Mar 7, 2021
@yaira2 yaira2 changed the title Added Adaptive Layout Mode Added adaptive layout modes Mar 7, 2021
@yaira2 yaira2 merged commit 52316fa into files-community:main Mar 7, 2021
@d2dyno1 d2dyno1 deleted the adaptive_layout_mode branch April 5, 2021 17:30
@candrapersada
Copy link

why File crashes when trying to access video thumbnails? Introducing v2.0.13

@gave92
Copy link
Member

gave92 commented Oct 13, 2021

@candrapersada If Files crashes please open a new issue and upload the app's debug logs.

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.

Automatically switch to grid mode when the majority of items are photos
5 participants