[Stateful sidenav] User profile opt in/out#179270
Conversation
|
/ci |
|
/ci |
a574e06 to
1105ebf
Compare
|
/ci |
2 similar comments
|
/ci |
|
/ci |
fb6929c to
60cc59a
Compare
|
/ci |
b729482 to
a0db6b4
Compare
|
/ci |
a0db6b4 to
7e94b65
Compare
|
/ci |
kc13greiner
left a comment
There was a problem hiding this comment.
Still reviewing/testing! but wanted to bring up using uiSettingsClient for theme asap
...ore/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
Show resolved
Hide resolved
...ore/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
Show resolved
Hide resolved
...k/plugins/cloud_integrations/cloud_links/public/maybe_add_cloud_links/theme_darkmode_hook.ts
Show resolved
Hide resolved
Thanks for reviewing @kc13greiner. This PR is not about dark mode toggle. I just slightly refactored the file to make it clearer and fix an issue when interacting with multiple user profile settings. If you think a different approach should be done for the dark mode toggle it would be better to open a separate issue and address it in a different PR. |
kc13greiner
left a comment
There was a problem hiding this comment.
Im not sure how it should default if UserProfiles is not available, but currently it doesn't let the user toggle it/its stuck in "new mode"
...ore/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
Outdated
Show resolved
Hide resolved
| const chrome = core.chrome as InternalChromeStart; | ||
|
|
||
| if (security) { | ||
| this.userProfileOptOut$ = security.userProfiles.userProfileLoaded$.pipe( |
There was a problem hiding this comment.
UserProfiles isn't guaranteed to be available (not sure exactly where to link this discussion 😅 )
I tried to outline all cases when user doesn't have a profile (== profile id) here #175431 (comment) (TL;DR: anonymous users, interactive users authenticated via HTTP proxy, non-interactive users or HTTP clients).
There was a problem hiding this comment.
Thanks @azasypkin . I think for this use case with user facing UI we can discard non-interactive users or HTTP clients.
As you can see on this change, I disable the user profile (updating a new enabled$ Observable) if we receive a 404 when fetching the profile. This correspond to this logic on the server.
Can you provide me the steps to reproduce this config (with security but without user profile)? |
Of course! The following will setup an anonymous user in KB: in your xpack.security.authc.providers:
basic.basic1:
order: 0
anonymous.anonymous1:
order: 1
credentials:
username: "anonymous_user"
password: "changeme"Login first as Create a user Logout, then when at the login page, click the Login as Guest option More info available here! |
|
Thanks for the info @kc13greiner, I handled the case for anonymous users with no user profile data in 88f0ee0 |
|
ACK: will review shortly! |
kc13greiner
left a comment
There was a problem hiding this comment.
Thanks for making these changes, just a few remaining questions!
The case for anon user does work now, but I don't know if we'd want to show the toggle in the event of any non-successful retrieval of UserProfile.
Question: Can the observable logic be consolidated to just userProfile$ having data?
x-pack/plugins/security/public/account_management/user_profile/user_profile_api_client.ts
Show resolved
Hide resolved
x-pack/plugins/security/public/account_management/user_profile/user_profile_api_client.ts
Show resolved
Hide resolved
The
@Samiul-TheSoccerFan I am currently working in a PR that will bring the correct IA for oblt and search. I will also fix the issue you mention here so great catch, fix it's coming in a future PR 👍 |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: cc @sebelga |
kc13greiner
left a comment
There was a problem hiding this comment.
Thanks for the explanation 🚀


As part of the onboarding users to the new "solution" navigation, we want to allow the user to opt out and revert to the current "classic" navigation.
In this PR I've added a toggle in the user profile dropdown to allow reverting to the "classic" navigation.
How to test
kibana.ymlScreenthot
Note on implementation changes
I've also changed the way the project navigation is initiated by requiring an
idto be passed. This simplified the implementation to detect if we try to initiate a navigation tree multiple times.