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

Make files settings admin configurable #49758

Conversation

bromiesTM
Copy link

@bromiesTM bromiesTM commented Dec 10, 2024

Summary

To set the config run

ooc config:app:set --value <yes/no> files crop_image_previews
ooc config:app:set --value <yes/no> files show_hidden
ooc config:app:set --value <yes/no> files sort_favorites_first
ooc config:app:set --value <yes/no> files sort_folders_first
ooc config:app:set --value <yes/no> files grid_view
ooc config:app:set --value <yes/no> files folder_tree

Checklist

@bromiesTM bromiesTM force-pushed the kh/feat/configurable-files-settings branch from f673671 to 35d852d Compare December 11, 2024 08:22
@bromiesTM bromiesTM marked this pull request as ready for review December 11, 2024 08:25
@bromiesTM bromiesTM marked this pull request as draft December 11, 2024 10:32
@bromiesTM
Copy link
Author

🚧 Switched back to draft to make the settings less aggressive

@skjnldsv skjnldsv added the 2. developing Work in progress label Dec 12, 2024
@skjnldsv
Copy link
Member

If the admin changed a value and override it, it's imperative the user is made aware of it.

@bromiesTM bromiesTM force-pushed the kh/feat/configurable-files-settings branch from 35d852d to d5223bc Compare December 12, 2024 16:00
printminion-co and others added 3 commits December 12, 2024 17:03
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Not ok: in_array("foo", [true, false]); // returns true
ok: in_array("foo", [true, false], true); // returns false

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
@bromiesTM bromiesTM force-pushed the kh/feat/configurable-files-settings branch from d5223bc to 5b5ee91 Compare December 12, 2024 16:04
@ArtificialOwl
Copy link
Member

ArtificialOwl commented Dec 12, 2024

Can this be replaced by #49399 ?

nevermind: the lexicon does not offer admin configuration for default user preferences

@ArtificialOwl
Copy link
Member

ArtificialOwl commented Dec 13, 2024

Hello @bromiesTM

We might have an other simpler way of implementing this feature.
From what I understand you want admins to be able to:

  • set a specific default value for a specific user preferences config key,
  • this value does not overwrite eventual value set by your users,
  • this value can be overwritten by your users when setting their own value.

If this is the case, we have an easier way to do this for 31

@printminion-co
Copy link
Contributor

Hello @bromiesTM

We might have an other simpler way of implementing this feature. From what I understand you want admins to be able to:

  • set a specific default value for a specific user preferences config key,
  • this value does not overwrite eventual value set by your users,
  • this value can be overwritten by your users when setting their own value.

If this is the case, we have an easier way to do this for 31

is it documented somewhere? In order to us to check it?

@ArtificialOwl
Copy link
Member

I just wanted to know if my description fit the expected behavior.

This is the PR: #49848 but I have not started yet any discussion with other engineer if we really want the feature and if it can be implemented this way ...

If we merge in this current state, the files app will need to implement the IConfigLexicon feature and include the config keys listed above

@skjnldsv
Copy link
Member

skjnldsv commented Dec 14, 2024

@bromiesTM @printminion-co the question is: do you want to enforce the user settings or just charge the defaults (but still let the user change it)

@printminion-co
Copy link
Contributor

printminion-co commented Dec 16, 2024

@bromiesTM @printminion-co the question is: do you want to enforce the user settings or just charge the defaults (but still let the user change it)

We started with "enforce the user settings" but in this way the user was not able to switch the "grid_view"
image

That is why we (not yet in this PR) do the "just charge the defaults (but still let the user change it)"
Also we removed UI (not in this PR) to change the files app values (e.g. show_hidden).

Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@bromiesTM
Copy link
Author

As the IConfigLexicon would allow doing the same, we decided to close this PR.
The Unit Tests and type checking bugfix will be provided via another PR #50050

@bromiesTM bromiesTM closed this Jan 6, 2025
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.

5 participants