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

Added a setting to enable or disable saving recent items opened #6577

Closed
wants to merge 14 commits into from

Conversation

BanCrash
Copy link
Contributor

@BanCrash BanCrash commented Oct 20, 2021

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

Details of Changes

  • Added a setting to enable or disable saving recent items opened (enabled by default)
    Disabling this setting will disable also Recent files widget, and won't let you enable it back until the setting is enabled again. Will remove recent items too.
    You can have the setting enable and not have the recent files widget enabled, because this setting will also affect the jump list (that's why I added a new setting instead just making this when you disable recent files widget).

TO DO:

  • Figure out why it needs a Files restart to refresh the value of IsSavingRecentItemsEnabled in the Widgets settings.
    Unrelated to this PR since File Tags are not getting their value refreshed on the InnerNavigationToolbar neither.

  • Figure out how to refresh all home tabs opened when this changes.
    Unrelated to this PR since this also present on Recent Files, if you have several tabs with Home opened, if you disable Recent Files it will only be update on the tab where you change it, but on the others will not be refreshed. I think this should be include in Feature: Auto refresh drive widget & tags widget when changes are detected #6182 , and automatically refreshing the home page when there are widgets or drives changes. So, it's unrelated to this PR.

Validation

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

Screenshots (optional)
image

Disable Recent Files widget and not letting you enable it back (currently it needs a restart of Files app):
image

Update to hyanite main
TODO:
-Hide Recent files widget when this is disabled
-Doesn't allow to change recent files state if the option is disabled
-Remove recent items after disabling the option
…ecent items are being saved

Not working until:
- Case Recent items disabled: Requires a new tab opening, won't refresh the actual opened.
- Case Widgets settings: Requires a Files restart to not letting you enable Recent files.
@d2dyno1
Copy link
Member

d2dyno1 commented Oct 20, 2021

Instead adding a new setting, I guess it shouldn't register recent items when the widget is disabled.

@BanCrash
Copy link
Contributor Author

Instead adding a new setting, I guess it shouldn't register recent items when the widget is disabled.

I did this way because of this:

You can have the setting enable and not have the recent files widget enabled, because this setting will also affect the jump list (that's why I added a new setting instead just making this when you disable recent files widget).

@BanCrash
Copy link
Contributor Author

Instead adding a new setting, I guess it shouldn't register recent items when the widget is disabled.

I did this way because of this:

You can have the setting enable and not have the recent files widget enabled, because this setting will also affect the jump list (that's why I added a new setting instead just making this when you disable recent files widget).

Ok, but we already have Bundles for that matter. Recent items does not serve the purpose as mentioned above, it'd be bad UX.

I'm talking about this:

image

(Image taken from #5577 , @xezrunner comment)

If we don't save recent items this jumplist will be empty too, I don't think this overlaps with Bundles.

@yaira2
Copy link
Member

yaira2 commented Oct 20, 2021

@duke7553 brought up the idea of keeping the list in sync with the list of recent items in File Explorer, just wondering if that changes anything in regards to this PR.

@lukeblevins
Copy link
Contributor

(The Recents folder leveraged by Explorer)

@BanCrash
Copy link
Contributor Author

@duke7553 brought up the idea of keeping the list in sync with the list of recent items in File Explorer, just wondering if that changes anything in regards to this PR.

@yaichenbaum I've been thinking but I think there is nothing to change here, maybe when that is added it will modify NavigationHelper but I don't think that would require a lot of changes regarding the additions on this PR (probably just move the if condition added on this PR to the new place, but without knowing the future changes there is nothing sure).

@BanCrash
Copy link
Contributor Author

BanCrash commented Oct 21, 2021

Okay, I think that on this state is ready to review, since:

First issue: Is also present on Recent Files, if you have several tabs with Home opened, if you disable Recent Files it will only be update on the tab where you change it, but on the others will not be refreshed. I think this should be include in #6182 , and automatically refreshing the home page when there are widgets or drives changes. So, it's unrelated to this PR.

About the other issue:

@d2dyno1 InnerNavigationToolbar is not getting Tags state update neither until you restart Files, If you disable Tags they will still be showed as an option of rearrange until you restart Files:

Etiqueta de archivo = Tags
image
image

After restarting Files "Etiquetas de archivo" disappear:
image

So it's unrelated to this PR too.

@BanCrash BanCrash marked this pull request as ready for review October 21, 2021 13:03
@yaira2 yaira2 requested a review from d2dyno1 October 21, 2021 13:56
@d2dyno1
Copy link
Member

d2dyno1 commented Oct 26, 2021

@BanCrash I'll try to fix the second issue in #6542

d2dyno1
d2dyno1 previously approved these changes Oct 26, 2021
@d2dyno1 d2dyno1 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Oct 26, 2021
@yaira2
Copy link
Member

yaira2 commented Oct 26, 2021

@BanCrash can you move the setting to preferences?

@yaira2 yaira2 added changes requested Changes are needed for this pull request and removed ready to merge Pull requests that are approved and ready to merge labels Oct 26, 2021
@BanCrash
Copy link
Contributor Author

BanCrash commented Oct 27, 2021

@BanCrash can you move the setting to preferences?

Done!

image

@BanCrash BanCrash requested a review from d2dyno1 October 27, 2021 12:21
@BanCrash BanCrash added needs - code review and removed changes requested Changes are needed for this pull request labels Oct 27, 2021
Files/Strings/en-US/Resources.resw Outdated Show resolved Hide resolved
Files/Views/SettingsPages/Preferences.xaml Outdated Show resolved Hide resolved
BanCrash and others added 3 commits October 27, 2021 21:21
Co-authored-by: Yair Aichenbaum <39923744+yaichenbaum@users.noreply.github.com>
Co-authored-by: Yair Aichenbaum <39923744+yaichenbaum@users.noreply.github.com>
@BanCrash BanCrash requested a review from yaira2 October 27, 2021 19:31
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.

Code wise this looks good, but I'm concerned about the UX of this setting. Would it be better to just add recent items to the same list File Explorer uses so you can control everything in the same place?

Co-authored-by: Yair Aichenbaum <39923744+yaichenbaum@users.noreply.github.com>
@BanCrash BanCrash marked this pull request as draft October 30, 2021 09:37
@d2dyno1
Copy link
Member

d2dyno1 commented Oct 31, 2021

About the other issue:

@d2dyno1 InnerNavigationToolbar is not getting Tags state update neither until you restart Files, If you disable Tags they will still be showed as an option of rearrange until you restart Files

It's been fixed in 641e1d9 (#6542)

@BanCrash
Copy link
Contributor Author

BanCrash commented Nov 7, 2021

Code wise this looks good, but I'm concerned about the UX of this setting. Would it be better to just add recent items to the same list File Explorer uses so you can control everything in the same place?

@yaichenbaum sorry about the delay to answer, I was waiting to made some test and research but since I have exams I doesn't have much time these weeks. When I made that research and tests I will answer your question with the results that I'll get.

@Cheese-Echidna
Copy link

Please merge this I would really like this feature! :)

@yaira2 yaira2 closed this Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recent items shouldn't register elements when you have it disabled
5 participants