Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.

Fetch settings values from sdk and use language code - #3484

Merged
kulmann merged 7 commits into
masterfrom
feature/settings
May 26, 2020
Merged

Fetch settings values from sdk and use language code#3484
kulmann merged 7 commits into
masterfrom
feature/settings

Conversation

@kulmann

@kulmann kulmann commented May 20, 2020

Copy link
Copy Markdown
Contributor

This PR depends on owncloud/owncloud-sdk#475, so this has to stay WIP until the SDK-PR is merged and released.

Description

We have a settings service, that is supposed to be integrated in Phoenix like described in the docs

This PR uses settings values, coming from the settings service, to adapt the Phoenix UI for the authenticated user. At the moment, only the language setting is used: Changing the language in the settings frontend (has to be configured as a Phoenix app) results in having another language in Phoenix. In the future we can make use of this for a variety of customization:

  • chosen theme
  • notification preferences
  • preferences regarding the shown elements in the files list (e.g. different quick actions)
  • ...

Related Issue

owncloud/product#17

Motivation and Context

We want to provide a customized user experience for users.

How Has This Been Tested?

So far only in Chrome and Firefox. No tests implemented so far.

Screenshots (if appropriate):

English UI

Screenshot 2020-05-20 at 10 48 12

Changed language to French

Screenshot 2020-05-20 at 10 49 16

French UI (at least everything that's translated already)

Screenshot 2020-05-20 at 10 48 55

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

@kulmann
kulmann requested review from LukasHirt and PVince81 May 20, 2020 08:50
@kulmann kulmann self-assigned this May 20, 2020
@update-docs

update-docs Bot commented May 20, 2020

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@kulmann
kulmann marked this pull request as draft May 22, 2020 08:09
@PVince81

Copy link
Copy Markdown
Contributor

please update owncloud-sdk and add some error handling

@kulmann
kulmann force-pushed the feature/settings branch from eba462f to ae140bc Compare May 23, 2020 04:55
@kulmann

kulmann commented May 24, 2020

Copy link
Copy Markdown
Contributor Author

Screenshot 2020-05-22 at 21 20 08

Added message on error

@kulmann kulmann changed the title WIP: Fetch settings values from sdk and use language code Fetch settings values from sdk and use language code May 25, 2020
@kulmann
kulmann marked this pull request as ready for review May 25, 2020 11:00
@@ -0,0 +1,7 @@
Change: Make settings available in phoenix

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"Enhancement" might be better in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope, it's a change. ;-) Introduces settings to phoenix => entirely new feature.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exactly, a new feature which doesn't change any existing functionality

Comment thread src/Phoenix.vue Outdated
Comment thread src/store/user.js
logout(context) {
const logoutFinalizer = () => {
context.dispatch('cleanUpLoginState')
context.dispatch('loadSettingsValues')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why load the settings during logout?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because there will be settings that exist without user context. For example, when we provide multiple themes in the future, an admin could set a default theme in settings. That has to be available even if you don't have a user context. So as a result, all changes to the authenticated user (changing to another one or signing out) need to trigger a settings reload.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see. I am just a bit afraid of relying on authentication in this case because of the public link's context.

@LukasHirt LukasHirt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great! Settings is amazing progress 🚀

@kulmann
kulmann merged commit a0de780 into master May 26, 2020
@delete-merged-branch
delete-merged-branch Bot deleted the feature/settings branch May 26, 2020 06:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants